18.05.2014, 09:50
Solution;
Код:
dcmd_jail (playerid, params[]) { new giveid, time, str[128], jailtimer; if (!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "You can't use this cmd."); if (sscanf(params, "ui", giveid, time)) return SendClientMessage(playerid, -1, "USAGE: /jail [ID] [TimeInMilliSeconds]"); if (giveid == INVALID_PLAYER_ID) return SendClientMessage(playerid, -1, "Invalid player ID!"); CagePlayer(giveid); format(str, sizeof(str), "You are now jailed for %i milliseconds!", time); SendClientMessage(giveid, -1, str); jailtimer = SetTimerEx("UnJailPlayer", time, false, "i", giveid); return 1; }