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 most of your stuff in your own table, and your own table should be unique enough.
- Only exception to this rule are enumerations
- If you have a function or variable that is NOT local and simply named something similar to SpawnNPC, your script will be denied
- 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!
- If you use content that requires acknowledgement to the developer/creator, then provide it in your script description.
- Using SendLua/BroadcastLua
- Properly network. That's all. No special cases.
- No scaling
- Lay out your UI in a manner that will work with any resolution.
- Items such as fonts and materials should also be considered.
- Using hooks in a way that prevents other hooks from running.
- This includes not using
hook.Add without calling the "Old Function"
- Whenever a hook returns a value, other hooks may not be called.
- Again, your addons are not running in their own little island. Be considerate of what other addons may want.
- Instead of returning a value if something doesn't meet your conditions, return nothing!
- Example of what NOT to do:
-- THIS IS VERY BAD
hook.Add( "PlayerUse", "some_unique_name", function( ply, ent )
if ply:IsAdmin() then
Last updated June 4, 2017 15:08 by ARitz Cracker