16.02.2011, 03:42
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
new vehicleid = GetPlayerVehicleID(playerid);
if(newstate == PLAYER_STATE_DRIVER)
{
if(vehicleid == Vehicle_ID_which_you_want_to_make_undrivable))
{
TogglePlayerControllable(playerid, 0); // Or use RemovePlayerFromVehicle(playerid); if you want that it just removes you from the vehicle which is undrivable.
SendClientMessage(playerid, COLOR_WARNING, "This vehicle is out of use !");
}
}
return 1;
}
pawn Код:
TogglePlayerControllable(playerid, 1);