30.01.2013, 18:40
So, I've downloaded an include, which allows me to use OnPlayerShootPlayer. So I've made a tazersystem using that. It works fine, only the animation won't work. When you taze the player, he'll just freeze, with no animation.
Can anybody help me with this?
My OnPlayerShootPlayer:
My ApplyAnimation:
Thanks in advance.
Can anybody help me with this?
My OnPlayerShootPlayer:
pawn Code:
public OnPlayerShootPlayer(Shooter,Target,Float:HealthLost,Float:ArmourLost)
{
if(PlayerInfo[Shooter][pFaction] == 1 || PlayerInfo[Shooter][pFaction] == 6)
{
if(GetPlayerWeapon(Shooter) == 23)
{
new string[180];
TogglePlayerControllable(Target, false);
ApplyAnimation(Target,"CRACK","crckdeth2",4.1,1,1,1,10000,1);
pTazed[Target] = 1;
SetTimerEx("Tazed", 10000, 0, "d", Target);
format(string, sizeof(string), "* %s aims their tazer on %s and tazes them.", GetName(Shooter), GetName(Target));
ProxDetector(30.0, Shooter, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
SendClientMessage(Target, COLOR_LIGHTBLUE, "You've been tazed for 10 seconds!");
format(string,sizeof(string), "You've succesfully tazed %s.", GetName(Target));
SendClientMessage(Shooter, COLOR_LIGHTBLUE, string);
}
}
return 1;
}
pawn Code:
ApplyAnimation(Target,"CRACK","crckdeth2",4.1,1,1,1,10000,1);