11.10.2014, 05:59
Show me both, /afk and the line where it has IsPlayerAfk[MAX_PLAYERS];
And here's the fixed command:
Why don't use put brackets? I've noticed that in all of your scripting help topics.
And here's the fixed command:
pawn Код:
CMD:back(playerid,params[])
{
if(IsPlayerAfk[playerid] == 0) return SendClientMessage(playerid, -1, "{FF0000}[SERVER]{ffffff}:You are not AFK");
else
{
TogglePlayerControllable(playerid, 1);
IsPlayerAfk[playerid] == 0;
}
return 1;
}
pawn Код:
CMD:afk(playerid, params[])
{
if(IsPlayerAfk[playerid] == 0)
{
TogglePlayerControllable(playerid, 0);
GameTextForPlayer(playerid, "~g~AFK",5000,3);
IsPlayerAfk[playerid] = 1;
}
else
{
SendClientMessage(playerid, -1, "You are already AFK");
}
return 1;
}