23.06.2014, 12:18
Hello guys!
I wanted to ask you why player freezes while chatting?
this is my OnPlayerText callback.
I wanted to ask you why player freezes while chatting?
pawn Код:
new Length = strlen(text);
new aTime = Length*200;
if(!IsPlayerInAnyVehicle(playerid) && !IsPlayerSitting(playerid))
{
ApplyAnimation(playerid,"PED","IDLE_CHAT",4.0,0,0,0,0,aTime);
}
else if(IsPlayerInAnyVehicle(playerid))
{
if(GetPlayerVehicleSeat(playerid) == 0) ApplyAnimation(playerid,"CAR_CHAT","CAR_SC3_FL",4,1,0,0,0,aTime,1);
if(GetPlayerVehicleSeat(playerid) == 1) ApplyAnimation(playerid,"CAR_CHAT","CAR_SC3_FR",4,1,0,0,0,aTime,1);
if(GetPlayerVehicleSeat(playerid) == 2) ApplyAnimation(playerid,"CAR_CHAT","CAR_SC1_BL",4,1,0,0,0,aTime,1);
if(GetPlayerVehicleSeat(playerid) == 3) ApplyAnimation(playerid,"CAR_CHAT","CAR_SC3_BR",4,1,0,0,0,aTime,1);
}
else if(!IsPlayerInAnyVehicle(playerid))
{
ApplyAnimation(playerid,"PED","IDLE_CHAT",4.0,0,0,0,0,aTime);
}