Raised This Month: $ Target: $400
 0% 

Exp Base - Classname help?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Erox902
Veteran Member
Join Date: Jun 2009
Location: Never Never Land
Old 04-12-2011 , 17:11   Exp Base - Classname help?
Reply With Quote #1

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 :/

Last edited by Erox902; 04-27-2011 at 09:30.
Erox902 is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 20:12.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode