This project is still under active development
What you're looking at here is:
- Plugin-based system
- Fully opensource
- Fully C#
- Fully .NET 4.0
- Fully external (no injection etc)
- Players
- DVars
- DVars contents
- Entities
- Portals
- Kick, Ignite, Electrocute, IPrintLn, Tell, SetClientDVar, etc
- Console & GUI interface (2 executables)
- Several events
- Will never need a update based on a new version of the game, It can 'recognize' the addresses
Still planned:
- More events
- More events
- More.... events?
- Entity adding/spawning
- Better entity control (move zombies, etc?)
- Ideas are more than welcome, post as many as you can think of, even if they're really stupid
Docs are available here if you want to have a peek:
http://jariz.github.com/jZmDocs/Index.html (outdated atm, will recompile tomorrow)
Github here:
http://github.com/jariz/jZm/
Contributors:
Plugin example (portal testing plugin)
Portal testing plugin:
Code:
;
ZombieAPI API;
public void Init(ZombieAPI API)
{
this.API = API;
Portal p = new Portal(-6865.08154f, 5076.141f, 50f);
p.PortalTriggered += new PortalHandler(p_PortalTriggered);
API.Portals.Add(p);
}
void p_PortalTriggered(Portal portal, Player player)
{
float[] bus = API.GetBus().Origin;
bus[2] += 200;
player.World.Origin = bus;
player.Ignite();
}'Mod' featured in gameplay (Sharpshooter):
Just a example, not done yet
Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ZombieAPI;
using ZombieAPI.GameObjects;
namespace Sharpshooter
{
public class Plugin : jZmPlugin
{
public string Name
{
get
{
return "Sharpshooter";
}
}
public string Desc
{
get
{
return "Simple sharpshooter mod. Switches the player's weapons every 30 seconds. Very light.";
}
}
public string Author
{
get
{
return "JariZ";
}
}
string[] Restricted_Weapons = new string[] {
"defaultweapon_mp"
};
ZombieAPI.ZombieAPI API;
List<string> Weaps = new List<string>();
bool Run = false;
public void Init(ZombieAPI.ZombieAPI API)
{
this.API = API;
API.OnFrame += new OnFrameHandler(API_OnFrame);
API.OnMapLoad += new MapHandler(API_OnMapLoad);
API.OnMapDestroy += new MapHandler(API_OnMapDestroy);
}
void API_OnMapDestroy()
{
Run = false;
}
void API_OnMapLoad()
{
Run = true;
current_weapon_index = 0;
last_tick = -1;
}
long last_tick = -1;
int current_weapon_index = 0;
void API_OnFrame()
{
if (!Run)
return;
if (Weaps.Count == 0 && API.Weapons.Count != 0)
{
foreach(KeyValuePair<int,string> Wep in API.Weapons)
{
if (!Restricted_Weapons.Contains(Wep.Value))
Weaps.Add(Wep.Value);
}
Randomize();
}
if (last_tick == -1)
last_tick = DateTime.Now.Ticks;
int seconds = new DateTime(DateTime.Now.Ticks - last_tick).Second;
int ms = new DateTime(DateTime.Now.Ticks - last_tick).Millisecond;
bool warned = false;
if (seconds >= 30)
{
foreach (Player player in API.GetPlayers())
{
current_weapon_index++;
if (current_weapon_index == Weaps.Count -2)
{
Randomize();
current_weapon_index = 0;
}
player.Electrocute();
player.iPrintBoldLn("^" + (int)ColorCodes.Yellow + "WEAPONS CYCLED");
player.Weapons.PrimaryWeapon = Weaps[current_weapon_index];
player.Weapons.CurrentWeapon = Weaps[current_weapon_index];
player.Weapons.PrimaryAmmoStock = 255;
}
warned = false;
last_tick = DateTime.Now.Ticks;
}
else if (seconds <= 20 && warned == false)
{
foreach (Player player in API.GetPlayers())
{
player.iPrintLn("^" + (int)ColorCodes.Green + "10 seconds^" + (int)ColorCodes.White + " until your weapon will be cycled!");
}
warned = true;
}
else
{
foreach (Player player in API.GetPlayers())
{
if (Weaps.Count > 0)
{
player.Weapons.PrimaryWeapon = Weaps[current_weapon_index];
player.Weapons.CurrentWeapon = Weaps[current_weapon_index];
player.Weapons.TacticalWeapon = "";
player.Weapons.SecondaryWeapon = "";
player.Weapons.LethalWeapon = "";
}
}
}
}
void Randomize()
{
Weaps = Weaps.OrderBy(wep => new Random().Next()).ToList();
}
}
}


![[Image: 30xhrep.png]](http://i48.tinypic.com/30xhrep.png)

gonn bookmark this thread anyhow! would donate if i could