SA-MP Forums Archive
OnPlayerText Animation Help - 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: OnPlayerText Animation Help (/showthread.php?tid=562980)



OnPlayerText Animation Help - lwilson - 13.02.2015

Problem 1: When i'm chatting while crouching, my character will stand up and do the Animation
Problem 2: When i'm chatting there will be an animation but i can't move my character
Код:
new accent[64];
	GetPlayerAccent(playerid, accent);
	if(PlayerInfo[playerid][pAccent] != 0 && PlayerInfo[playerid][pAccent] != 1)
	{
		format(string, sizeof(string), "%s %s says: %s", accent, sendername, text);
		ProxDetector(20.0, playerid,string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
		SetPlayerChatBubble(playerid,text,COLOR_WHITE,20.0,5000);
		new lengthtime = strlen(text);
		new time = lengthtime*50;
		ApplyAnimation(playerid,"PED","IDLE_CHAT",4.0,0,0,0,0,time);
	}
	else
	{
	    format(string, sizeof(string), "%s says: %s", sendername, text);
		ProxDetector(20.0, playerid,string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
		SetPlayerChatBubble(playerid,text,COLOR_WHITE,20.0,5000);
		new lengthtime = strlen(text);
		new time = lengthtime*50;
		ApplyAnimation(playerid,"PED","IDLE_CHAT",4.0,0,0,0,0,time);
	}
Sorre fo' ma' bad english nigga'


Re: OnPlayerText Animation Help - JaydenJason - 13.02.2015

ApplyAnimation(playerid, "PED", "IDLE_CHAT", 4.1, 0, 1, 1, 1, time);