Sit player in chair
#1

Hi,

How to put player in chair (object) i mean set sitting animation and setplayerpos on chair.
Reply
#2

Here is the code.
PHP код:
ApplyAnimation(playerid,"PED","SEAT_IDLE",4,0,0,01,0,1); 
Reply
#3

Just check all the anims in wiki.sa-mp.com and you will find everything you need
Reply
#4

Here is some commands I just made, hope it helps you.

Код:
CMD:seat(playerid, params[])
{
	ApplyAnimation(playerid, "PED", "SEAT_DOWN", 4.0, 0, 0, 0, 0, 0, 1);
	SetTimerEx("SitAnim", 1000, false, "i", playerid);
	return 1;
}

forward SitAnim(playerid);
public SitAnim(playerid)
{
	ApplyAnimation(playerid, "PED", "SEAT_IDLE", 4.1, 1, 0, 0, 0, 0, 1);
	return 1;
}

CMD:standup(playerid, params[])
{
	ApplyAnimation(playerid, "PED", "SEAT_UP", 4.0, 0, 0, 0, 0, 0, 1);
	return 1;
}
Reply
#5

You should also keep looking for a perfect angle of sitting without making player adjust angle by using setplayerpos and setplayerfacing angle if used for one chair or something...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)