Update sv_gamemode_functions.lua

swap "for" and "if"
Merge pull request #1687 from cardentity/patch-1

Update sv_gamemode_functions.lua
Fixed a lot of should-be-local variables

Like @wiox did with garrymod's 'light' stuff using
https://github.com/wiox/gmod-global-finder. Manually inspected each
variable.
Renamed variable to match parameter

Probably fixes an error, as that seems to be the reason it's put there.
Use therefore created MySQLite function
Got rid of local
Merge branch 'should-be-local' of github.com:fruitwasp/DarkRP
Merge branch 'hitmenu' of github.com:fruitwasp/DarkRP
Very likely fix of #1628
Merge branch 'master' into workshop