• Attempted to call method (a nil value)
    2 replies, posted
So i did this [code] concommand.Add("XriX_GiveAmmo", function() ply:SetClip1(999) end) [/code] and got this [code]attempt to call method 'SetClip1' (a nil value)[/code] and outside of the function i have this [code] ply = LocalPlayer() [/code] What the poop is a nil value and how to fix?
I assume that you can't call it from clientside. You need some way to from client, inform server to set clip1 for ply to 9999. [url]http://wiki.garrysmod.com/page/Net_Library_Usage[/url]
It also needs to be called on the weapon ( you could use PLAYER:GetActiveWeapon( ) to get a weapon entity that the player is currently holding ), not the player.
Sorry, you need to Log In to post a reply to this thread.