onplayerentervehicle
#1

How to detect in OnPlayerEnterVehicle if player pressed G to enter as passenger?
And what is ID of this key?
Reply
#2

OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)

You can see "ispassenger" parameter, so you can add simple check under OnPlayerEnterVehicle

Код:
if(ispassenger)
{
  //Code you want to execute if he entered as passenger
}
Reply
#3

to detect if the player used G use:
pawn Код:
OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    if(ispassenger(playerid))
    {
        //write code here
    }
    return 1;
}
as far as I know you can't detect the "G" key as you could e.g. detect the "ENTER" key...
G is not used in the singleplayer and you can't change the key to any other...

Edit: hehe ironboy was faster
Reply
#4

Thanks guys.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)