Hi.
Im a litle new, begining to understand some of the code, but still new to amx modx.
In my plugin I want to tell the client wich 'class' he is. My plugin is kinda
giant so ill just post som of the code in PHP.
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fakemeta>
#define CLASS_NOTHING 0
#define CLASS_WARLOCK 1
#define CLASS_MAGE 2
#define CLASS_WARRIOR 3
#define CLASS_ROUGE 4
public plugin_init()
{
register_clcmd("say showclass", "ShowChar")
}
public ShowChar(id) {
if ( PlayerClass[id] == CLASS_NOTHING) {
Change(id)
set_hudmessage(0, 255, 255, -1.0, -1.0, 0, 6.0, 12.0)
show_hudmessage(id, "[WOW] You haven't choosen a class !")
return PLUGIN_HANDLED;
}
if ( PlayerClass[id] == CLASS_WARLOCK) {
set_hudmessage(0, 255, 255, -1.0, -1.0, 0, 6.0, 12.0)
show_hudmessage(id, "[WOW] You are a Warlock !")
return PLUGIN_HANDLED;
}
if ( PlayerClass[id] == CLASS_MAGE) {
set_hudmessage(0, 255, 255, -1.0, -1.0, 0, 6.0, 12.0)
show_hudmessage(id, "[WOW] You are a Mage !")
return PLUGIN_HANDLED;
}
if ( PlayerClass[id] == CLASS_WARRIOR) {
set_hudmessage(0, 255, 255, -1.0, -1.0, 0, 6.0, 12.0)
show_hudmessage(id, "[WOW] You are a Warrior !")
return PLUGIN_HANDLED;
}
if ( PlayerClass[id] == CLASS_ROUGE) {
set_hudmessage(0, 255, 255, -1.0, -1.0, 0, 6.0, 12.0)
show_hudmessage(id, "[WOW] You are a Rouge !")
return PLUGIN_HANDLED;
}
return PLUGIN_HANDLED;
}
This is kinda huge, and I have 9 classes, so coulden't I make this another way ?