Jump to content

Problem with Race gamemode.


Cadu12

Recommended Posts

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.

Link to comment
  
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

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

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