Little help about ApplyAnimation
#1

I am making teargas system for a tdm server, it works but i got a problem with the choking animation.
When an enemy teargases someone, the player who got teargas'ed can see the animation but not others.

Here's the code for the teargas system
PHP код:
public OnPlayerKeyStateChange(playeridnewkeysoldkeys)
{
     if(
GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
    {
        if(
pressed(KEY_FIRE))
        {
            if(
GetPlayerWeapon(playerid) == 17)
            {
                new 
Float:xFloat:yFloat:z;
                
GetPlayerPos(playeridxyz);
                foreach(
Playeri)
                {
                    if(
IsPlayerInRangeOfPoint(i7.0xyz))
                    {
                        if(
== playerid) continue;
                        if(
GetPVarInt(i"mask") == 0)
                        {
                            if(
pInfo[i][pTeam] == pInfo[playerid][pTeam]) continue;
                            
ApplyAnimation(i"ped""gas_cwr"4.1000050000);
                        }
                    }
                }
            }
        }
    }
    return 
1;

I tried loading the animlib like this

PHP код:
PreloadAnimLib(playeridanimlib[])
{
    
ApplyAnimation(playerid,animlib,"null",0.0,0,0,0,0,0);
}
public 
OnPlayerSpawn(playerid)
{
    
PreloadAnimLib(playerid"ped");
    return 
1;

But it's still not working, what am i doing wrong here?
Reply


Messages In This Thread
Little help about ApplyAnimation - by Sjn - 12.10.2015, 16:48
Re: Little help about ApplyAnimation - by Mikkel_RE - 12.10.2015, 19:32
Re: Little help about ApplyAnimation - by Sjn - 13.10.2015, 15:45
Re: Little help about ApplyAnimation - by Unte99 - 13.10.2015, 15:55
Re: Little help about ApplyAnimation - by PrO.GameR - 13.10.2015, 16:32
Re: Little help about ApplyAnimation - by Sjn - 13.10.2015, 17:01
Re: Little help about ApplyAnimation - by PrO.GameR - 13.10.2015, 17:23
Re: Little help about ApplyAnimation - by Luicy. - 13.10.2015, 17:53
Re: Little help about ApplyAnimation - by Sjn - 14.10.2015, 09:51

Forum Jump:


Users browsing this thread: 1 Guest(s)