SA-MP Forums Archive
NPC Animations - 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 Animations (/showthread.php?tid=511054)



NPC Animations - vannesenn - 03.05.2014

Hi guys
I record NPC. While I recorded NPC I used animations(like /sit, /push etc) and when I connect NPC, I don't see animation, only walking, jumping etc.

How I can fix this?

Thanks You


Re: NPC Animations - XK - 03.05.2014

well the npc does the same thing you do,did you try to record it using npc_record?because i have tried to make one and animations worked with npc_record


Re: NPC Animations - vannesenn - 03.05.2014

Yes, maybe is problem in my anim CMD.

Код:
CMD:vomit(playerid, params[])
{
	new bool:anim_id;
	if(sscanf(params, "d", anim_id))
	{
		return SendClientMessage(playerid, BOJA_BIJELA, ""KORISTENJE" /vomit [Animacija(0-1)]");
	}

	if(anim_id == false)
	{
		return CustomAnimationForPlayer(playerid, "FOOD", "EAT_Vomit_P", 4.1, 0, 1, 0, 1, 1);
	}
	else if(anim_id == true)
	{
		return CustomAnimationForPlayer(playerid, "FOOD", "EAT_Vomit_SK", 4.1, 0, 1, 0, 1, 1);
	}
	return 1;
}
Код:
CMD:piss(playerid, params[])
{
	new anim_id;
	if(sscanf(params, "d", anim_id))
	{
		return SendClientMessage(playerid, BOJA_BIJELA, ""KORISTENJE" /piss [Animacija(0-2)]");
	}

	if(anim_id == 0)
	{
		return CustomAnimationForPlayer(playerid, "PAULNMAC", "Piss_in", 4.1, 0, 1, 0, 1, 1);
	}
	else if(anim_id == 1)
	{
		return CustomAnimationForPlayer(playerid, "PAULNMAC", "Piss_loop", 4.1, 1, 0, 0, 1, 1); //
	}
	else if(anim_id == 2)
	{
		return CustomAnimationForPlayer(playerid, "PAULNMAC", "Piss_out", 4.1, 0, 1, 0, 1, 1);
	}
	return 1;
}



Re: NPC Animations - XK - 03.05.2014

for command piss use:
pawn Код:
SetPlayerSpecialAction(playerid, 68);
instead of
pawn Код:
CustomAnimationForPlayer(playerid, "PAULNMAC", "Piss_out", 4.1, 0, 1, 0, 1, 1);
it will work,try it


Re: NPC Animations - vannesenn - 03.05.2014

But, how I can record NPC with other anims, like this?

Код:
 CustomAnimationForPlayer(playerid, "SWEET", "sweet_ass_slap", 4.1, 0, 1, 0, 1, 1);



Re: NPC Animations - XK - 03.05.2014

search in ****** for setplayerspecialaction and replace them with the ids...it would work by the way no need to convert them all,just use SetPlayerSpecialAction for the animations you want the npc to do,so it works for the npc


Re: NPC Animations - vannesenn - 03.05.2014

I don't understand you. Can you give some example?


Re: NPC Animations - XK - 03.05.2014

listen,lets say you want the npc to sit down,then convert the sitting code to SetPlayerSpecialAction ,and use it with the npc


Re: NPC Animations - vannesenn - 03.05.2014

Yes, but how I can use vomit or push anim in setplayerspecialaction


Re: NPC Animations - XK - 03.05.2014

use apply animation too because not all of the animations are in setplayerspecialaction..
vomit:
pawn Код:
ApplyAnimation(playerid, "FOOD", "EAT_Vomit_P", 3.0, 0, 0, 0, 0, 0);
and what do you mean by push?