12.07.2010, 12:27
that if the player is leaving (or atlealt trying to) a vehicle it is wont allow him?
Thanks for helpers!
Thanks for helpers!
public OnPlayerExitVehicle(playerid, vehicleid)
{
TogglePlayerControllable(playerid, false);
TogglePlayerControllable, true);
SendClientMessage(playerid, 0xFFFF00FF, "You cannot leave vehicles!");
return 1;
}
new veh_id[MAX_PLAYERS],
veh_seat[MAX_PLAYERS];
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_ONFOOT)
{
if(oldstate == PLAYER_STATE_DRIVER || oldstate == PLAYER_STATE_PASSENGER)
{
PutPlayerInVehicle(playerid, veh_id[playerid], veh_seat[playerid]);
}
}
return 1;
}
public OnPlayerExitVehicle(playerid, vehicleid)
{
veh_id[playerid] = vehicleid;
veh_seat[playerid] = GetPlayerVehicleSeat(playerid);
return 1;
}