27.11.2009, 07:01
Here, put this function at the bottom of your script.
This makes using a player name 'easier'.
Код:
stock PlayerName(playerid) { new name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, MAX_PLAYER_NAME); return name; }
Код:
new str[48];//put this in your command format(str,48,"%s is now AFK!",PlayerName(playerid); TextDrawSetString(IsAFK,str); TextDrawHideForAll(IsAFK); TextDrawShowForAll(IsAFK); SetTimer("HideTextTimer",5000,0);//optional
Код:
forward HideTextTimer();//optional public HideTextTimer() { TextDrawHideForAll(IsAFK); }