Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(strcmp(cmd, "/tazer", true) ==0 || strcmp(cmd, "/ta", true) ==0)
- {
- new suspect;
- if(IsPlayerConnected(playerid))
- {
- if(gTeam[playerid] == 2 || IsACop(playerid))
- {
- if(IsPlayerInAnyVehicle(playerid))
- return SendClientMessage(playerid, COLOR_GREY, " Vous ne pouvez pas visé a travers une voiture");
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- suspect = GetClosestPlayer(playerid);
- }
- else
- {
- suspect = ReturnUser(tmp);
- }
- if(IsPlayerConnected(suspect))
- {
- if(PlayerCuffed[suspect] > 0)
- {
- SendClientMessage(playerid, COLOR_GREY, " Cette homme est menotter !");
- return 1;
- }
- if(GetDistanceBetweenPlayers(playerid,suspect) < 5)
- {
- /*if(gTeam[suspect] == 2)
- {
- SendClientMessage(playerid, COLOR_GREY, " Vous pouvez pas tazer un coéquipier !");
- return 1;
- }*/
- if(IsPlayerInAnyVehicle(suspect))
- {
- SendClientMessage(playerid, COLOR_GREY, " Suspect embarqué !");
- 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 tire au tazer sur %s,mais rate son tire.", sendername ,giveplayer);
- ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- }
- else
- {
- format(string, sizeof(string), "* Vous êtes tazer par l'agent %s pendant 20 seconds.", sendername);
- SendClientMessage(suspect, COLOR_WHITE, string);
- format(string, sizeof(string), "* Vous avez tazer %s pendant 20 seconds.", giveplayer);
- SendClientMessage(playerid, COLOR_WHITE, string);
- format(string, sizeof(string), "* %s tire avec son tazeur sur %s et le taze !.", sendername ,giveplayer);
- ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- GameTextForPlayer(suspect, "~r~Tazer", 2500, 3);
- TogglePlayerControllable(suspect, 0);
- LoopingAnim(suspect, "PED","FLOOR_hit_f", 4.0, 1, 0, 0, 0, 0);
- PlayerCuffedTime[suspect] = 20;
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, " Personne a coté de vous");
- return 1;
- }
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, " Vous n'etez pas un Flic !");
- }
- }//not connected
- return 1;
- }
Add Comment
Please, Sign In to add comment