PLAYER_STATE_ENTER_VEHICLE_DRIVER
#1

PLAYER_STATE_ENTER_VEHICLE_DRIVER or PLAYER_STATE_ENTER_VEHICLE_PASSENGER or PLAYER_STATE_EXIT_VEHICLE this is? what is it used? I do not understand an example please thanks in advance
Reply
#2

pawn Код:
if(GetPlayerState(playerid) == PLAYER_STATE_ENTER_VEHICLE_DRIVER)
{
    print("Player enters vehicle as driver");
}
//alternatively you can use
OnPlayerEnterVehicle(playerid,vehicleid,ispassenger)
//and
OnPlayerExitVehicle(playerid,vehicleid,ispassenger)
Reply
#3

this can be used to prevent driveby'ing, if you want to remove that feature, it can also be used for a wide variety of other uses, like checking to see if a person is a driver of a vehicle to make him able to do certain commands, etc.
ex:
you want only the driver of a vehicle to be able to /refuel, so you use this function under your /refuel command and make it return true, then make the passenger return false
^^there are other ways of doing this w/o using this function but this is just a way that you CAN use it.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)