Weird problem - 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: Weird problem (
/showthread.php?tid=275320)
Weird problem -
BuLLeT[LTU] - 09.08.2011
I solved my problem by myself.. I don't know how to explain very well but it because when i give weapon, player doesn't get it at the moment, he gets it after few hundred miliseconds, but UpdatePlayer function is called, so my weapon ammo in hand is 0 (because i don't have it, but PAmmo = 9000) so my script sets PAmmo = 0 because i don't have weapon.. and after that (after few hundred miliseconds) i get my weapon with full amo, but PAmmo = 0, so i get ban.
Re: Weird problem -
Jack Shred - 09.08.2011
I might've misunderstood but you could add if(PAmmo[playerid] > 1) to your script, so it'll only ban if the guns illegal and has ammo.