Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CMD:bega(playerid,params[])
- {
- if(IsJobFromLaw(PlayerDB[playerid][Job]))
- {
- new id;
- if(sscanf(params, "u", id))
- {
- UsageMessage(playerid,"* Pranešti žaidėjui, kad jis gaudomas policijos: /bega [V_P/ID]");
- }
- else
- {
- if(IsPlayerConnected(id))
- {
- if(id == playerid)
- {
- ErrorMsg(playerid,"* Šios komandos negalite naudoti ant savęs.");
- return 1;
- }
- if(PlayerDB[id][BEGA] == 1)
- {
- SetPlayerColor(id, GREY);
- new string[128];
- format(string, 128, "[Teisėsaugos racija] %s: atšaukiau %s gaudymą.",Vardas(playerid),Vardas(id));
- SendClientMessageToLaw(0xDFE009FF, string);
- PlayerDB[id][BEGA] = 0;
- PlayerDB[id][BegaLaiko] = 0;
- format(string, 128, "* [POLICIJA]: Jūsų gaudymas atšauktas policininko %s.", Vardas(playerid));
- SendClientMessage(id, ZALIA, string);
- }
- else
- {
- GameTextForPlayer(playerid,"~r~~h~ * [POLICIJA] jūs esate gaudomas,prašome tučtojau pasiduoti.",500,4);
- SetPlayerColor(id, BALTA);
- PlayerDB[id][BEGA] = 1;
- PlayerDB[id][BegaLaiko] = 0;
- format(PlayerDB[id][BegaUzdejesPareigunas],24,"%s",Vardas(playerid));
- new string[144];
- format(string, 144, "[TEISĖSAUGA] Pareigūnas %s: pastebėjau, kaip %s bėga nuo policijos, jis pažymėtas žemėlapyje raudonu tašku",Vardas(playerid),Vardas(id));
- new Float:Cords[3];
- GetPlayerPos(id, Cords[0], Cords[1], Cords[2]);
- foreach(new i : Player)
- {
- if(IsJobFromLaw(PlayerDB[i][Job]))
- {
- SendClientMessage(i, 0xDFE009FF, string);
- SetPlayerCheckpoint(i, Cords[0], Cords[1], Cords[2], 1.5);
- SetPlayerMapIcon(i, 90, Cords[0], Cords[1], Cords[2], 41, -1, MAPICON_GLOBAL);
- }
- }
- }
- }
- else
- {
- ErrorMsg(playerid,"Tokio žaidėjo nėra.");
- }
- }
- }
- else
- {
- ErrorMsg(playerid,"* Ši komanda tik teisėsaugai.");
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement