26.10.2010, 16:55
(
Последний раз редактировалось Hiddos; 26.10.2010 в 17:07.
)
Okay, did some quick testing on my homehost and it turns out that OnPlayerEnterVehicle is called when the player presses the button to enter a vehicle (By default The 'F' key, the 'Enter' button), not when he actually has entered the vehicle. Hence why this occurs
Now this should work, remove the "IsPlayerPizzaDeliver" line in OnPlayerEnterVehicle, and use this one under OnPlayerKeyStateChange:
Should work.
Moddler beat me again . THIS MEANS WAR!
Now this should work, remove the "IsPlayerPizzaDeliver" line in OnPlayerEnterVehicle, and use this one under OnPlayerKeyStateChange:
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER) IsPlayerPizzaDeliverer(playerid, GetPlayerVehicleID(playerid));
return 1;
}
Moddler beat me again . THIS MEANS WAR!