G.SendUserMessage

From GMod Wiki

Jump to: navigation, search
Function
Syntax SendUserMessage( String message_name,CRecipientFilter :Player entity [, ...] )
Where is this used?
Description:
Convenience function for sending a list of values to clients using a User Message
Returns: nil
Part of Library: Global Functions
Realm: NewerServer.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=G.SendUserMessage]G.SendUserMessage [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Example

DescriptionThose two functions perform the same task.
Used onNewerServer.png
Code
function SendData1(ply)
	umsg.Start("my_message", ply)
		umsg.String("hai")
		umsg.Long(1337)
	umsg.End()
end
 
function SendData2(ply)
	SendUserMessage("my_message", ply, "hai", 1337)
end
OutputN/A


Additional Notes

See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox