Garry's Mod Wiki

Weapon:CallOnClient

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

Description

Calls a SWEP function on client. Does nothing 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!

Arguments

1 string functionName
Name of function to call. If you want to call SWEP:MyFunc() on client, you type in "MyFunc"
2 string data = ""
Custom data to be passed to the target SWEP function as the first argument.