13.03.2015, 21:03
I'll just post the whole command
Код:
CMD:jail(playerid,params[]) { if(pInfo[playerid][pAdminLevel] >= 1) { new id,time,reason[100],szString[150]; if(sscanf(params,"dds",id,time,reason)) return SendClientMessage(playerid, -1, "*"COL_WHITE" /jail [playerid] [time] [reason]"); if(!IsPlayerConnected(id)) return SendClientMessage(playerid, -1,"*"COL_RED" Player is not connected."); if(Jailed[id] == 1) return SendClientMessage(playerid, -1, "*"COL_RED" Player is already jailed."); format(szString, sizeof(szString), "AdmSys-: %s (ID:%d) has been jailed for %d minutes; Reason: %s", PlayerName, id, time, reason); SendClientMessageToAll(-1, szString); GetPlayerName(id, PlayerName, sizeof(PlayerName)); GetPlayerName(playerid, GetPlayerName, sizeof(GetPlayerName)); SetPlayerInterior(id, 3); SetPlayerVirtualWorld(id, 10); SetPlayerFacingAngle(id, 360.0); SetPlayerPos(id, 197.5662, 175.4800, 1004.0); SetPlayerHealth(id, 9999999999.0); ResetPlayerWeapons(id); JailTimer[id] = SetTimerEx("Unjail",time*60000, false, "i", id); } else{ return 0; } return 1; }