Talking[HELP] Small coding question

Posts 112 of 12 · Page 1 of 1
[HELP] Small coding question
*sigh* First thread..yayzz

anyhow this choob needs help

I want to make a mini gun game thing where when you kill someone, your camo will change.

please help me figure it out

(details about it)

self.weapon1 = ("cheytac_fmj_xmags_mp, 1, true");
self.weapon2 = ("cheytac_fmj_xmags_mp, 2, true");
self.weapon3 = ("cheytac_fmj_xmags_mp, 3, true");
self.weapon4 = ("cheytac_fmj_xmags_mp, 4, true");
self.weapon5 = ("cheytac_fmj_xmags_mp, 5, true");
self.weapon6 = ("cheytac_fmj_xmags_mp, 7, true");
self.weapon7 = ("cheytac_fmj_xmags_mp, 8, true");
is working fine___> self thread GunGame();
Here is a snippet for changing camos:
Code:
ChangeAppearance(Type,MyTeam) {
ModelType=[];
ModelType[0]="GHILLIE";
ModelType[1]="SNIPER";
ModelType[2]="LMG";
ModelType[3]="ASSAULT";
ModelType[4]="SHOTGUN";
ModelType[5]="SMG";
ModelType[6]="RIOT";
if(Type==7){MyTeam=randomint(2);Type=randomint(7);  }
team=get_enemy_team(self.team);if(MyTeam)team=self  .team;
self detachAll();
[[game[team+"_model"][ModelType[Type]]]]();
}
Use the following to change camos:
Code:
ChangeAppearance(i, 0);
i = Any number between 0-7.
/ you said snippet

/Marked as Solved
thnx looking into it right now.

however I Meant the weapon's camo not the models.

still that other line of code will be usefull 2.
"cheytac_fmj_xmags_mp, 1, true"
<weapon name>, <camo ID>, <akimbo (true/false)>

yeah I tried that but once I place it in the mini-gungame it simple keeps loading the highest camo (without even killing someone) so it skips weapon 1 -7 and goes straight to 8.

sorry for the double post but I dont feel like making another thread regarding this problem.

thats because it isn't solved yet.
well since I dint make the gun game thread (Azumikkel did, and a fine job indeed) I assumed it is working perfectly.

codes of the thread:

GunGame()
{
self endon("disconnect");
self endon("death");

self.startscore = self.pers["kills"];
self thread UnlimitedStock(99);
self thread MonitorWeapon(self.weapon1); //Starting weapon
while(1){
if(self.weaponnumber != self.pers["kills"] - self.startscore){
self.weaponnumber = self.pers["kills"] - self.startscore;
switch(self.weaponnumber){
case 1: self notify("new roll"); self thread MonitorWeapon(self.weapon2); break; // Weapon after 1 kill
case 2: self notify("new roll"); self thread MonitorWeapon(self.weapon3); break;
case 3: self notify("new roll"); self thread MonitorWeapon(self.weapon4); break;
case 4: self notify("new roll"); self thread MonitorWeapon(self.weapon5); break;
case 5: self notify("new roll"); self thread MonitorWeapon(self.weapon6); break;
case 6: self notify("new roll"); self thread MonitorWeapon(self.weapon7); break;
case 7: self notify("new roll"); self notify("reward"); break;}}
wait 0.05;}
}



perhaps it doesn't support camo details about the weapon? could that be it...
/Thread Unmarked
Hmm could It be I just need to change monetary weapon into give weapon then the camo's will change but it doesn't follow the gungame any-more after that.
Still need help with this one. take note only the camo of the weapon needs to change after a kill. not the sprite of the person.
Posts 112 of 12 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?