Animation and walking - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Animation and walking (
/showthread.php?tid=240411)
Animation and walking -
GiS - 15.03.2011
Hey,
I got the following animation but I don't get how to make it possible to walk while using this talk-animation.
Code:
ApplyAnimation(playerid, "PED", "IDLE_CHAT", 4.1, 0, 1, 1, 0, aTime);
Right now I'm frozen to the place I started the animation and I really got to change it. I checked the wiki but there is nothing that I have to change..
Re: Animation and walking -
admantis - 15.03.2011
There are animations that apply only for a partial part of body. That one will apply for all bones and stay still, you need other one.
Sorry, I dont have it now.
Re: Animation and walking -
GiS - 15.03.2011
Is there another animation that is almost the same?
Re: Animation and walking -
Ironboy - 15.03.2011
dunno use this it is better
pawn Code:
if(strcmp(cmd, "/walk", true) == 0)
{
if (!strlen(cmdtext[6])) return SendClientMessage(playerid,0xEFEFF7AA,"USAGE: /walk [1/2]");
new style = strval(cmdtext[6]);
if (style == 1)
{
ApplyAnimation(playerid,"PED","WALK_gang1",4.1,1,1,1,1,1);
}
else if (style == 2)
{
ApplyAnimation(playerid,"PED","WALK_gang2",4.1,1,1,1,1,1);
}
else SendClientMessage(playerid,0xEFEFF7AA,"USAGE: /walk [1/2]");
return 1;
}
Re: Animation and walking -
GiS - 16.03.2011
Well I got the following code now:
Code:
public OnPlayerText(playerid, text[])
{
new string[512];
for(new i; i<MAX_PLAYERS; i++)
{
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid, X, Y, Z);
if(IsPlayerInRangeOfPoint(i, 25.0, X, Y, Z))
{
format(string, sizeof(string), "%s says: %s", PlayerInfo[playerid][username], text);
SendClientMessage(i, COLOR_WHITE, string);
new length = strlen(text);
new aTime = length*100;
ApplyAnimation(playerid, "PED", "Seat_talk_01", 4.1, 0, 1, 1, 0, aTime);
}
}
return 0;
}
But if you roleplay escaping it would be unrealistic if you just stay there for some seconds till you've ended your sentence. What can I do here?