xXMADEXx Posted November 22, 2012 Share Posted November 22, 2012 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
Castillo Posted November 22, 2012 Share Posted November 22, 2012 A timer for what exactly? to trigger the event? Link to comment
xXMADEXx Posted November 22, 2012 Author Share Posted November 22, 2012 A timer for what exactly? to trigger the event? Just a timer so oh say every 10 mins it will do that function.... Link to comment
manve1 Posted November 22, 2012 Share Posted November 22, 2012 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now