Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(!strcmp(cmdtext, "/jail", true,5))
- {
- new vardas[MAX_PLAYER_NAME],prz[128];
- strmid(vardas,GetArgument(1, cmdtext,0),0,MAX_PLAYER_NAME);
- if(!strcmp(vardas, "0", true) ){SendClientMessage(playerid, BLUE, "{FFFFFF}[ {00C0FF}JAIL {FFFFFF}]: Naudojimas: /jail [dalis vardo] [sekundės]"); return 1;}
- new id = GetPlayeridMid(vardas);
- if (id == INVALID_PLAYER_ID){ SendClientMessage(playerid, RED, "{FFFFFF}[ {00C0FF}JAIL {FFFFFF}]: Serveryje,tokio žaidėjo nėra."); return 1;}
- if (playerDB[id][ikalintas]) {SendClientMessage(playerid, RED, "{FFFFFF}[ {00C0FF}JAIL {FFFFFF}]: Žaidėjas jau kalėjime."); return 1;}
- if (playerDB[id][adminlvl] == 5){ SendClientMessage(playerid, BLUE, "{FFFFFF}[ {00C0FF}ADMIN {FFFFFF}]: Sąvininko pasodinti už grotų negalima"); return 1;}
- if (playerDB[id][adminlvl] == 4){ SendClientMessage(playerid, BLUE, "{FFFFFF}[ {00C0FF}ADMIN {FFFFFF}]: Padėjėjo pasodinti už grotų negalima"); return 1;}
- if (playerDB[id][adminlvl] == 3){ SendClientMessage(playerid, BLUE, "{FFFFFF}[ {00C0FF}ADMIN {FFFFFF}]: III lygio administratoriaus pasodinti už grotų negalima"); return 1;}
- strmid(prz,GetArgument(2, cmdtext,true),0,128);
- if(!IsNumeric(prz)){SendClientMessage(playerid, RED, "{FFFFFF}[ {00C0FF}JAIL {FFFFFF}]: Laikas nurodytas neteisingai."); return 1;}
- new kaleiman = StringToInt(prz);
- new msg[128];
- GetPlayerName(id,vardas,sizeof(vardas));
- playerDB[id][kalejimo_laikas] = kaleiman;
- SetPlayerInterior(id,10);
- 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);
- 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]);
- SendClientMessage(id,COLOR,msg);
- LikoSedeti(id);
- format(msg,sizeof(msg),"{FFFFFF}[ {00C0FF}JAIL {FFFFFF}]: Įkalinote %s (%is).",vardas,kaleiman);
- SendClientMessage(id,RED,"{FFFFFF}[ {00C0FF}JAIL {FFFFFF}]: Jūs buvote įkalintas administratoriaus.");
- SendClientMessage(playerid,GREEN,msg);
- if(playerDB[id][vedelogin]){SavePlayerData(id,false);}
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement