(playerid, vehicleid)
playerid
ID of the player.
vehicleid
ID of the vehicle. Note: NOT the modelid!
new specialcar;
public OnGameModeInit()
{
specialcar = AddStaticVehicle(411, 0.0, 0.0, 5.0, 0.0, -1, -1);
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/specialcar", true) == 0)
{
if(IsPlayerInVehicle(playerid, specialcar))
{
SendClientMessage(playerid, -1, "You're in the special car!");
}
return 1;
}
return 0;
}
The following functions may be useful, as they are related to this function in one way or another.