NPC 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 Animation (
/showthread.php?tid=426427)
NPC Animation -
Pawnie - 29.03.2013
Ay guys, well can anyone show me how to apply animation on a NPC that will be constant? (Constant loop)
This is my current code. But the animation wont work at all.
Код:
if(IsPlayerNPC(playerid))
{
new npcname[MAX_PLAYER_NAME];
GetPlayerName(playerid, npcname, sizeof(npcname));
if(!strcmp(npcname, "Drug_D_Main", true))
{
SetPlayerSkin(playerid, 113);
ApplyAnimation(playerid,"PAULNMAC", "wank_loop", 1.800001, 1, 0, 0, 1, 600);
}
return 1;
}
Also I tried with:
Main GM Script:
Код:
CMD:crossarms(playerid, params[])
{
ApplyAnimation(playerid,"PAULNMAC", "wank_loop", 1.800001, 1, 0, 0, 1, 600);
return 1;
}
NPC script
Код:
public OnPlayerStreamIn(playerid)
{
SendCommand("/crossarms");
return 1;
}
Re: NPC Animation -
Jstylezzz - 29.03.2013
So, it doesn't work even if you do it?
Make sure the animlib and animation name are correctly, and apply the animation twice.
pawn Код:
CMD:crossarms(playerid, params[])
{
ApplyAnimation(playerid,"PAULNMAC", "wank_loop", 1.800001, 1, 0, 0, 1, 600);
ApplyAnimation(playerid,"PAULNMAC", "wank_loop", 1.800001, 1, 0, 0, 1, 600);//apply it twice!
return 1;
}
Re: NPC Animation -
Pawnie - 29.03.2013
The issue is that it works for the player itself, but it wont work on the NPC.
When you type /crossarms in game it will work perfectly but the NPC wont be playing any animations at all.