gamemode.Call

From Garry's Mod
Revision as of 22:42, 23 December 2014 by Shendow (Talk | contribs)
Jump to: navigation, search
 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