SA-MP Forums Archive
ayuda - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Español/Spanish (https://sampforum.blast.hk/forumdisplay.php?fid=29)
+---- Thread: ayuda (/showthread.php?tid=523443)



ayuda - Metzone - 02.07.2014

como hago para que un piloto pulse F de piloto y no le deje salir del auto.ї


Respuesta: ayuda - OTACON - 02.07.2014

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
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;
}