NetMessage

Sends a net message to the server on click.

Arguments

String name Name of the net message.

(Optional) Function data(Panel s) Function used to append data to the message.

Example

local but = vgui.Create("DButton")
but:NetMessage("BuyGun", function() net.WriteString("some_gun") end)

results matching ""

    No results matching ""