29.11.2011, 12:15
Try this:
Код:
new Text3D:AFKLabel[MAX_PLAYERS] // Add this ABOVE OnFilterScriptInit() or OnGameModeInit() public OnPlayerPause(playerid) { new name[MAX_PLAYER_NAME], string[44]; GetPlayerName(playerid, name, sizeof(name)); format(string, sizeof(string), "%s has Paused",name); AFKLabel[playerid] = Create3DTextLabel("Player is AFK",0xFFFF00AA,0,0,0,50,-1,1); Attach3DTextLabelToPlayer(AFKLabel[playerid], playerid, 0,0,0); SendClientMessageToAll(COLOR_LIGHTBLUE, string); return 0; } public OnPlayerUnPause(playerid) { new name[MAX_PLAYER_NAME], string[44]; GetPlayerName(playerid, name, sizeof(name)); format(string, sizeof(string), "%s has Returned",name); Delete3DTextLabel(AFKLabel[playerid]); SendClientMessageToAll(COLOR_LIGHTBLUE, string); return 0; }