Variable Problem
#1

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!");
Reply
#2

It should be
pawn Код:
if(!(planted[playerid])) return SendClientMessage(playerid,ERROR,"[INFO]Bomb is not planted!");
And also show me your bomb plant code.
Reply
#3

Gonna test this if it wont work i will post the full plant code
Reply
#4

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] )
Reply
#5

Works thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)