afk command help
#3

dude ... TogglePlayerControllable(playerid,0) will always return 1 that is true and so you will always get that message .......... You have to create a variable at the stating like
Код:
new bool:IsPlayerFreezed[MAX_PLAYERS]=false;
And the place where you have your afk code .... add something like this
Код:
IsPlayerFreezed[playerid]=true;
now you can run it like this
Код:
if (IsPlayerFreezed[playerid])) return SendClientMessage(playerid,0xFF000FFF,"You are already freezed");
// Below this goes your BACK code //////
// add this one in BACK code too //
IsPlayerFreezed[playerid]=false;
TogglePlayerControllable(playerid,1);
SendClientMessage(playerid,0xFF000FFF,"You have been un-freezed");
return 1;
Thank You
Abhinav

Reply


Messages In This Thread
afk command help - by Idan_McCartney - 24.06.2009, 09:56
Re: afk command help - by MenaceX^ - 24.06.2009, 09:58
Re: afk command help - by abhinavdabral - 24.06.2009, 10:08

Forum Jump:


Users browsing this thread: 2 Guest(s)