31.07.2011, 11:13
(
Последний раз редактировалось Calgon; 31.07.2011 в 13:17.
)
OnPlayerEnterVehicle is called when a player is preparing to enter a vehicle, so for example: when a player hits the 'F' key near-by a car.
You can use OnPlayerStateChange, this might be a more appropriate callback if you're forcing a player in to a car, or if you want it to call when they directly enter the vehicle instead of before.
You can use OnPlayerStateChange, this might be a more appropriate callback if you're forcing a player in to a car, or if you want it to call when they directly enter the vehicle instead of before.
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate) {
if(newstate == 2 && oldstate != 2) {
/* your code here */
return 0;
}
return 0;
}