C# Class ZombieAPI.ZombieAPI

The publicy available API to all plugin.
Afficher le fichier Open project: jariz/jZm Class Usage Examples

Méthodes publiques

Свойство Type Description
BaseProcess System.Diagnostics.Process
Version string

Méthodes publiques

Méthode 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

Méthode 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 méthode

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)
Résultat void

Crash() public méthode

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
Résultat void

GetActors() public méthode

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

GetBarriers() public méthode

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

GetBus() public méthode

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

GetDVar() public méthode

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

GetDVarValue() public méthode

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

GetInstance() public static méthode

Get current ZombieAPI instance
public static GetInstance ( ) : ZombieAPI
Résultat ZombieAPI

GetPlayers() public méthode

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

GetScriptMovers() public méthode

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[]
Résultat ZombieAPI.GameObjects.GEntity[]

Shutdown() public méthode

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

Write() public méthode

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

WriteLine() public méthode

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

WriteLine() public méthode

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.
Résultat void

ZombieAPI() public méthode

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
Résultat System

Property Details

BaseProcess public_oe property

public Process,System.Diagnostics BaseProcess
Résultat System.Diagnostics.Process

Version public_oe static_oe property

jZm version, format: x.x.x.x-BUILD
public static string Version
Résultat string