Chaos Posted June 25, 2014 Share Posted June 25, 2014 (edited) Server : function giveMoney(player) local playerAccount = getPlayerAccount(player) if getAccountData(playerAccount, "CommandUsed") == false then givePlayerMoney(player,2000) outputChatBox("you got money $2000",player,0,255,0) setAccountData(playerAccount, "CommandUsed", true) timer = setTimer(setAccountData,60000,1,playerAccount,"CommandUsed",false) triggerClientEvent(player,"StartCount",player,timer) elseif getAccountData(playerAccount, "CommandUsed") == true then outputChatBox(" You have to wait 1 min to use this command again .",root,255,255,0) end end addCommandHandler("getmoney",giveMoney) Client: function Timeinfo(timer) Secs = math.ceil(getTimerDetails(timer)/ (1000) % 60 ) Mins = math.ceil(getTimerDetails(timer)/ (1000*60) % 60) Hours = math.ceil(getTimerDetails(timer)/ (1000*60*60) % 24 ) guiSetText(GUIEditor.button[5],Hours..":"..Mins..":"..Secs) setTimer(Timeinfo(timer),1000,0) end addEvent("StartCount", true) addEventHandler("StartCount", root, Timeinfo) i'm trying to get time details on button and update the text every 1 sec but it seems can't trigger timer from server side Edited June 25, 2014 by Guest Link to comment
Et-win Posted June 25, 2014 Share Posted June 25, 2014 I think you can't send the timer. (Not sure) 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