21.08.2014, 17:04
i have SD pistol tazer, i edited to object id 18642 and added
but i can't taze somone if i don't holding a gun with the tazer, i must /tazer and hold an gun.
can anyone help me?
Код:
ApplyAnimation(playerid,"KNIFE","knife_3",4.1,0,1,1,0,0,1);
can anyone help me?
Код:
new playerid, playerb; if(Tazer[playerid] == 1) { if(!IsPlayerTazed(Target) && !IsPlayerCuffed(Target) && !IsPlayerTied(Target)) { new Float:HP, Float:Armor; GetPlayerHealth(Target, HP); GetPlayerArmour(Target, Armor); SetPlayerHealth(Target, HealthLost+HP); SetPlayerArmour(Target, ArmourLost+Armor); if(!IsPlayerNearPlayer(Shooter, Target, 12)) return SendClientMessage(Shooter, COLOR_GREY, "You are too far away from that player."); //if(IsHoldingFirearm(Target)) return SendClientMessage(Shooter, COLOR_GREY, "You can't taze someone with a gun in hand."); // Got Tazed format(string, sizeof(string), "* %s aims their tazer on %s and tazes them.", RPN(Shooter), RPN(Target)); SendNearbyMessage(Shooter, 15, string, COLOR_LIGHTBLUE, COLOR_LIGHTBLUE, COLOR_LIGHTBLUE, COLOR_LIGHTBLUE, COLOR_LIGHTBLUE); GameTextForPlayer(Target, "~r~Tazed", 3500, 3); // Custom Freeze ApplyAnimation(Target,"CRACK","crckdeth2",4.1,0,1,1,1,1,1); TogglePlayerControllable(Target, 0); // Tazed Detecting TogglePlayerTazed(Target, 2); // Tazer Timeout TazeTimeout[Target] = 11; TazeCountDown[Target] = SetTimerEx("TazeTimer", 1000, true, "d", Target); } } }