Raised This Month: $ Target: $400
 0% 

Need help with Classes


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Oxxy
Junior Member
Join Date: Mar 2012
Old 03-07-2012 , 08:51   Need help with Classes
Reply With Quote #1

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.
Oxxy is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 03-09-2012 , 03:12   Re: Need help with Classes
Reply With Quote #2

You should tell us which class, which weapons should have, then we might get this to fix it for you :p
__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
Reply



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 22:01.


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