Advertisement
Guest User

Untitled

a guest
Sep 23rd, 2017
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.34 KB | None | 0 0
  1. CMD:aresztuj(playerid, params[])
  2. {
  3. new giveid, time;
  4.  
  5. if(pInfo[playerid][Gang] != PD_ID && GetPVarInt(playerid, "AdminLvl") < ADMIN_LVL_ADMIN)
  6. SendClientMessage(playerid, C_RED, "Nie jesteś policjantem.");
  7. else if(sscanf(params, "ud", giveid, time))
  8. SendClientMessage(playerid, C_RED, "Użyj /aresztuj [ID gracza/Nazwa] [Czas w sekundach]");
  9. else if(pInfo[giveid][Gang] == PD_ID && GetPVarInt(playerid, "AdminLvl") < ADMIN_LVL_ADMIN)
  10. SendClientMessage(playerid, C_RED, "Nie możesz aresztować innego policjanta!");
  11. else if((time < 15 || time > 240) && (GetPVarInt(playerid, "AdminLvl") < ADMIN_LVL_ADMIN))
  12. SendClientMessage(playerid, C_RED, "Minimalny czas to 15 sekund, a maksymalny to 240 sekund.");
  13. else
  14. {
  15. SetPlayerVirtualWorld(giveid, JAIL_VW);
  16. SetPlayerInterior(giveid, JAIL_INTERIOR);
  17. SetPlayerPos(giveid, JailPos[0], JailPos[1], JailPos[2]);
  18. SetPlayerFacingAngle(giveid, JailPos[3]);
  19. SetTimerEx("UnJailPlayer", time*1000, false, "d", giveid);
  20.  
  21. new msg[128];
  22. format(msg, sizeof msg, "Wsadziłeś %s do więzienia na %d sekund!", pInfo[giveid][Name], time);
  23. SendClientMessage(playerid, C_LIGHTGREEN, msg);
  24.  
  25. format(msg, sizeof msg, "Policjant %s wsadził Cię do więzienia na %d sekund!", pInfo[playerid][Name], time);
  26. SendClientMessage(giveid, C_GREEN, msg);
  27. }
  28. return 1;
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement