09.03.2014, 23:39
Код:
CMD:jail(playerid, params[]) { if(PlayerInfo[playerid][pAdmin] <= 4) return 1; new targetid, minutes, reason[64], str[128]; if(sscanf(params, "riS[64]", targetid, minutes, reason)) return SendClientMessage(playerid, -1, "USAGE: /jail [id] [minutes] [reason]"); else { format(str, sizeof(str), "AdmCmd: Administrator %s has jailed %s for %d minutes. Reason: %s", Name(playerid), Name(targetid), minutes, reason); JailTimer[targetid] = SetTimer("Unjail", minutes*1000*60, false); SetPlayerInterior(targetid, 6); SetPlayerPos(targetid, 264.4176, 77.8930, 1001.0391); PlayerInfo[targetid][pJailed] = 1; SendClientMessageToAll(0xFF0000FF, str); SetPlayerHealth(targetid, 9999); GameTextForPlayer(targetid, "Welcome to AJAIL!", 5000, 6); new path[32]; format(path, sizeof(path), "/Users/%s.ini", playerid); new INI:i = INI_Open(path); INI_WriteString(i, "test", str); INI_Close(i); } return 1; }