ZomBerry is still in early testing stage, please report about any issues! Don't forget to mention game version in issue description
Please refer to the workshop page
ZomBerry was created to be as simple and lightweight for users and developers as possible. Right now, there are two main functions available:
AddCategory requires two arguments:
GetZomberryCmdAPI().AddCategory("MyMod", COLOR_RED);
AddCommand requires four arguments and have two optional arguments:
GetZomberryCmdAPI().AddCommand("Induce sneeze", "MyModSneezeTarget", this, "MyMod", true);
Example with custom parameters:
GetZomberryCmdAPI().AddCommand("Set time", "SetTime", this, "MyMod", false, {
new ZBerryFuncParam("Hour", {0, 23, 12,}), //Params are: string paramName, TIntArray {minValue, maxValue, defaultValue}
new ZBerryFuncParam("Minute", {0, 59, 0,}), //You may use up to 3 custom parameters, this example contains only 2
});
Your function will be called with five arguments:
Note: you may get PlayerBase of player's character using ZBGetPlayerById(int playerId)
function
Example of CmdAPI interaction can be found here and here
Done: