Jump to content

z0fa

Members
  • Posts

    8
  • Joined

  • Last visited

Posts posted by z0fa

  1. Prova così:

    addEvent('onPlayerPickUpRacePickup') 
    addEvent('onPlayerPickUpRacePickupInternal', true) 
    addEventHandler('onPlayerPickUpRacePickupInternal', g_Root, 
    function(pickupID, respawntime) 
        if checkClient( false, source, 'onPlayerPickUpRacePickupInternal' ) then return end 
        local pickup = g_Pickups[table.find(g_Pickups, 'id', pickupID)] 
        local vehicle = g_Vehicles[source] 
        if not pickup or not vehicle then return end 
        if respawntime and tonumber(respawntime) >= 50 then 
            table.insert(unloadedPickups, pickupID) 
            clientCall(g_Root, 'unloadPickup', pickupID) 
            TimerManager.createTimerFor("map"):setTimer(ServerLoadPickup, tonumber(respawntime), 1, pickupID) 
        end 
        if pickup.type == 'nitro' then 
            addVehicleUpgrade(vehicle, 1010) 
        elseif pickup.type == 'vehiclechange' then 
            if getElementModel(vehicle) ~= tonumber(pickup.vehicle) then 
                clientCall(source, 'removeVehicleNitro') 
                setVehicleID(vehicle, pickup.vehicle) 
                if pickup.paintjob or pickup.upgrades then 
                    setVehiclePaintjobAndUpgrades(vehicle, pickup.paintjob, pickup.upgrades) 
                end 
            end 
        elseif pickup.type == 'repair' then 
            fixVehicle(vehicle) 
        end 
        triggerEvent('onPlayerPickUpRacePickup', source, pickupID, pickup.type, pickup.vehicle) 
    end) 
    

    Edit: se non dovesse funzionare fai come ti ha detto Hunterix.

  2. Per risolvere il WARNING ti basta sostituire "setVehicleFrozen" con "setElementFrozen" nel file "race_client.lua" alla linea 1202, oppure scrivere in console "upgrade race". Dubito però che risolva il problema del pickup...

  3. Hi, anyone know where i can find a resource that allow me to start races in my gamemode... Something like this:

    A race has been called, go to the start point to join.

    And perhaps create new tracks ingame.

    Thank you!

  4. Hi, i'm trying to make a login form but i have some problems with the guiShowMessageBox function. I need the result of the question, for example if the player click yes i got 1. I write this code, but not work...

      
    local result = call(getResourceFromName("msgbox"),"guiShowMessageBox","Attenzione, effettuando l'accesso come ospite i dati della sessione corrente non verranno salvati, desideri continuare?","question","Guest login",true,"Continua","Annulla") 
    if result == 1 then 
    triggerServerEvent("doGuestLogin",getRootElement(),getLocalPlayer()) 
    guiSetInputEnabled(false) 
    guiSetVisible(loginform,false) 
    showCursor(false) 
    end 
      
    

×
×
  • Create New...