Doesn't find the weapon. - 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: Doesn't find the weapon. (
/showthread.php?tid=207659)
Doesn't find the weapon. -
KaleOtter - 06.01.2011
Ewaah!
Here is my code.
I got at slot 3 a spas12(27)
But when I use this cmd it doesn't work.
The pS[Weapon][All] is 27 but the weapon[All] stays on 0.
Somebody know why? Did I use the getplayerweapondata wrong?
Код:
if (strcmp("/test", cmdtext, true, 10) == 0)
{
new ammo,weapon[13];
for (new All=0; All<13; All++)
{
GetPlayerWeaponData(playerid, All, weapon[All], ammo);
if(pS[Weapon][All] != weapon[All])
{
return SendClientOOCMessage(playerid,"Hacked weapon found!");
}
}
return 1;
}
Edit: wierd, the player gets the weapons at onplayerspawn, when I use /test it says hacked weapon found, but when I scroll with my weapons and use /test again, it doesn't say something so it works 50/50 ...