04.01.2013, 19:02
how to make that it shows timer on command /time
Код:
CMD:time(playerid, params[]) { new Sati, Min, Sec, string[128]; gettime(Sati, Min, Sec); format(string, sizeof(string), "Sada je: %i sati, %i minuta i %i sekundi.", Sati, Min, Sec); SendClientMessage(playerid, COLOR_GREEN, string); return 1; }
Код:
JailTimer[id] = SetTimer("Unjail",time*60000, false);
Код:
public Unjail(playerid) { new string[128], ReturnName[MAX_PLAYER_NAME]; GetPlayerName(playerid, ReturnName, sizeof(ReturnName)); format(string, sizeof(string), "Pusteni ste na slobodu"); SendClientMessage(playerid, COLOR_RED, string); Jailed[playerid] = 0; SetPlayerInterior(playerid, 0); SetPlayerVirtualWorld(playerid, 0); SpawnPlayer(playerid); SetPlayerHealth(playerid, 100); KillTimer(JailTimer[playerid]); return 1; }