Chat Animation
#1

Код:
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.1, 0, 1, 1, 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.1, 0, 1, 1, 0, time);
	}
When I chat it will animate but I can't move while animating.
Reply
#2

Quote:

ApplyAnimation(playerid, animlib[], animname[], Float:fDelta, loop, lockx, locky, freeze, time, forcesync) (foresync is an optional parameter)

https://sampwiki.blast.hk/wiki/ApplyAnimation

Код:
ApplyAnimation(playerid, "PED", "IDLE_CHAT", 4.1, 0, 1, 1, 0, time);
Those two stand for lockx and lock I believe, you should change them to 0, so it should be

Код:
ApplyAnimation(playerid, "PED", "IDLE_CHAT", 4.1, 0, 0, 0, 0, time);
Reply
#3

Quote:
Originally Posted by JaydenJason
Посмотреть сообщение
https://sampwiki.blast.hk/wiki/ApplyAnimation

Код:
ApplyAnimation(playerid, "PED", "IDLE_CHAT", 4.1, 0, 1, 1, 0, time);
Those two stand for lockx and lock I believe, you should change them to 0, so it should be

Код:
ApplyAnimation(playerid, "PED", "IDLE_CHAT", 4.1, 0, 0, 0, 0, time);
Still can't move, help please!
Reply
#4

Quote:
Originally Posted by lwilson
Посмотреть сообщение
Still can't move, help please!
Try
Код:
ApplyAnimation(playerid, "PED", "IDLE_CHAT", 4.1, 1, 1, 1, 1, 1, 1);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)