Garry's Mod Wiki


  Weapon:CallOnClient( string functionName, string arguments = "" )


Calls a SWEP function on client.

This uses the usermessage internally, because of that, the combined length of the arguments of this function may not exceed 254 bytes/characters or the function will cease to function!


1 string functionName
Name of function to call. If you want to call SWEP:MyFunc() on client, you type in "MyFunc"
2 string arguments = ""
Arguments for the function, separated by spaces.
Only the second argument is passed as argument and must be a string