OnPlayerEnteringVehicle: Difference between revisions
Jump to navigation
Jump to search
This wiki is using an old backup from 2020
Some information may be old/missing
(Created page with "This function is much same as onPlayerEnterVehicle == Synatx == onPlayerEnteringVehicle( player, vehicle, door ) == Example == <source lang="squirrel"> function onPlayerEnt...") |
No edit summary |
||
Line 1: | Line 1: | ||
This | This event is called when a player tries to enter a vehicle | ||
== | == Syntax == | ||
onPlayerEnteringVehicle( player, vehicle, door ) | <pre>onPlayerEnteringVehicle( player, vehicle, door )</pre> | ||
== Arguments == | |||
* ''CPlayer'' '''player''' - The player instance, or the one who is trying to enter. | |||
* ''CVehicle'' '''vehicle''' - The vehicle instance, or the vehicle which is being entered by the player. | |||
* ''int'' '''door''' - The door in which the player is entering, i.e, 0 for driver, 1 for passenger. | |||
== Example == | == Example == | ||
Line 8: | Line 13: | ||
function onPlayerEnteringVehicle( player, vehicle, door ) | function onPlayerEnteringVehicle( player, vehicle, door ) | ||
{ | { | ||
Message( player.Name + " is entering " + GetVehicleNameFromModel( vehicle.Model ) + "." ); | |||
} | } | ||
</source> | </source> |
Revision as of 13:26, 9 March 2016
This event is called when a player tries to enter a vehicle
Syntax
onPlayerEnteringVehicle( player, vehicle, door )
Arguments
- CPlayer player - The player instance, or the one who is trying to enter.
- CVehicle vehicle - The vehicle instance, or the vehicle which is being entered by the player.
- int door - The door in which the player is entering, i.e, 0 for driver, 1 for passenger.
Example
function onPlayerEnteringVehicle( player, vehicle, door )
{
Message( player.Name + " is entering " + GetVehicleNameFromModel( vehicle.Model ) + "." );
}