Applyanimation on exit vehicle - 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)
+--- Thread: Applyanimation on exit vehicle (
/showthread.php?tid=554376)
Applyanimation on exit vehicle -
cyberlord - 03.01.2015
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 .
Re: Applyanimation on exit vehicle -
JuanStone - 03.01.2015
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;
}
Re: Applyanimation on exit vehicle -
cyberlord - 03.01.2015
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