G.ClientCallGamemode

From GMod Wiki

Jump to: navigation, search
Function
Syntax ClientCallGamemode( CRecipientFilter recipients, String function_name, String arguments )
Where is this used?
Description:
Call a specific function on the client's gamemode
Returns: nil
Part of Library: Global Functions
Realm: NewerShared.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=G.ClientCallGamemode]G.ClientCallGamemode [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Example

DescriptionGeneric Function caller
Used onNewerServer.png
Code
local rand_sep = "Ï"
 
local callClientFunc(to, name, ...)
      local args = ""
      //Make the arg list (Client call sends strings for arguments)
      for _,v in pairs(arg) do
          args = args..v..rand_sep
      end
 
      local filter = RecipientFilter()
      filter:AddPlayer(to)
      ClientCallGamemode( filter, name, args);
end
 
callClientFunc(player.GetByID(1), "AddHint", "Welcome to mah server", NOTIFY_GENERIC , 20 )
 
//This is actually sorta like JCL >.>
 
OutputPuts a hint on player 1's screen


Additional Notes

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox