SA-MP Forums Archive
walk command doesnt work - 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: walk command doesnt work (/showthread.php?tid=641251)



walk command doesnt work - grymtn - 13.09.2017

heres my code idk why i cant make people walk.

Код:
CMD:walk(playerid,params[])
{
    if (GetPlayerWalkingStyle(playerid) == WALK_NORMAL)
	{
	    ApplyAnimation(playerid,"PED","WALK_player",4.1,1,1,1,1,0,1);
	}
	if (GetPlayerWalkingStyle(playerid) == WALK_PED)
	{
	    ApplyAnimation(playerid,"PED","WALK_civi",4.1,1,1,1,1,0,1);
	}
	if (GetPlayerWalkingStyle(playerid) == WALK_GANGSTA)
	{
	    ApplyAnimation(playerid,"PED","WALK_gang1",4.1,1,1,1,1,0,1);
	}
	if (GetPlayerWalkingStyle(playerid) == WALK_GANGSTA2)
	{
	    ApplyAnimation(playerid,"PED","WALK_gang2",4.1,1,1,1,1,0,1);
	}
	if (GetPlayerWalkingStyle(playerid) == WALK_OLD)
	{
	    ApplyAnimation(playerid,"PED","WALK_old",4.1,1,1,1,1,0,1);
	}
	if (GetPlayerWalkingStyle(playerid) == WALK_FAT_OLD)
	{
	    ApplyAnimation(playerid,"PED","WALK_fatold",4.1,1,1,1,1,0,1);
	}
	if (GetPlayerWalkingStyle(playerid) == WALK_FAT)
	{
	    ApplyAnimation(playerid,"PED","WALK_fat",4.1,1,1,1,1,0,1);
	}
	if (GetPlayerWalkingStyle(playerid) == WALK_LADY)
	{
	    ApplyAnimation(playerid,"PED","WOMAN_walknorm",4.1,1,1,1,1,0,1);
	}
	if (GetPlayerWalkingStyle(playerid) == WALK_LADY2)
	{
		ApplyAnimation(playerid,"PED","WOMAN_walkbusy",4.1,1,1,1,1,0,1);
	}
	if (GetPlayerWalkingStyle(playerid) == WALK_WHORE)
	{
	    ApplyAnimation(playerid,"PED","WOMAN_walkpro",4.1,1,1,1,1,0,1);
	}
	if (GetPlayerWalkingStyle(playerid) == WALK_WHORE2)
	{
	    ApplyAnimation(playerid,"PED","WOMAN_walksexy",4.1,1,1,1,1,0,1);
	}
	if (GetPlayerWalkingStyle(playerid) == WALK_DRUNK)
	{
	    ApplyAnimation(playerid,"PED","Walk_drunk",4.1,1,1,1,1,0,1);
	}
	if (GetPlayerWalkingStyle(playerid) == WALK_BLIND)
	{
	    ApplyAnimation(playerid,"PED","Walk_Wuzi",4.1,1,1,1,1,0,1);
	}
	return 1;
}
it just does nothing


Re: walk command doesnt work - NaS - 13.09.2017

The parameters aren't correct. Look them up on the wiki.

- Don't freeze the animation, otherwise the animation will stop after playing once.
- Don't lock x/y if you want them to be able to actually move.
- Choose a higher time if Loop is 1, like 800 but it doesn't matter which exact value you choose here for a looped anim.


Re: walk command doesnt work - grymtn - 14.09.2017

ApplyAnimation(playerid, "PED", "WALK_DRUNK", 4.1, 1, 1, 1, 1, 1, 1);

this is the exact example given on wiki page so im not freezing animation im not locking x or y because it says when its 1 it doesnt locks x/y and it doesnt freeze thats what wiki says but still anim doesnt get executed


Re: walk command doesnt work - iSpark - 15.09.2017

Did you preload anim library?