Hi from Estonia
I want to create a new mod: Diablo 3
I just started to work with plugins, but I did know C / C++ a little, so i understand the code.
I have a problem with Changing + Gaining the Class.
Here's the code:
Code:
/*
Plugin author: Oxxy / Oxxygen / Linux
Here you can find my plugins: ScreamRO.com/cs/dev
Diablo 3 Mod!
*/
#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <hamsandwich>
#include <cstrike>
#define PLUGIN "Diablo 3 MOD"
#define VERSION "0.1"
#define AUTHOR "Linux"
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say /class", "diablomenu", ADMIN_ALL, "Diablo 3 Class Menu")
}
public diablomenu(id) {
new menu = menu_create("Choose your class", "classmenu")
menu_additem(menu, "Wizard","1")
menu_additem(menu, "Witch Doctor", "2")
menu_additem(menu, "Barbarian", "3")
menu_additem(menu, "Monk", "4")
menu_additem(menu, "Demon Hunter", "5")
menu_setprop(menu, MPROP_EXITNAME, "Exit Menu")
menu_setprop(menu, MPROP_EXIT,MEXIT_ALL)
menu_display(id, menu, 0)
//return PLUGIN_HANDLED
}
public classmenu(id, menu, diablo_class)
{
switch(diablo_class)
{
case 0:
{
if(is_user_alive(id))
give_item(id, "weapon_usp")
}
}
return PLUGIN_HANDLED;
}
Yeah, I tried to create the function that will change class, but it was unsucessfully... So, maybe anyone can show me how to create the Class and the Changing class when you use the /class command(chane class with menu help)
Sorry, for my bad english.