C# Class ZombieAPI.ZombieAPI

The publicy available API to all plugin.
显示文件 Open project: jariz/jZm Class Usage Examples

Public Properties

Property Type Description
BaseProcess System.Diagnostics.Process
Version string

Public Methods

Method Description
Bootstrap ( Process Game ) : void

Initializes jZm onto a certain game process. Make sure the game is the correct process, This function doesn't check if the process is correct.

DO NOT CALL FROM A PLUGIN. This function is called from the jZm frontend and you should not call it from a plugin.

Crash ( Exception z ) : void

Invokes the OnCrash event, resulting in a fatal error. Mostly used internally.

GetActors ( ) : ZombieAPI.GameObjects.GEntity[]

Loops trough all entities, returning only the actors (zombies and other NPC's)

GetBarriers ( ) : ZombieAPI.GameObjects.GEntity[]

Returns all Zombie Barriers (the zombie entrances)

GetBus ( ) : GEntity

Gets the bus on transit.

Returns the first ET_VEHICLE it can find.

GetDVar ( string Name ) : DVar

Returns the corresponding DVar object that has this name

GetDVarValue ( string Name ) : object

Returns the corresponding DVar value that has this name

GetInstance ( ) : ZombieAPI

Get current ZombieAPI instance

GetPlayers ( ) : ZombieAPI.GameObjects.Player[]

Get all clients in the server.

One of the most important functions in jZm

GetScriptMovers ( ) : ZombieAPI.GameObjects.GEntity[]

Loops trough all entities, returning only the models (keep in mind that these are not static and can be moved)

Shutdown ( bool KillEnvironment ) : void

Unloads resources, Removes hooks and exits the environment.

Write ( string message ) : void

Write a message to the jZm console.

WriteLine ( string message ) : void

Write a line to the jZm console.

WriteLine ( string message, bool debug ) : void

A overload for diagnostic messages. Works the same as WriteLine

ZombieAPI ( ) : System

If you're trying to do this from a plugin, you're doing it wrong. Use the Init(ZombieAPI) function to get the ZombieAPI object.

Private Methods

Method Description
FilterByType ( EntityType type ) : ZombieAPI.GameObjects.GEntity[]
PluginEvent ( Delegate Ev ) : void
TriggerOnChat ( Player player, string message ) : void
TriggerOnGameFrame ( ) : void
initPlugins ( ) : void
zFrame ( object x ) : void

Method Details

Bootstrap() public method

Initializes jZm onto a certain game process. Make sure the game is the correct process, This function doesn't check if the process is correct.
DO NOT CALL FROM A PLUGIN. This function is called from the jZm frontend and you should not call it from a plugin.
public Bootstrap ( Process Game ) : void
Game System.Diagnostics.Process The game process jZm reads/writes to (must be a valid CODBOII zombies process)
return void

Crash() public method

Invokes the OnCrash event, resulting in a fatal error. Mostly used internally.
public Crash ( Exception z ) : void
z System.Exception The exception you want to show details for to the user
return void

GetActors() public method

Loops trough all entities, returning only the actors (zombies and other NPC's)
public GetActors ( ) : ZombieAPI.GameObjects.GEntity[]
return ZombieAPI.GameObjects.GEntity[]

GetBarriers() public method

Returns all Zombie Barriers (the zombie entrances)
public GetBarriers ( ) : ZombieAPI.GameObjects.GEntity[]
return ZombieAPI.GameObjects.GEntity[]

GetBus() public method

Gets the bus on transit.
Returns the first ET_VEHICLE it can find.
public GetBus ( ) : GEntity
return ZombieAPI.GameObjects.GEntity

GetDVar() public method

Returns the corresponding DVar object that has this name
public GetDVar ( string Name ) : DVar
Name string The DVar name
return ZombieAPI.GameObjects.DVar

GetDVarValue() public method

Returns the corresponding DVar value that has this name
public GetDVarValue ( string Name ) : object
Name string The DVar name
return object

GetInstance() public static method

Get current ZombieAPI instance
public static GetInstance ( ) : ZombieAPI
return ZombieAPI

GetPlayers() public method

Get all clients in the server.
One of the most important functions in jZm
public GetPlayers ( ) : ZombieAPI.GameObjects.Player[]
return ZombieAPI.GameObjects.Player[]

GetScriptMovers() public method

Loops trough all entities, returning only the models (keep in mind that these are not static and can be moved)
public GetScriptMovers ( ) : ZombieAPI.GameObjects.GEntity[]
return ZombieAPI.GameObjects.GEntity[]

Shutdown() public method

Unloads resources, Removes hooks and exits the environment.
public Shutdown ( bool KillEnvironment ) : void
KillEnvironment bool Run after unloading everything
return void

Write() public method

Write a message to the jZm console.
public Write ( string message ) : void
message string The message that will be written to the console
return void

WriteLine() public method

Write a line to the jZm console.
public WriteLine ( string message ) : void
message string The message that will be written to the console
return void

WriteLine() public method

A overload for diagnostic messages. Works the same as WriteLine
public WriteLine ( string message, bool debug ) : void
message string The message that will be written to the console
debug bool Doesn't matter what you pass to this parameter, It'll be send to the debug event.
return void

ZombieAPI() public method

If you're trying to do this from a plugin, you're doing it wrong. Use the Init(ZombieAPI) function to get the ZombieAPI object.
public ZombieAPI ( ) : System
return System

Property Details

BaseProcess public_oe property

public Process,System.Diagnostics BaseProcess
return System.Diagnostics.Process

Version public_oe static_oe property

jZm version, format: x.x.x.x-BUILD
public static string Version
return string