02.07.2014, 08:11
https://sampwiki.blast.hk/wiki/OnPlayerStateChange
https://sampwiki.blast.hk/wiki/GetPlayerVehicleID
https://sampwiki.blast.hk/wiki/GetVehicleModel
https://sampwiki.blast.hk/wiki/PutPlayerInVehicle
https://sampwiki.blast.hk/wiki/GetPlayerVehicleSeat
https://sampwiki.blast.hk/wiki/GetPlayerVehicleID
https://sampwiki.blast.hk/wiki/GetVehicleModel
https://sampwiki.blast.hk/wiki/PutPlayerInVehicle
https://sampwiki.blast.hk/wiki/GetPlayerVehicleSeat
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate){
new vehicleid = GetPlayerVehicleID(playerid);
if(oldstate == PLAYER_STATE_DRIVER && newstate == PLAYER_STATE_ONFOOT){
if(GetVehicleModel(vehicleid) == MODELO_VEHICULO){
PutPlayerInVehicle(playerid, vehicleid, GetPlayerVehicleSeat(playerid);
}
}
return true;
}