Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CMD:aresztuj(playerid, params[])
- {
- new giveid, time;
- if(pInfo[playerid][Gang] != PD_ID && GetPVarInt(playerid, "AdminLvl") < ADMIN_LVL_ADMIN)
- SendClientMessage(playerid, C_RED, "Nie jesteś policjantem.");
- else if(sscanf(params, "ud", giveid, time))
- SendClientMessage(playerid, C_RED, "Użyj /aresztuj [ID gracza/Nazwa] [Czas w sekundach]");
- else if(pInfo[giveid][Gang] == PD_ID && GetPVarInt(playerid, "AdminLvl") < ADMIN_LVL_ADMIN)
- SendClientMessage(playerid, C_RED, "Nie możesz aresztować innego policjanta!");
- else if((time < 15 || time > 240) && (GetPVarInt(playerid, "AdminLvl") < ADMIN_LVL_ADMIN))
- SendClientMessage(playerid, C_RED, "Minimalny czas to 15 sekund, a maksymalny to 240 sekund.");
- else
- {
- SetPlayerVirtualWorld(giveid, JAIL_VW);
- SetPlayerInterior(giveid, JAIL_INTERIOR);
- SetPlayerPos(giveid, JailPos[0], JailPos[1], JailPos[2]);
- SetPlayerFacingAngle(giveid, JailPos[3]);
- SetTimerEx("UnJailPlayer", time*1000, false, "d", giveid);
- new msg[128];
- format(msg, sizeof msg, "Wsadziłeś %s do więzienia na %d sekund!", pInfo[giveid][Name], time);
- SendClientMessage(playerid, C_LIGHTGREEN, msg);
- format(msg, sizeof msg, "Policjant %s wsadził Cię do więzienia na %d sekund!", pInfo[playerid][Name], time);
- SendClientMessage(giveid, C_GREEN, msg);
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement