Variable 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)
+--- Thread: Variable Problem (
/showthread.php?tid=316478)
Variable Problem -
SpiderWalk - 07.02.2012
Hello everybody.Yesterday i was created Bomb checkpoint and variables..It was working but i get one small bug when bomb is planted and you are SWAT also want to defuse it you cant becouse it write "[INFO]BOmb is not planted".But its planted...How to fix it
Here is code which i think is bugging
pawn Код:
if(planted[playerid] == 1) return SendClientMessage(playerid,ERROR,"[INFO]Bomb is not planted!");
Re: Variable Problem - T0pAz - 07.02.2012
It should be
pawn Код:
if(!(planted[playerid])) return SendClientMessage(playerid,ERROR,"[INFO]Bomb is not planted!");
And also show me your bomb plant code.
Re: Variable Problem -
SpiderWalk - 07.02.2012
Gonna test this if it wont work i will post the full plant code
Re: Variable Problem -
Wesley221 - 07.02.2012
Now youre checking if the bomb is planted, and if its planted you send the message. You should check if its 0 (or just !)
pawn Код:
if(planted[playerid] == 0)
if( !planted[playerid] )
Re: Variable Problem -
SpiderWalk - 07.02.2012
Works thanks