Raised This Month: $ Target: $400
 0% 

How to fix this of my menu


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
hpservers
Junior Member
Join Date: Aug 2013
Old 08-25-2013 , 21:56   How to fix this of my menu
Reply With Quote #1

Where is my errors in this plugin?
I want to create VIP For JailBreak AMXX
Look My Code:
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <cstrike>

#define VIP_LEVEL ADMIN_LEVEL_H
new mVIPMenu // Menu
new mcbVIPMenu // Menu Callback

new cvar_hptype_armorcvar_armor

public plugin_init() {
    
menu_display(idmVIPMenu0);
    
mVIPMenu menu_create("VIP Menu""mh_VIPMenu")
    
mcbVIPMenu menu_makecallback("mcb_VIPMenu")
    
menu_additem(mVIPMenu"FD For You""ma_VIPMenu"ADMIN_LEVEL_HmcbVIPMenu)
    
menu_additem(mVIPMenu"Glow For You""ma_VIPMenu"ADMIN_LEVEL_HmcbVIPMenu)
    
menu_additem(mVIPMenu"3 Packs For You""ma_VIPMenu"ADMIN_LEVEL_HmcbVIPMenu)

    
register_plugin("PLUGIN""VERSION""AUTHOR")
    
register_clcmd("say /vip""mVIPMenu"ADMIN_LEVEL_H"- This is command to open menu for vip")
    
cvar_hp register_cvar("vip_hp","115")
    
type_armor register_cvar("vip_armor_type""1")
    
cvar_armor register_cvar("vip_armor""120")
}


 
Menu VIP Menu

public mh_VIPMenu(idmenuitem) {
    
menu_item_setname("mVIPMenu"fd"FD For You");
    
menu_item_setname("mVIPMenu"glow"Glow For You");
    
menu_item_setname("mVIPMenu"packs"3 Packs For You");
    }
        return 
PLUGIN_HANDLED
    
{
}

public 
ma_VIPMenu(id) {
     
This event is called when an item was selected 
}

public 
mcb_VIPMenu(idmenuitem) {
     
This is the callback-eventhere you can set items enabled or disabled
     
If you want to enable an item, use: return ITEM_ENABLED
     
If you want to disable an item, use: return ITEM_DISABLED
}

public 
player_spawn(id)
{
    if(
is_user_alive(id) && (get_user_flags(id) & ADMIN_LEVEL_H))
    {    
        
set_user_health(id,get_pcvar_num(cvar_hp))
        
        if(
get_pcvar_num(type_armor) > 0cs_set_user_armor(id,get_pcvar_num(cvar_armor),CsArmorType:get_pcvar_num(type_armor))
    }
}

public 
fd(id)
{
    static 
menumenuname[32], option[64]
    if(!
is_freeday() && ((is_user_alive(id) && cs_get_user_team(id) == CS_TEAM_T) || is_user_admin(id)))
    {
        
fd menu_create("VIP FD Menu""mh_VIPMenu"0);
        
menu_additem(fdfd"1"ADMIN_LEVEL_H);
        
menu_additem(fdfd"0"ADMIN_LEVEL_H, -1); 
        
menu_makecallback("mcb_VIPMenu");

        
menu_display(idmenu_fd);
    }
    
stock is_freeday()
    {
    return (
g_FreedayNext || g_Freeday || (g_JailDay == 1))
    }
}

public 
glow(id

    if (
cs_get_user_team(id) != CS_TEAM_T || !is_user_alive(id)) 
    {  
        return 
PLUGIN_HANDLED
    } 
    new 
menu menu_create("\rJB Glow Menu:""glows_menu"); 
    
    new 
players[32], pnumtempid
    new 
szName[32], szTempid[10]; 
    
    
get_players(playerspnum"a"); 
    
    for( new 
ii<pnumi++ ) 
    { 
        
tempid players[i]; 
        
        if (
cs_get_user_team(tempid) != CS_TEAM_T != CS_TEAM_CT
        { 
            continue; 
        } 
        
        
get_user_name(glow1szName31);
        
get_user_name(glow2szName31);
        
get_user_name(glow3szName31);
        
get_user_name(glow4szName31);
        
get_user_name(glow5szName31);
        
num_to_str(glow1szGlow19); 
        
num_to_str(glow2szGlow29); 
        
num_to_str(glow3szGlow39); 
        
num_to_str(glow4szGlow49); 
        
num_to_str(glow5szGlow59); 
        
menu_additem(menuszNameszGlow1ADMIN_LEVEL_H);
        
menu_additem(menuszNameszGlow2ADMIN_LEVEL_H);
        
menu_additem(menuszNameszGlow3ADMIN_LEVEL_H);
        
menu_additem(menuszNameszGlow4ADMIN_LEVEL_H);
        
menu_additem(menuszNameszGlow5ADMIN_LEVEL_H);    
    } 
    
    
menu_display(idmenu); 
    return 
PLUGIN_HANDLED


public 
glows_menu(idmenuitem

    if( 
item == MENU_EXIT 
    { 
        
menu_destroy(menu); 
        return 
PLUGIN_HANDLED
    } 
    
    new 
data[6], iName[64]; 
    new 
accesscallback
    
menu_item_getinfo(menuitemADMIN_LEVEL_Hdata,5iName63callback); 
    
    new 
glow1glow2glow3glow4glow5 str_to_num(data); 
    new 
szName[32]; 
    
get_user_name(tempidszName31);  
    
set_user_rendering(glow1kRenderFxGlowShell2551400kRenderNormal20)  Oranjev
    set_user_rendering
(glow2kRenderFxGlowShell4021545kRenderNormal20)  Zelen svetlo
    set_user_rendering
(glow3kRenderFxGlowShell43213208kRenderNormal20)  Sin svetlo
    set_user_rendering
(glow4kRenderFxGlowShell16877179kRenderNormal20Lilav
    set_user_rendering
(glow5kRenderFxGlowShell255255255kRenderNormal20bql
    set_hudmessage
(02550
    
show_hudmessage(0"[VIP:%s] gave a glow %s^n and is now glowing!"szNameszName); 
    
    
menu_destroy(menu); 
    return 
PLUGIN_HANDLED
}  

public 
packs(id)
{

Sorry my English is Bad!


Say how to fix all error on code!

I want to:
I using the command /vip.
Them out menu 1 menu and 2 buttons!
I.e. 1 button for 3 packages free of MAP!
And one key free day, free only to the player (VIP) menu.
And glol menu that gives glol free to choose, but of course it can be used just 1 time, like the others, then they have fulfilled everything by writing / VIP to their shows, you have more VIP access it

Last edited by hpservers; 08-25-2013 at 22:53.
hpservers is offline
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 19:07.


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