முதன்மை உள்ளடக்கத்துக்குச் செல்லவும்

GetVehicleDriver

எச்சரிக்கை

செயல்பாடு என்பது omp v1.1.0.2612 பதிப்பில் சேர்க்கப்பட்டது. இது முந்தைய பதிப்புகளில் இயங்காது!

Description​

Get the playerid of the person driving the vehicle.

Parameters​

NameDescription
vehicleidThe ID of the vehicle to get the driver of.

Returns​

Returns the driver ID (player ID).

INVALID_PLAYER_ID - The vehicle has no driver.

Examples​

public OnPlayerExitVehicle(playerid, vehicleid)
{
new driverid = GetVehicleDriver(vehicleid);
if (driverid != INVALID_PLAYER_ID)
{
SendClientMessage(driverid, -1, "Someone is exiting your vehicle.");
}
return 1;
}