Quote:
Originally Posted by ue_falconx
Hello mate,
You can also use this for checking if player is exiting a vehicle:-
pawn Код:
public OnPlayerExitVehicle(playerid, vehicleid, ispassenger) { SendClientMessage(playerid, -1, "You are going to exit the vehicle."); return 1; }
or for the states, it's better and more accurate on some places:-
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate) { if ((newstate == PLAYER_STATE_ONFOOT) && ((oldstate == PLAYER_STATE_DRIVER) || (oldstate == PLAYER_STATE_PASSENGER))) // your new state is ONFOOT and old state is when he was in the vehicle. // your rest of code here SendClientMessage(playerid, -1, "you just exited a vehicle."); return 1; }
was just a fast coding, reply down if i have helped you.
-FalconX
|
This doesn't work, it still allows me to exit the vehicle, OnPlayerExitVehicle doesn't seem to work either.