SA-MP Forums Archive
[SOLVED]bad weaponids praaablem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [SOLVED]bad weaponids praaablem (/showthread.php?tid=155325)



[SOLVED]bad weaponids praaablem - Buwla - 17.06.2010

I have made a
Код:
new WrongGuns [34] = { id,id,id };
Listed up 34 weapon ids
then i try to use
Код:
GetPlayerWeapon(playerid) == WrongGun)
But its not working ofc, so my question is, how can i get it to work?


Re: bad weaponids praaablem - cessil - 18.06.2010

use a loop to loop through and compare wronggun[x] to GetPlayerWeapon


Re: bad weaponids praaablem - Carlton - 18.06.2010

pawn Код:
for(new w = 0; w < WrongGuns; w ++ ){
   if(GetPlayerWeapon(playerid) == WrongGuns[w]) {
        ....
   }
}



Re: bad weaponids praaablem - Buwla - 18.06.2010

Thank you, works great.
Had to add [w] to the one above too.

Problem SOLVED.
Thanks.