Feche1320 Posted December 27, 2010 Share Posted December 27, 2010 I don't want to people abuse commands, so I did this: if(getTickCount()-g_PlayerTick[source] < 20000) then outputChatBox("Please wait 20 seconds between commands.", source, 255, 0, 0) return else --more code g_PlayerTick[source] = getTickCount() end But the first line gives me this error: attempt to perform arithmetic on field '?' Thanks Link to comment
MexUK Posted December 27, 2010 Share Posted December 27, 2010 try: if(g_PlayerTick[source] and getTickCount()-g_PlayerTick[source] < 20000) then that's assuming the first time a player uses a command their tick value hasn't been set. Link to comment
Feche1320 Posted December 27, 2010 Author Share Posted December 27, 2010 Yea works, thanks. 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