Made class menus and a class data dump console command.
This commit is contained in:
@ -5,7 +5,6 @@
|
||||
*
|
||||
* File: apply.inc
|
||||
* Description: Functions for applying attributes and effects on a client.
|
||||
* Author: Richard Helgeby
|
||||
*
|
||||
* ============================================================================
|
||||
*/
|
||||
|
@ -5,7 +5,6 @@
|
||||
*
|
||||
* File: attributes.inc
|
||||
* Description: Retrieving class attributes from certain caches.
|
||||
* Author: Richard Helgeby
|
||||
*
|
||||
* ============================================================================
|
||||
*/
|
||||
|
99
src/zr/playerclasses/classcommands.inc
Normal file
99
src/zr/playerclasses/classcommands.inc
Normal file
@ -0,0 +1,99 @@
|
||||
/*
|
||||
* ============================================================================
|
||||
*
|
||||
* Zombie:Reloaded
|
||||
*
|
||||
* File: classcommands.inc
|
||||
* Description: Console commands for working with classes.
|
||||
*
|
||||
* ============================================================================
|
||||
*/
|
||||
|
||||
/**
|
||||
* Dumps class data at a specified index in the specified cache.
|
||||
*/
|
||||
public Action:Command_ClassDump(client, argc)
|
||||
{
|
||||
decl String:syntax[1024];
|
||||
syntax[0] = 0;
|
||||
|
||||
if (argc < 2)
|
||||
{
|
||||
// Write syntax info.
|
||||
StrCat(syntax, sizeof(syntax), "Dumps class data at a specified index in the specified cache. Usage: zr_class_dump <cachetype> <index|targetname>\n\n");
|
||||
StrCat(syntax, sizeof(syntax), "Cache types:\n");
|
||||
StrCat(syntax, sizeof(syntax), "original - Unmodified class data\n");
|
||||
StrCat(syntax, sizeof(syntax), "modified - Newest class data\n");
|
||||
StrCat(syntax, sizeof(syntax), "player - Players class data\n");
|
||||
ReplyToCommand(client, syntax);
|
||||
|
||||
return Plugin_Handled;
|
||||
}
|
||||
|
||||
new cachetype = -1;
|
||||
new index = -1;
|
||||
|
||||
decl String:type[64];
|
||||
decl String:target[64];
|
||||
decl String:buffer[2048];
|
||||
|
||||
// Quick initialize buffer.
|
||||
buffer[0] = 0;
|
||||
|
||||
// Get cache type.
|
||||
GetCmdArg(1, type, sizeof(type));
|
||||
|
||||
// Set cache type depending on parameter setting.
|
||||
if (StrEqual(type, "original", false))
|
||||
{
|
||||
cachetype = ZR_CLASS_CACHE_ORIGINAL;
|
||||
}
|
||||
else if (StrEqual(type, "modified", false))
|
||||
{
|
||||
cachetype = ZR_CLASS_CACHE_MODIFIED;
|
||||
}
|
||||
else if (StrEqual(type, "player", false))
|
||||
{
|
||||
cachetype = ZR_CLASS_CACHE_PLAYER;
|
||||
|
||||
// Get client index.
|
||||
GetCmdArg(2, target, sizeof(target));
|
||||
index = FindTarget(client, target, _, false);
|
||||
|
||||
// Check if failed.
|
||||
if (index < 0)
|
||||
{
|
||||
ReplyToCommand(client, "Invalid target name.");
|
||||
return Plugin_Handled;
|
||||
}
|
||||
}
|
||||
|
||||
// Check if cachetype is valid.
|
||||
if (cachetype < 0)
|
||||
{
|
||||
ReplyToCommand(client, "Invalid cache type.");
|
||||
return Plugin_Handled;
|
||||
}
|
||||
|
||||
// Validate class index.
|
||||
if (cachetype != ZR_CLASS_CACHE_PLAYER)
|
||||
{
|
||||
// Get class index.
|
||||
GetCmdArg(2, target, sizeof(target));
|
||||
index = StringToInt(target);
|
||||
|
||||
if (!ClassValidateIndex(index))
|
||||
{
|
||||
ReplyToCommand(client, "Invalid class index.");
|
||||
return Plugin_Handled;
|
||||
}
|
||||
}
|
||||
|
||||
// Dump the specified cache.
|
||||
ReplyToCommand(client, "DUMPING CACHE: \"%s\" (%d classes total)\n========================================\n", type, ClassCount);
|
||||
ClassDumpData(index, cachetype, buffer, sizeof(buffer));
|
||||
ZR_ReplyToCommandLong(client, buffer);
|
||||
|
||||
return Plugin_Handled;
|
||||
|
||||
}
|
@ -5,7 +5,6 @@
|
||||
*
|
||||
* File: classevents.inc
|
||||
* Description: Functions for handling class related events.
|
||||
* Author: Richard Helgeby
|
||||
*
|
||||
* ============================================================================
|
||||
*/
|
||||
@ -45,7 +44,7 @@ ClassOnClientSpawn(client)
|
||||
|
||||
if (showmenu && !randomclass)
|
||||
{
|
||||
//ClassMenu(client);
|
||||
ClassMenuMain(client);
|
||||
}
|
||||
|
||||
// Assign random classes if enabled.
|
||||
|
@ -5,7 +5,6 @@
|
||||
*
|
||||
* File: classmenus.inc
|
||||
* Description: Provides functions for managing class menus.
|
||||
* Author: Richard Helgeby, Greyscale
|
||||
*
|
||||
* ============================================================================
|
||||
*/
|
||||
@ -34,15 +33,25 @@ Admin mode is enabled!
|
||||
|
||||
*/
|
||||
|
||||
/* ------------------------------------
|
||||
*
|
||||
* MAIN CLASS MENU
|
||||
*
|
||||
* ------------------------------------
|
||||
*/
|
||||
|
||||
/**
|
||||
* Displays the main class menu with the players class settings.
|
||||
*
|
||||
* @param client The client index.
|
||||
*/
|
||||
ClassMenuMain(client)
|
||||
{
|
||||
new Handle:classmenu = CreateMenu(ClassMenuMainHandle);
|
||||
new Handle:menu = CreateMenu(ClassMenuMainHandle);
|
||||
new itemdraw = (IsClientAdmin(client)) ? ITEMDRAW_DEFAULT : ITEMDRAW_DISABLED;
|
||||
|
||||
SetGlobalTransTarget(client);
|
||||
SetMenuTitle(classmenu, "%t\n", "!zclass title");
|
||||
SetMenuTitle(menu, "%t\n", "!zclass title");
|
||||
|
||||
decl String:zombieclass[128];
|
||||
decl String:humanclass[128];
|
||||
@ -53,78 +62,216 @@ ClassMenuMain(client)
|
||||
decl String:adminselect[128];
|
||||
|
||||
decl String:inadminmnode[128];
|
||||
decl String:adminmnode[128];
|
||||
decl String:toggleadminmnode[128];
|
||||
decl String:adminmode[128];
|
||||
decl String:toggleadminmode[128];
|
||||
|
||||
// Check if the player is in admin mode.
|
||||
if (ClassPlayerInAdminMode(client))
|
||||
if (ClassPlayerInAdminMode[client])
|
||||
{
|
||||
// Notify the player.
|
||||
Format(adminmode, sizeof(adminmode), "%t\n", "!zclass admin mode enabled");
|
||||
AddMenuItem(classmenu, "", adminmode, ITEMDRAW_RAWLINE);
|
||||
Format(inadminmnode, sizeof(inadminmnode), "%t\n", "!zclass admin mode enabled");
|
||||
AddMenuItem(menu, "", inadminmnode, ITEMDRAW_RAWLINE);
|
||||
}
|
||||
|
||||
// List zombie class options.
|
||||
ClassGetName(ClassSelected[client][ZR_CLASS_TEAM_ZOMBIES, zombieclass, sizeof(zombieclass), ZR_CLASS_CACHE_MODIFIED);
|
||||
Format(zombieselect, sizeof(zombieselect), "%t\n-%s", "!zclass zombie", zombieclass);
|
||||
AddMenuItem(classmenu, "", zombieselect);
|
||||
ClassGetName(ClassSelected[client][ZR_CLASS_TEAM_ZOMBIES], zombieclass, sizeof(zombieclass), ZR_CLASS_CACHE_MODIFIED);
|
||||
Format(zombieselect, sizeof(zombieselect), "%t\n %s", "!zclass zombie", zombieclass);
|
||||
AddMenuItem(menu, "", zombieselect);
|
||||
|
||||
// List human class options.
|
||||
ClassGetName(client, humanclass, sizeof(zombieclass));
|
||||
Format(zombieselect, sizeof(zombieselect), "%t\n-%s", "!zclass human", humanclass);
|
||||
AddMenuItem(classmenu, "", zombieselect);
|
||||
|
||||
// List admin class options.
|
||||
ClassGetName(client, adminclass, sizeof(adminclass));
|
||||
Format(adminselect, sizeof(adminselect), "%t\n-%s", "!zclass admin", adminclass);
|
||||
AddMenuItem(classmenu, "", adminselect);
|
||||
ClassGetName(ClassSelected[client][ZR_CLASS_TEAM_HUMANS], humanclass, sizeof(humanclass), ZR_CLASS_CACHE_MODIFIED);
|
||||
Format(humanselect, sizeof(humanselect), "%t\n %s", "!zclass human", humanclass);
|
||||
AddMenuItem(menu, "", humanselect);
|
||||
|
||||
if (IsClientAdmin(client))
|
||||
{
|
||||
// Show admin mode toggle option.
|
||||
AddMenuItem(classmenu, "", " ", ITEMDRAW_SPACER);
|
||||
// List admin class options.
|
||||
ClassGetName(ClassSelected[client][ZR_CLASS_TEAM_ADMINS], adminclass, sizeof(adminclass), ZR_CLASS_CACHE_MODIFIED);
|
||||
Format(adminselect, sizeof(adminselect), "%t\n %s", "!zclass admin", adminclass);
|
||||
AddMenuItem(menu, "", adminselect, itemdraw);
|
||||
|
||||
// TODO: Translate or use core phrases!
|
||||
// Set admin mode status string.
|
||||
if (ClassPlayerAdminMode[client])
|
||||
{
|
||||
Format(adminmnode, sizeof(adminmnode), "Enabled");
|
||||
Format(adminmode, sizeof(adminmode), "%t", "On");
|
||||
}
|
||||
else
|
||||
{
|
||||
Format(adminmnode, sizeof(adminmnode), "Disabled");
|
||||
Format(adminmode, sizeof(adminmode), "%t", "Off");
|
||||
}
|
||||
|
||||
Format(toggleadminmode, sizeof(toggleadminmode), "%t\n-%s", "!zclass admin mode toggle", adminmode);
|
||||
// Show admin mode toggle option.
|
||||
Format(toggleadminmode, sizeof(toggleadminmode), "%t\n %s", "!zclass admin mode toggle", adminmode);
|
||||
AddMenuItem(menu, "", toggleadminmode);
|
||||
}
|
||||
|
||||
/*for (new x = 0; x < classCount; x++)
|
||||
{
|
||||
GetClassName(x, display, sizeof(display));
|
||||
GetClassMenuDescription(x, menu_description, sizeof(menu_description));
|
||||
|
||||
if (pNextClass[client] == -1)
|
||||
{
|
||||
if (x == pClass[client])
|
||||
{
|
||||
Format(display, sizeof(display), "%s (current)", display);
|
||||
}
|
||||
}
|
||||
else if (x == pNextClass[client])
|
||||
{
|
||||
Format(display, sizeof(display), "%s (current)", display);
|
||||
}
|
||||
|
||||
Format(display, sizeof(display), "%s\n %s", display, menu_description);
|
||||
|
||||
AddMenuItem(menu_classes, "", display);
|
||||
}
|
||||
|
||||
SetMenuExitBackButton(menu_classes, true);*/
|
||||
|
||||
DisplayMenu(classmenu, client, MENU_TIME_FOREVER);
|
||||
SetMenuExitBackButton(menu, true);
|
||||
DisplayMenu(menu, client, MENU_TIME_FOREVER);
|
||||
}
|
||||
|
||||
ClassMenuMainHandle(Handle:classmenu, MenuAction:action, client, slot)
|
||||
/**
|
||||
* Main class menu handle.
|
||||
*/
|
||||
public ClassMenuMainHandle(Handle:menu, MenuAction:action, client, slot)
|
||||
{
|
||||
switch (action)
|
||||
{
|
||||
case MenuAction_Select:
|
||||
{
|
||||
switch(slot)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
ClassMenuSelect(client, ZR_CLASS_TEAM_ZOMBIES);
|
||||
}
|
||||
case 1:
|
||||
{
|
||||
ClassMenuSelect(client, ZR_CLASS_TEAM_HUMANS);
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
ClassMenuSelect(client, ZR_CLASS_TEAM_ADMINS);
|
||||
}
|
||||
case 3:
|
||||
{
|
||||
ClassMenuToggleAdmin(client);
|
||||
}
|
||||
}
|
||||
}
|
||||
case MenuAction_End:
|
||||
{
|
||||
CloseHandle(menu);
|
||||
}
|
||||
case MenuAction_Cancel:
|
||||
{
|
||||
if (slot == MenuCancel_ExitBack)
|
||||
{
|
||||
MainMenu(client);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* ------------------------------------
|
||||
*
|
||||
* ZOMBIE CLASS SELECTION MENU
|
||||
*
|
||||
* ------------------------------------
|
||||
*/
|
||||
|
||||
/**
|
||||
* Displays the class selection menu.
|
||||
*
|
||||
* @param client The client index.
|
||||
* @param teamid What class types to display.
|
||||
*/
|
||||
ClassMenuSelect(client, teamid)
|
||||
{
|
||||
new Handle:menu = CreateMenu(ClassMenuSelectHandle);
|
||||
new arraycount;
|
||||
new classindex;
|
||||
|
||||
decl String:title[64];
|
||||
decl String:classname[64];
|
||||
decl String:description[256];
|
||||
decl String:menuitem[320];
|
||||
|
||||
SetGlobalTransTarget(client);
|
||||
|
||||
// Set correct menu title depending on team ID.
|
||||
switch (teamid)
|
||||
{
|
||||
case ZR_CLASS_TEAM_ZOMBIES:
|
||||
{
|
||||
Format(title, sizeof(title), "%t\n", "!zclass zombie");
|
||||
}
|
||||
case ZR_CLASS_TEAM_HUMANS:
|
||||
{
|
||||
Format(title, sizeof(title), "%t\n", "!zclass human");
|
||||
}
|
||||
case ZR_CLASS_TEAM_ADMINS:
|
||||
{
|
||||
Format(title, sizeof(title), "%t\n", "!zclass admin");
|
||||
}
|
||||
}
|
||||
SetMenuTitle(menu, title);
|
||||
|
||||
// Create buffer array.
|
||||
new Handle:classarray = CreateArray();
|
||||
|
||||
// Copy all class indexes into the array, with the specified team filter.
|
||||
if (ClassAddToArray(classarray, teamid))
|
||||
{
|
||||
// Get number of classes.
|
||||
arraycount = GetArraySize(classarray);
|
||||
|
||||
// Loop through each class.
|
||||
for (new i = 0; i < arraycount; i++)
|
||||
{
|
||||
// Get index, name and description.
|
||||
classindex = GetArrayCell(classarray, i);
|
||||
ClassGetName(classindex, classname, sizeof(classname), ZR_CLASS_CACHE_MODIFIED);
|
||||
ClassGetDescription(classindex, description, sizeof(description), ZR_CLASS_CACHE_MODIFIED);
|
||||
|
||||
// Add menu item.
|
||||
Format(menuitem, sizeof(menuitem), "%s\n %s", classname, description);
|
||||
AddMenuItem(menu, classname, menuitem);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
SetMenuExitBackButton(menu, true);
|
||||
DisplayMenu(menu, client, MENU_TIME_FOREVER);
|
||||
}
|
||||
|
||||
/**
|
||||
* Class selection menu handle.
|
||||
*/
|
||||
public ClassMenuSelectHandle(Handle:menu, MenuAction:action, client, slot)
|
||||
{
|
||||
decl String:classname[64];
|
||||
new classindex;
|
||||
new teamid;
|
||||
new bool:autoclose = GetConVarBool(gCvars[CVAR_MENU_AUTOCLOSE]);
|
||||
|
||||
switch (action)
|
||||
{
|
||||
case MenuAction_Select:
|
||||
{
|
||||
// Get class name from the information string.
|
||||
GetMenuItem(menu, slot, classname, sizeof(classname));
|
||||
|
||||
// Solve class index from the name.
|
||||
classindex = ClassGetIndex(classname);
|
||||
|
||||
// Solve teamid from the class index.
|
||||
teamid = ClassGetTeamID(classindex, ZR_CLASS_CACHE_MODIFIED);
|
||||
|
||||
// Set the players active class to the specified class.
|
||||
ClassSelected[client][teamid] = classindex;
|
||||
}
|
||||
case MenuAction_Cancel:
|
||||
{
|
||||
if (slot == MenuCancel_ExitBack)
|
||||
{
|
||||
ClassMenuMain(client);
|
||||
}
|
||||
}
|
||||
case MenuAction_End:
|
||||
{
|
||||
CloseHandle(menu);
|
||||
}
|
||||
}
|
||||
|
||||
// Redisplay the main class menu if autoclose is disabled.
|
||||
if (!autoclose)
|
||||
{
|
||||
ClassMenuMain(client);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
ClassMenuToggleAdmin(client)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -5,7 +5,6 @@
|
||||
*
|
||||
* File: clientalpha.inc
|
||||
* Description: Handles transparency on clients.
|
||||
* Author: Richard Helgeby
|
||||
*
|
||||
* ============================================================================
|
||||
*/
|
||||
|
@ -5,7 +5,6 @@
|
||||
*
|
||||
* File: clientoverlays.inc
|
||||
* Description: Handles overlays on clients, as a part of class attributes.
|
||||
* Author: Richard Helgeby
|
||||
*
|
||||
* ============================================================================
|
||||
*/
|
||||
|
@ -4,8 +4,7 @@
|
||||
* Zombie:Reloaded
|
||||
*
|
||||
* File: filtertools.inc
|
||||
* Description: Class system: Validating, getting indexes or lists
|
||||
* Author: Richard Helgeby
|
||||
* Description: Class system tools; validating, getting indexes or lists
|
||||
*
|
||||
* ============================================================================
|
||||
*/
|
||||
|
@ -5,7 +5,6 @@
|
||||
*
|
||||
* File: healthregen.inc
|
||||
* Description: Functions for managing health regeneration on a client.
|
||||
* Author: Richard Helgeby
|
||||
*
|
||||
* ============================================================================
|
||||
*/
|
||||
|
@ -5,7 +5,6 @@
|
||||
*
|
||||
* File: playerclasses.inc
|
||||
* Description: Provides functions for managing classes.
|
||||
* Author: Richard Helgeby, Greyscale
|
||||
*
|
||||
* ============================================================================
|
||||
*/
|
||||
@ -36,12 +35,6 @@
|
||||
depends on the original class knockback values. A solution might be
|
||||
to have another array of class data, which is never canged.
|
||||
|
||||
TODO: Make a solution with default valueas for each class team, without
|
||||
using CVARs.
|
||||
|
||||
SOLVED: Added boolean team_default class attribute. Default values
|
||||
will be used from the first class with this value set.
|
||||
|
||||
TODO: Make class attributes for for changing model render mode and colors.
|
||||
|
||||
TODO: Make class attributes for fancy effects, like a glow (if possible).
|
||||
@ -249,6 +242,8 @@ new bool:ClassPlayerAdminMode[MAXPLAYERS + 1];
|
||||
#include "zr/playerclasses/clientalpha"
|
||||
#include "zr/playerclasses/healthregen"
|
||||
#include "zr/playerclasses/classevents"
|
||||
#include "zr/playerclasses/classmenus"
|
||||
#include "zr/playerclasses/classcommands"
|
||||
|
||||
/**
|
||||
* Loads class attributes from playerclasses.txt into the ClassData array. If
|
||||
@ -632,3 +627,114 @@ ClassClientSetDefaultIndexes(client = -1)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Dump class data into a string. String buffer length should be at about 2048
|
||||
* cells.
|
||||
*
|
||||
* @param index Index of the class in a class cache or a client index,
|
||||
* depending on the cache type specified.
|
||||
* @param cachetype Optional. Specifies what class cache to read from. Options:
|
||||
* ZR_CLASS_CACHE_ORIGINAL - Unchanced class data.
|
||||
* ZR_CLASS_CACHE_MODIFIED (default) - Changed/newest class
|
||||
* data.
|
||||
* ZR_CLASS_CACHE_PLAYER - Player cache. If this one is used,
|
||||
* index will be used as a client index.
|
||||
* @return Number of cells written.
|
||||
*/
|
||||
ClassDumpData(index, cachetype, String:buffer[], maxlen)
|
||||
{
|
||||
new cellcount;
|
||||
decl String:attribute[320];
|
||||
decl String:format_buffer[256];
|
||||
|
||||
if (maxlen == 0)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
Format(format_buffer, sizeof(format_buffer), "Class data at index %d:\n", index);
|
||||
cellcount += StrCat(buffer, maxlen, format_buffer);
|
||||
cellcount += StrCat(buffer, maxlen, "-------------------------------------------------------------------------------\n");
|
||||
|
||||
Format(attribute, sizeof(attribute), "enabled: \"%d\"\n", ClassIsEnabled(index, cachetype));
|
||||
cellcount += StrCat(buffer, maxlen, attribute);
|
||||
|
||||
Format(attribute, sizeof(attribute), "team: \"%d\"\n", ClassGetTeamID(index, cachetype));
|
||||
cellcount += StrCat(buffer, maxlen, attribute);
|
||||
|
||||
Format(attribute, sizeof(attribute), "team_default: \"%d\"\n", ClassGetTeamDefault(index, cachetype));
|
||||
cellcount += StrCat(buffer, maxlen, attribute);
|
||||
|
||||
ClassGetName(index, format_buffer, sizeof(format_buffer), cachetype);
|
||||
Format(attribute, sizeof(attribute), "name: \"%s\"\n", format_buffer);
|
||||
cellcount += StrCat(buffer, maxlen, attribute);
|
||||
|
||||
ClassGetDescription(index, format_buffer, sizeof(format_buffer), cachetype);
|
||||
Format(attribute, sizeof(attribute), "description: \"%s\"\n", format_buffer);
|
||||
cellcount += StrCat(buffer, maxlen, attribute);
|
||||
|
||||
ClassGetModelPath(index, format_buffer, sizeof(format_buffer), cachetype);
|
||||
Format(attribute, sizeof(attribute), "model_path: \"%s\"\n", format_buffer);
|
||||
cellcount += StrCat(buffer, maxlen, attribute);
|
||||
|
||||
Format(attribute, sizeof(attribute), "alpha_initial: \"%d\"\n", ClassGetAlphaInitial(index, cachetype));
|
||||
cellcount += StrCat(buffer, maxlen, attribute);
|
||||
|
||||
Format(attribute, sizeof(attribute), "alpha_damaged: \"%d\"\n", ClassGetAlphaDamaged(index, cachetype));
|
||||
cellcount += StrCat(buffer, maxlen, attribute);
|
||||
|
||||
Format(attribute, sizeof(attribute), "alpha_damage: \"%d\"\n", ClassGetAlphaDamage(index, cachetype));
|
||||
cellcount += StrCat(buffer, maxlen, attribute);
|
||||
|
||||
ClassGetOverlayPath(index, format_buffer, sizeof(format_buffer), cachetype);
|
||||
Format(attribute, sizeof(attribute), "overlay_path: \"%s\"\n", format_buffer);
|
||||
cellcount += StrCat(buffer, maxlen, attribute);
|
||||
|
||||
Format(attribute, sizeof(attribute), "nvgs: \"%d\"\n", ClassGetNvgs(index, cachetype));
|
||||
cellcount += StrCat(buffer, maxlen, attribute);
|
||||
|
||||
Format(attribute, sizeof(attribute), "fov: \"%d\"\n", ClassGetFOV(index, cachetype));
|
||||
cellcount += StrCat(buffer, maxlen, attribute);
|
||||
|
||||
Format(attribute, sizeof(attribute), "napalm_time: \"%f\"\n", ClassGetNapalmTime(index, cachetype));
|
||||
cellcount += StrCat(buffer, maxlen, attribute);
|
||||
|
||||
Format(attribute, sizeof(attribute), "immunity_mode: \"%d\"\n", ClassGetImmunityMode(index, cachetype));
|
||||
cellcount += StrCat(buffer, maxlen, attribute);
|
||||
|
||||
Format(attribute, sizeof(attribute), "immunity_amount: \"%f\"\n", ClassGetImmunityAmount(index, cachetype));
|
||||
cellcount += StrCat(buffer, maxlen, attribute);
|
||||
|
||||
Format(attribute, sizeof(attribute), "no_fall_damage: \"%d\"\n", ClassGetNoFallDamage(index, cachetype));
|
||||
cellcount += StrCat(buffer, maxlen, attribute);
|
||||
|
||||
Format(attribute, sizeof(attribute), "health: \"%d\"\n", ClassGetHealth(index, cachetype));
|
||||
cellcount += StrCat(buffer, maxlen, attribute);
|
||||
|
||||
Format(attribute, sizeof(attribute), "health_regen_interval: \"%f\"\n", ClassGetHealthRegenInterval(index, cachetype));
|
||||
cellcount += StrCat(buffer, maxlen, attribute);
|
||||
|
||||
Format(attribute, sizeof(attribute), "health_regen_amount: \"%d\"\n", ClassGetHealthRegenAmount(index, cachetype));
|
||||
cellcount += StrCat(buffer, maxlen, attribute);
|
||||
|
||||
Format(attribute, sizeof(attribute), "health_infect_gain: \"%d\"\n", ClassGetHealthInfectGain(index, cachetype));
|
||||
cellcount += StrCat(buffer, maxlen, attribute);
|
||||
|
||||
Format(attribute, sizeof(attribute), "kill_bonus: \"%d\"\n", ClassGetKillBonus(index, cachetype));
|
||||
cellcount += StrCat(buffer, maxlen, attribute);
|
||||
|
||||
Format(attribute, sizeof(attribute), "speed: \"%f\"\n", ClassGetSpeed(index, cachetype));
|
||||
cellcount += StrCat(buffer, maxlen, attribute);
|
||||
|
||||
Format(attribute, sizeof(attribute), "knockback: \"%f\"\n", ClassGetKnockback(index, cachetype));
|
||||
cellcount += StrCat(buffer, maxlen, attribute);
|
||||
|
||||
Format(attribute, sizeof(attribute), "jump_height: \"%f\"\n", ClassGetJumpHeight(index, cachetype));
|
||||
cellcount += StrCat(buffer, maxlen, attribute);
|
||||
|
||||
Format(attribute, sizeof(attribute), "jump_distance: \"%f\"\n", ClassGetJumpDistance(index, cachetype));
|
||||
cellcount += StrCat(buffer, maxlen, attribute);
|
||||
|
||||
return cellcount;
|
||||
}
|
||||
|
Reference in New Issue
Block a user