Jump to content

Event doesn't get triggered after the 1st time


^.^

Recommended Posts

Hey,

I have some problem with a trigger. I trigger some tables to the client to load them. That works fine.

After I die it should trigger some other tables with the same function again to the client, but after the 1st trigger it doesn't trigger it anymore.

The Code:

function setUPDMPlayer(player,spawn,o,m,p) 
    --outputChatBox(#spawn) 
    if spawn then 
        toggleControl(player,"vehicle_secondary_fire",true) 
        toggleControl(player,"vehicle_primary_fire",false) 
         
        local rand = math.random(tonumber(#spawn))  
        spawnPlayer(player,spawn[rand].posX,spawn[rand].posY,spawn[rand].posZ) 
        setElementDimension(player,1) 
        local vehicle = createVehicle(spawn[rand].modelID,spawn[rand].posX,spawn[rand].posY,spawn[rand].posZ,spawn[rand].rotX,spawn[rand].rotY,spawn[rand].rotZ) 
    end 
    triggerClientEvent(player,"loadMapDM",root,mapDM,o,m,p) 
    outputChatBox("Triggered Event") 
end 

Mabey you have a solution for my problem.

Regards

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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