Jump to content

[HELP]Timer System


xXMADEXx

Recommended Posts

Hey guys, i have this server side script, i would like to add a timer to it but iv never created a timer. So how could i add a timer to the following script (server side):

function (player,cmd,...) 
    local text = table.concat({...}, " ")  
    local nick=getPlayerName(player) 
    if isObjectInACLGroup ( "user." .. getAccountName ( getPlayerAccount ( player ) ), aclGetGroup ( "lvl 5" ) ) then 
        triggerClientEvent(getRootElement(),"doOutput",getRootElement(),255,255,255,"United States Roleplay") 
    end 
end 
) 

Link to comment
setTimer( 
function (player,cmd,...) 
        local text = table.concat({...}, " ") 
        local nick=getPlayerName(player) 
        if isObjectInACLGroup ( "user." .. getAccountName ( getPlayerAccount ( player ) ), aclGetGroup ( "lvl 5" ) ) then 
            triggerClientEvent(getRootElement(),"doOutput",getRootElement(),255,255,255,"United States Roleplay") 
        end 
end, 100000, 0 --[[ change the 100000 to the time you want ( minimum 50 milliseconds ... p.s. this is in milliseconds ) ]]-- 
) 
  

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