Here are some things that will instantly get your script denied
- Nothing should give you or your friends an unfair advantage over other players, or do things that would be considered malicious.
- What are you, a child?
- Non-unique file names
- All lua folders get mounted into a single lua folder. Your addon doesn't run on its own little island and you shouldn't behave that way. Having something named lua/autorun/init.lua will instantly get your script denied.
- Putting all your stuff in _G
- You should be putting must of your stuff in your own table, and your own table should be unique enough.
- If you have a function or variable that is NOT local and simply named something similar to SpawnNPC, your script will be denied
- SetNW/GetNW functions.
- These are horribly inefficient. Click here to find out why. Use this or this
- Data tables are good for entities, net messages are good for one time things or sending stuff to players.
- There is literally no reason why you should be using them over this
- Bad networking practices
- This includes things like setting DataTable variables or sending net messages too often (for example, in a think hook)
- Using tostring() on numbers and sending the string instead of simply sending a number.
- Setting DataTable variables that are never used on the client
- Sending data to the client which is never used.
- Exploitable networking practices
net.WriteEntity(LocalPlayer()) is extremely dumb. You should be using the second argument of your
net.Receive function to find out who sent the message
- Assume that anyone can send a net message using the
lua_run_cl command at any time.
- Most of your important calculations should always be done on the server, not on the client
- Redundant code
- If you're copy/pasting something, you should probably use a function or a loop.
- If you're doing things like
something1=2; something2=4; perhaps you should use a loop for that.
- "Changing collision rules in a callback is likely to cause crashes!"
- Do not do anything that would cause this error to appear in console.
- Things that may cause this error include:
- Removing an entity in a touch or collision hook
- Changing physobject properties in a touch or collision hook
- Using content that you do not own/have rights to
- These are things such as models/images/code.
- If you do not own the rights to these, using them will have your script instantly denied!
- Using SendLua
- Properly network. That's all. No special cases.
Last updated March 21, 2017 00:43 by Nookyava