• AddFrags Help
    2 replies, posted
Hello! So i need a little help with the AddFrags function seen [url=http://wiki.garrysmod.com/page/Player/AddFrags]here[/url] This is the code im using: [CODE] ply = LocalPlayer() kills = ply:Frags ply:AddFrags(-kills) [/CODE] I get this error: attempt to call method 'AddFrags' (a nil value) Please help!! Thanks! NOTE: The code is only a part of what im using! Im using this in a timer to clear peoples score every x secs!
AddFrags is server side only, and you are calling it client side. It would absolutely be wrong to have the AddFrags method client side, it would allow players to give themselves free frags. On the wiki, read CAREFULLY the WHOLE PAGES. Also, A little blue square means server side, a little orange square means client side, and a square with both colors means shared. You should read the basics of Gmod Lua on the wiki, that would avoid you doing such errors.
[QUOTE=TheKitsune;47845730]AddFrags is server side only, and you are calling it client side. It would absolutely be wrong to have the AddFrags method client side, it would allow players to give themselves free frags. On the wiki, read CAREFULLY the WHOLE PAGES. Also, A little blue square means server side, a little orange square means client side, and a square with both colors means shared. You should read the basics of Gmod Lua on the wiki, that would avoid you doing such errors.[/QUOTE] Alright thanks! (did not look to see whether it was cl or sv)
Sorry, you need to Log In to post a reply to this thread.