Jump to content

Timer


Spice

Recommended Posts

function marker (thePlayer) 
outputChatBox ("Loading the Cargo, Please wait", thePlayer, 255, 255, 0) 
startPaidLS (thePlayer) 
end 

  
function startPaidLS (thePlayer) 
setTimer (outputChatBox, 10000, 1,"Go to "..zone.." deliver your cargo", thePlayer) 

How to make the second function (startPaidLS) start after 10 second, i know i should use setTimer but how it would be like .

Link to comment
setTimer(startPaidLS,10000,1,thePlayer) 

thanks,

another question how to make a var for set timer function

setTimer (outputChatBox, 10000, 1,"Congratulations you have done the mission successfuly and got "..money" $", thePlayer) 
local money = setTimer (givePlayerMoney, 10000, 1, thePlayer, math.random(1000,10000)) 

I tried it like that but it's not working

Link to comment
setTimer(function(thePlayer) 
    local money = math.random(1000,10000) 
    givePlayerMoney(thePlayer, money) 
    outputChatBox("Congratulations you have done the mission successfuly and got "..money.." $", thePlayer) 
end, 10000, 1, thePlayer) 

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...