Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(strcmp(cmd, "/tazer", true) ==0)
- {
- new Float:health;
- if(IsPlayerConnected(playerid))
- {
- if(PlayerInfo[playerid][pPolice] >= 1 || PlayerInfo[playerid][pAci] == 1)
- {
- if(IsPlayerInAnyVehicle(playerid))
- {
- SendClientMessage(playerid, COLOR_GREY, "* You cannot use this while being in the Car.");
- return 1;
- }
- new suspect = GetClosestPlayer(playerid);
- if(IsPlayerConnected(suspect))
- {
- if(GetDistanceBetweenPlayers(playerid,suspect) < 5)
- {
- if(IsPlayerInAnyVehicle(suspect))
- {
- SendClientMessage(playerid, COLOR_GREY, "* Suspect is in a vehicle, get him out before you can taze him.");
- return 1;
- }
- if(OnDuty[playerid]==1)
- {
- GetPlayerName(suspect, giveplayer, sizeof(giveplayer));
- GetPlayerName(playerid, sendername, sizeof(sendername));
- format(string, sizeof(string), "* You were tazed by %s, you are numb for now.", sendername);
- SendClientMessage(suspect, COLOR_WHITE, string);
- format(string, sizeof(string), "* You tazed %s, he's numb now.", giveplayer);
- SendClientMessage(playerid, COLOR_WHITE, string);
- format(string, sizeof(string), "* %s shoots with his tazer at %s.", sendername ,giveplayer);
- ProxDetector(30.0, playerid, string, COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM);
- GameTextForPlayer(suspect, "~r~Shoked", 2500, 3);
- GetPlayerHealth(suspect,health);
- SetPlayerHealth(suspect, health - 8);
- ApplyAnimation(suspect, "CRACK", "crckdeth2", 4.299999, 1, 1, 1, 0, 15000);
- PlayerCuffed[suspect]=true;
- }
- else { SendClientMessage(playerid, COLOR_WHITE, "You must be on duty."); }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "* No-one is near you.");
- return 1;
- }
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "* You are not a Cop / ACI.");
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement