Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(strcmp(cmd, "/tazer", true) ==0 || strcmp(cmd, "/ta", true) ==0)
- {
- if(IsPlayerConnected(playerid))
- {
- if(gTeam[playerid] == 2 || IsACop(playerid))
- {
- if(IsPlayerInAnyVehicle(playerid))
- {
- SendClientMessage(playerid, COLOR_GREY, " Nemozete koristiti tazer dok ste u autu!");
- return 1;
- }
- if(KnockedDown[playerid] == 1)
- {
- SendClientMessage(playerid, COLOR_GREY, "Ne mozete zamahnuti kada ste vec oboreni.");
- return 1;
- }
- if(PlayerTied[playerid] == 1)
- {
- SendClientMessage(playerid, COLOR_GREY, " Vezani ste!");
- return 1;
- }
- if(ReduceTime[playerid] == 1)
- {
- SendClientMessage(playerid, COLOR_GREY, " Morate sacekati 5 sekundi pre ponovnog koriscenja ove komande !");
- return 1;
- }
- new suspect = GetClosestPlayer(playerid);
- if(IsPlayerConnected(suspect))
- {
- if(PlayerCuffed[suspect] > 0)
- {
- SendClientMessage(playerid, COLOR_GREY, " Igrac je vec tazovan/uhapsen!");
- return 1;
- }
- if(GetDistanceBetweenPlayers(playerid,suspect) < 5)
- {
- if(gTeam[suspect] == 2)
- {
- SendClientMessage(playerid, COLOR_GREY, " Ne mozete taznuti PD / FBI!");
- return 1;
- }
- if(IsPlayerInAnyVehicle(suspect))
- {
- SendClientMessage(playerid, COLOR_GREY, " Osumnjiceni je u autu, prvo ga izbacite!");
- return 1;
- }
- GetPlayerName(suspect, giveplayer, sizeof(giveplayer));
- GetPlayerName(playerid, sendername, sizeof(sendername));
- new randt = random(4)+1;
- if(randt == 1)
- {
- format(string, sizeof(string), "* %s puca sa svojim tazerom na %s-a, ali promasuje.", sendername ,giveplayer);
- ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- }
- else
- {
- format(string, sizeof(string), "* Tazovao vas je %s na 10 sekundi.", sendername);
- SendClientMessage(suspect, COLOR_WHITE, string);
- format(string, sizeof(string), "* Tazovali ste %s-a na 10 sekundi.", giveplayer);
- SendClientMessage(playerid, COLOR_WHITE, string);
- format(string, sizeof(string), "* %s puca tazerom na %s-a i pogadja ga.", sendername ,giveplayer);
- ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- GameTextForPlayer(suspect, "~r~Sokiran", 2500, 3);
- TogglePlayerControllable(suspect, 0);
- PlayerCuffed[suspect] = 0;
- PlayerCuffedTime[suspect] = 15;
- ReduceTime[playerid] = 1;
- SetTimerEx("ReduceTimer", 5000, false, "i", playerid);
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, " Nema nikoga u vasoj blizini!");
- return 1;
- }
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, " Niste Policajac / FBI!");
- }
- }//not connected
- return 1;
- }
- /// cu
- if(strcmp(cmd, "/cuff", true) == 0 || strcmp(cmd, "/cu", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- if(gTeam[playerid] == 2 || (OnDuty[playerid] == 1 && PlayerInfo[playerid][pMember] == 1 || OnDuty[playerid] == 1 && PlayerInfo[playerid][pLeader] == 1 || OnDuty[playerid] == 1 && PlayerInfo[playerid][pMember] == 2 || OnDuty[playerid] == 1 && PlayerInfo[playerid][pLeader] == 2 || OnDuty[playerid] == 1 && PlayerInfo[playerid][pMember] == 21 || OnDuty[playerid] == 1 && PlayerInfo[playerid][pLeader] == 21))
- {
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp)) {
- SendClientMessage(playerid, COLOR_WHITE, "USAGE: /cuff [Playerid/PartOfName]");
- return 1;
- }
- giveplayerid = ReturnUser(tmp);
- if(IsPlayerConnected(giveplayerid))
- {
- if(giveplayerid != INVALID_PLAYER_ID)
- {
- if(gTeam[giveplayerid] == 2 || IsACop(giveplayerid))
- {
- SendClientMessage(playerid, COLOR_GREY, " You can't Cuff Cops !");
- return 1;
- }
- if(PlayerCuffed[giveplayerid] > 0)
- {
- SendClientMessage(playerid, COLOR_GREY, " Player already Cuffed !");
- return 1;
- }
- if(WantedLevel[giveplayerid] < 1)
- {
- SendClientMessage(playerid, COLOR_GREY, " Igrac mora imati najmanje wanted level 1!");
- return 1;
- }
- if (PlayerCuffedTime[giveplayerid] < 1)
- {
- SendClientMessage(playerid, COLOR_GREY, " Igrac mora biti prvo tazovan!");
- return 1;
- }
- if (ProxDetectorS(8.0, playerid, giveplayerid))
- {
- if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GREY, "You cannot Cuff yourself!"); return 1; }
- {
- GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
- GetPlayerName(playerid, sendername, sizeof(sendername));
- format(string, sizeof(string), "* %s Vam je stavio lisice.", sendername);
- SendClientMessage(giveplayerid, COLOR_WHITE, string);
- format(string, sizeof(string), "* Stavili ste lisice igracu %s.", giveplayer);
- SendClientMessage(playerid, COLOR_WHITE, string);
- format(string, sizeof(string), "* %s je stavio lisice igracu %s, tako da ne moze da pobegne.", sendername ,giveplayer);
- ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- GameTextForPlayer(giveplayerid, "~r~Uhapseni ste", 2500, 3);
- TogglePlayerControllable(giveplayerid, 0);
- PlayerCuffed[giveplayerid] = 2;
- PlayerCuffedTime[giveplayerid] = 99999999999999;
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, " Igrac nije u Vasoj blizini !");
- return 1;
- }
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, " Igrac je offline !");
- return 1;
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, " Niste policajac / SAJ / Nacionalna garda !");
- }
- }
- return 1;
- }
Add Comment
Please, Sign In to add comment