23.06.2014, 19:11
Hello guys!
I have a problem here...
When i chat the animation wont stop even wtih timer for clearanimations.
Second thing car chating anims not working , whenever i start to chat i get dropped out of the car and idle chat animation starts to go and loops for ever.
WHAT IS WRONG HERE?
I have a problem here...
When i chat the animation wont stop even wtih timer for clearanimations.
Second thing car chating anims not working , whenever i start to chat i get dropped out of the car and idle chat animation starts to go and loops for ever.
pawn Код:
public OnPlayerText(playerid, text[])
{
new Length = strlen(text);
new aTime = Length*200;
if((!IsPlayerInAnyVehicle(playerid) || !IsPlayerSitting(playerid)) && PlayerInfo[playerid][Dead] == false)
{
ApplyAnimation(playerid,"PED","IDLE_CHAT",4.1,1,1, 1,1,1);
SetTimerEx("StopChat", aTime, false, "i", playerid);
}
else if(IsPlayerInAnyVehicle(playerid))
{
if(GetPlayerVehicleSeat(playerid) == 0) ApplyAnimation(playerid,"CAR_CHAT","CAR_SC3_FL",4,1,1,1,1,aTime,1);
if(GetPlayerVehicleSeat(playerid) == 1) ApplyAnimation(playerid,"CAR_CHAT","CAR_SC3_FR",4,1,1,1,1,aTime,1);
if(GetPlayerVehicleSeat(playerid) == 2) ApplyAnimation(playerid,"CAR_CHAT","CAR_SC1_BL",4,1,1,1,1,aTime,1);
if(GetPlayerVehicleSeat(playerid) == 3) ApplyAnimation(playerid,"CAR_CHAT","CAR_SC3_BR",4,1,1,1,1,aTime,1);
}
return 1;
}
forward StopChat(playerid);
public StopChat(playerid)
{
return ClearAnimations(playerid);
}