gamemode/Call

From Garry's Mod
(Difference between revisions)
Jump to: navigation, search
m
Line 17: Line 17:
 
|type=any
 
|type=any
 
|name=arg
 
|name=arg
|desc=The arguements
+
|desc=The arguments
 
}}
 
}}
 
{{Ret
 
{{Ret

Revision as of 22:42, 23 December 2014

 gamemode.Call( )

Contents

Description

Called by the engine to call a hook within the loaded gamemode.

  • The supplied event 'name' must exist as a GAMEMODE function. Otherwise, every hook created with hook.Add will not be called. IE: gamemode.Call( "PlayerLoadout" ) must have a function GAMEMODE:PlayerLoadout().
  • This is similiar to hook.Call( name, game.GetGamemode(), ... ) except hook.Call will call hooks created with hook.Add even if there is no GAMEMODE function with the event name

Arguments

string name

The name of the hook to call.

Arguments

any arg

The arguments

Returns

any

The result of the hook function.
Personal tools
Navigation