SA-MP Forums Archive
NPC is not playing Animation - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: NPC is not playing Animation (/showthread.php?tid=317186)



NPC is not playing Animation - Hoborific - 10.02.2012

I have preloaded the animation library onplayerconnect

pawn Код:
ApplyAnimation(playerid, "CRACK", "null", 0.0, 0, 0, 0, 0, 0);
I've sent the animation to play it OnPlayerSpawn
pawn Код:
if(strcmp(name,"Hobo1",true)!=0)
        {
            SetPlayerSkin(playerid, 230);
            ApplyAnimation(playerid,"CRACK","crckidle2",1,0,0,0,0,0,1);
        }
Yet the NPC doesn't play the animation e.e


Re: NPC is not playing Animation - Hoborific - 10.02.2012

Bump back onto first page, \_/ <-- Cup of how much I give a fuck for 12 hours.

Oh look, it's empty.


Re: NPC is not playing Animation - KingHual - 10.02.2012

Does the NPC's skin change to the desired one?


Re: NPC is not playing Animation - Hoborific - 10.02.2012

Yes.


Re: NPC is not playing Animation - [Diablo] - 10.02.2012

try this.

pawn Код:
if(strcmp(name,"Hobo1",true)!=0)
{
    SetPlayerSkin(playerid, 230);
    ApplyAnimation(playerid, "CRACK", "crckidle2", 4.0, 0, 0, 0, 0, 0);
}



Re: NPC is not playing Animation - Hoborific - 10.02.2012

so you want me to change the delta and remove the force anim? alright worth a try.

EDIT: Nope didn't work.


Re: NPC is not playing Animation - admantis - 10.02.2012

This is happening to me to, I will give +rep (isn't that what people wants?). I've thought it is caused by the recording.. but not sure.


Re: NPC is not playing Animation - Hoborific - 10.02.2012

I will also give rep++ to whoever finds us a solution to this problem.


Re: NPC is not playing Animation - Psymetrix - 10.02.2012

The last time I tried this, I added the animation code under OnPlayerUpdate.

pawn Код:
public OnPlayerUpdate(playerid) {
    if (IsPlayerNPC(playerid)) {
        ApplyAnimation(playerid, "CRACK", "crckidle2", 4.0, 0, 0, 0, 0, 0);
    }
    return 1;
}
That is the only way I can remember getting it to work.

P.s. I'm not a fan of how the current NPC system works.


Re: NPC is not playing Animation - [LoF]Zak - 10.02.2012

Try setting the ApplyAnimation twice.