29.09.2018, 15:02
Код:
new RESPAWN_COUNT[MAX_PLAYERS] = 0; public OnPlayerConnect(playerid) { RESPAWN_COUNT[playerid] = 0; // reseting variable. if(RESPAWN_COUNT[playerid] == 0) { RESPAWN_COUNT[playerid] = 10; // setting respawn count to 10 seconds playertimer[playerid] = SetTimerEx("RespawnCount", 1000, true, "i", playerid); } return 1; } public RespawnCount(playerid) { RESPAWN_COUNT[playerid] --; //decreases the count every 1 secoond. (10, 9, 8...,0) if(RESPAWN_COUNT[playerid] == 0) { KillTimer(playertimer[playerid]); } else { new str[32]; format(str, sizeof(str), "RESPAWN IN %d", RESPAWN_COUNT[playerid]); TextDrawSetString(TDEditor_TD[1],str); } return 1; }