13.04.2012, 15:03
dude one minute please see that u add new Text3D:afk[MAX_PLAYERS]; at top then what mistake you have done is
you have added new "Text3D:afk" in the command /afk. just remove the new
heres the code
Hope It Helped
you have added new "Text3D:afk" in the command /afk. just remove the new
heres the code
pawn Code:
new Text3D: afk[MAX_PLAYERS]; // at your top of script
COMMAND:afk(playerid, params[])
{
new string[128], playerName[MAX_PLAYER_NAME];
GetPlayerName(playerid, playerName, MAX_PLAYER_NAME);
format(string, sizeof(string), "SERVER:%s is now in afk mode!", playerName);
SendClientMessageToAll(blue, string);
Text3D:afk = Create3DTextLabel("Player is afk!", 0x008080FF, 30.0, 40.0, 50.0, 40.0, 0);
Attach3DTextLabelToPlayer(afk, playerid, 0.0, 0.0, 0.7);
TogglePlayerControllable(playerid, 0);
return 1;
}
COMMAND:back(playerid, params[])
{
new string[128], playerName[MAX_PLAYER_NAME];
GetPlayerName(playerid, playerName, MAX_PLAYER_NAME);
format(string, sizeof(string), "SERVER:%s has came back from being afk!", playerName);
SendClientMessageToAll(blue, string);
TogglePlayerControllable(playerid, 1);
DeletePlayer3DTextLabel(playerid, Text3D:afk);
return 1;
}