Jump to content

Problem with Race gamemode.


Cadu12

Recommended Posts

Posted

I have problem with Race gamemode. It dont me let create vehicle and warpPedIntoVehicle, it will deleted when I created...

I cant found some files or/and lines to edit...

  
function onPlayAgainRequest() 
    local veh = exports.race:getPlayerVehicle(source) 
    local model = getVehicleModelFromName(getVehicleName(veh)) 
    local vehicle = createVehicle(model, 4, 0, 3) 
    setElementData(source, 'race.spectating', false) 
    setElementData(source, 'race.playagain', true) 
    setCameraTarget(source, source) 
    spawnPlayer(source, 4, 0, 3) 
    warpPedIntoVehicle(source, vehicle) 
end 
addEventHandler("onRequestRespawn", getRootElement(), onPlayAgainRequest) 

PS: onRequestRespawn is a custom event.

Ingame nick: Cadu12

Posted

You mean the vehicle get's created but "race" destroys it just after?

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted
  
function onPlayAgainRequest() 
    local veh = exports.race:getPlayerVehicle(source) 
    setElementData(source, 'race.spectating', false) 
    setElementData(source, 'race.playagain', true) 
    spawnPlayer(source, 4, 0, 3) 
    setCameraTarget(source, source) 
    warpPedIntoVehicle(source, veh) 
end 
addEventHandler("onRequestRespawn", getRootElement(), onPlayAgainRequest) 
  

Im not sure if it'll works. untested

Ingame nick: Cadu12

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...