Applyanimation on exit vehicle
#1

Hello need help to apply animation when exit vehicle :

so hare is my code onplayerstate changed
Код:
if(oldstate == PLAYER_STATE_DRIVER && newstate == PLAYER_STATE_ONFOOT)
	{
		if(GetPlayerVehicleID(playerid) >= PIZZABIKE[0] && GetPlayerVehicleID(playerid) <= PIZZABIKE[10])
	    {
			if(PlayerInfo[playerid][HoldingObject] == 1)
			{
		 		ApplyAnimation(playerid,"CARRY","crry_prtial",4.1,1,0,0,1,1);
		 	}
		 }
	 }
its not wirking , i have tried to put this code onplayerexitvechicle but then its just not alow u u exit vehicle , cuz when u try to exit its apply u animation .
Reply
#2

pawn Код:
public OnPlayerExitVehicle(playerid, vehicleid)
{
    if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
    {
        if(GetPlayerVehicleID(playerid) >= PIZZABIKE[0] && GetPlayerVehicleID(playerid) <= PIZZABIKE[10])
        {
            if(PlayerInfo[playerid][HoldingObject] == 1)
            {
                ApplyAnimation(playerid,"CARRY","crry_prtial", 4.1, 1, 0, 0, 1, 1);
            }
        }
    }
    return true;
}
Reply
#3

Quote:
Originally Posted by JuanStone
Посмотреть сообщение
pawn Код:
public OnPlayerExitVehicle(playerid, vehicleid)
{
    if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
    {
        if(GetPlayerVehicleID(playerid) >= PIZZABIKE[0] && GetPlayerVehicleID(playerid) <= PIZZABIKE[10])
        {
            if(PlayerInfo[playerid][HoldingObject] == 1)
            {
                ApplyAnimation(playerid,"CARRY","crry_prtial", 4.1, 1, 0, 0, 1, 1);
            }
        }
    }
    return true;
}
code u gave check if player is a driver i need to apply animation when he exit vehicle , i have solved this . the problem was that i have checked is player on foot and after that i try to check his vehicleid and so there code stop working cuz if player is on foot vehicle id dont mach
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)