Advertisement
Guest User

/jail

a guest
Feb 10th, 2013
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.16 KB | None | 0 0
  1. if(!strcmp(cmdtext, "/jail", true,5))
  2. {
  3. new vardas[MAX_PLAYER_NAME],prz[128];
  4. strmid(vardas,GetArgument(1, cmdtext,0),0,MAX_PLAYER_NAME);
  5. if(!strcmp(vardas, "0", true) ){SendClientMessage(playerid, BLUE, "{FFFFFF}[ {00C0FF}JAIL {FFFFFF}]: Naudojimas: /jail [dalis vardo] [sekundės]"); return 1;}
  6. new id = GetPlayeridMid(vardas);
  7. if (id == INVALID_PLAYER_ID){ SendClientMessage(playerid, RED, "{FFFFFF}[ {00C0FF}JAIL {FFFFFF}]: Serveryje,tokio žaidėjo nėra."); return 1;}
  8.  
  9. if (playerDB[id][ikalintas]) {SendClientMessage(playerid, RED, "{FFFFFF}[ {00C0FF}JAIL {FFFFFF}]: Žaidėjas jau kalėjime."); return 1;}
  10. if (playerDB[id][adminlvl] == 5){ SendClientMessage(playerid, BLUE, "{FFFFFF}[ {00C0FF}ADMIN {FFFFFF}]: Sąvininko pasodinti už grotų negalima"); return 1;}
  11. if (playerDB[id][adminlvl] == 4){ SendClientMessage(playerid, BLUE, "{FFFFFF}[ {00C0FF}ADMIN {FFFFFF}]: Padėjėjo pasodinti už grotų negalima"); return 1;}
  12. if (playerDB[id][adminlvl] == 3){ SendClientMessage(playerid, BLUE, "{FFFFFF}[ {00C0FF}ADMIN {FFFFFF}]: III lygio administratoriaus pasodinti už grotų negalima"); return 1;}
  13.  
  14. strmid(prz,GetArgument(2, cmdtext,true),0,128);
  15. if(!IsNumeric(prz)){SendClientMessage(playerid, RED, "{FFFFFF}[ {00C0FF}JAIL {FFFFFF}]: Laikas nurodytas neteisingai."); return 1;}
  16. new kaleiman = StringToInt(prz);
  17. new msg[128];
  18. GetPlayerName(id,vardas,sizeof(vardas));
  19. playerDB[id][kalejimo_laikas] = kaleiman;
  20. SetPlayerInterior(id,10);
  21. JailPlayer(id,227.3138,108.9786,999.0156,0,playerDB[id][kalejimo_laikas]*1000,10,-1597.6338,716.4904,11.7759,341.3682,0,true);
  22. format(msg,sizeof(msg),"{FFFFFF}[ {6EF83C}POLICIJA {FFFFFF}]: Jūs buvote sulaikytas policijos pareigūno nenaudojant smurto, todėl bausmė pamažinta. %i sek kalejime.",playerDB[id][kalejimo_laikas]);
  23. SendClientMessage(id,COLOR,msg);
  24. LikoSedeti(id);
  25. format(msg,sizeof(msg),"{FFFFFF}[ {00C0FF}JAIL {FFFFFF}]: Įkalinote %s (%is).",vardas,kaleiman);
  26. SendClientMessage(id,RED,"{FFFFFF}[ {00C0FF}JAIL {FFFFFF}]: Jūs buvote įkalintas administratoriaus.");
  27. SendClientMessage(playerid,GREEN,msg);
  28. if(playerDB[id][vedelogin]){SavePlayerData(id,false);}
  29. return 1;
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement