03.01.2013, 20:08
I want that in /time write how much Im jailed:
Код:
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); format(string, sizeof(string), "Joљ ste zatvoreni %s minuta", Unjail); SendClientMessage(playerid, COLOR_GREEN, string); return 1; }
Код:
CMD:prison(playerid,params[]) { new Random = random(sizeof(AreaSpawns)); new id,time,reason[100],GPlayerName[MAX_PLAYER_NAME], string[128]; if(PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid, COLOR_WHITE, ""#COL_RED"| "COL_LIGHTBLUE"WS:DM "#COL_RED"| "#COL_WHITE"Niste ovlasteni za ovu komandu"); if(sscanf(params,"uds",id,time,reason)) return SendClientMessage(playerid, COLOR_RED, "/prison <playerid> <time> <reason>"); if (!IsPlayerConnected(id)) return SendClientMessage(playerid, COLOR_RED, ""#COL_RED"| "COL_LIGHTBLUE"WS:DM "#COL_RED"| "#COL_WHITE"Igrac nije na serveru"); if(PlayerInfo[id][pAdmin] > PlayerInfo[playerid][pAdmin])return SendClientMessage(playerid,COLOR_RED,""#COL_RED"| "COL_LIGHTBLUE"WS:DM "#COL_RED"| "#COL_WHITE"Nemozes zatvoriti veci Admin Level"); if(Jailed[id] == 1)return SendClientMessage(playerid,COLOR_RED,"Igrac je vec u zatvoru"); { GetPlayerName(playerid, GPlayerName, sizeof(GPlayerName)); format(string, sizeof(string), "Zatvoren si na %d minuta; Razlog: %s", time, reason); SendClientMessage(playerid, COLOR_RED, string); format(string, sizeof(string), "Admin %s je zatvorio igraca %s (ID:%d) na %s minuta; Razlog: %s", GPlayerName, PlayerName(id), id, time, reason); SendAdminMessage(1, COLOR_CHARTREUSE, string); Jailed[id] = 1; AC_BS_SetPlayerInterior(id, 0); AC_BS_SetPlayerVirtualWorld(id, 0); SetPlayerFacingAngle(id, 360.0); AC_BS_SetPlayerPos(id, AreaSpawns[Random][0], AreaSpawns[Random][1], AreaSpawns[Random][2]); ResetPlayerWeapons(id); JailTimer[id] = SetTimer("Unjail",time*60000, false); } return 1; }