Hey i'm trying to make a basic xp mod.. but I want people to gain "Classname" instead of choosing like:
Code:
public Deathmsg()
{
new attacker = read_data(1)
new victim = read_data(2)
blablabla playerExp[id] += bla;
while(playerLevel[id] >= 5
{
playerClass[id] = 1//in this case "animal planet"
}
while(playerLevel[id] >= 10
{
playerClass[id] = 2//in this case "star wars"
}
I have tried several ways but this way worked untill it was time to change classname that will say... at that point it froze cs totaly :/
Code:
#include <amxmodx>
#include <amxmisc>
#define MAXCLASSES 5
enum {
CLASS_HORSESHOE = 0,
CLASS_ANIMALPLANET = 1,
CLASS_STARWARS = 2,
CLASS_HARRYPOTTER = 3,
CLASS_MRMIME = 4
}
new const CLASSES[MAXCLASSES][] ={
"Horse Shoe",
"Animal Planet",
"Star Wars",
"Harry Potter",
"Mr Mime"
};
... Awesome Classnames xD
and for the way to show it I use a menu like:
Code:
new MainTitle[128]
format(MainTitle, 127, "\rExpMod^n\wMain Menu^n^nExp: \y%i^n\wLvl: \y%i^n\wClass: \y%s", playerExp[id], playerLevel[id], CLASSES[playerClass[id]]);
new Main = menu_create(MainTitle, "handleMain");
Anyone think they know how to fix this?... not that great with enums :/