26.03.2010, 01:28
For a specific vehicle, too only allow passengers, not drivers.
new MYCAR;
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_DRIVER){
new pVeh = GetPlayerVehicleID(playerid);
if(pVeh == MYCAR){
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid,0xFF0000AA,"You can't drive this car");
}
}
return 1;
}
public OnGameModeInit()
{
MYCAR = AddStaticVehicle(...);
return 1;
}