View Single Post
SuperrioR
Junior Member
Join Date: Sep 2019
Location: Republic of Moldova
Old 01-08-2020 , 14:31   Re: VIP Menu Plugin Shop
Reply With Quote #2

Or can someone make me this plugin to work on zombie plague 4.3, to be compatible with what I mentioned above. That's about what I want.

Cvars from buy_menu.

PHP Code:
    register_native("zp_cs_set_user_money""set_user_money"1)
    
register_native("zp_cs_get_user_money""get_user_money"1)
    
register_native("zp_cs_get_user_limit""get_user_limit"1
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>
#include <fun>
#include <cstrike>
#include <fakemeta>
#include <zp50_gamemodes>

new g_MsgSync

new g_GameModeMultiID
new g_GameModeInfectionID

new g_armor
new g_goldenak
new g_Janus3

public plugin_init()
{
    
register_plugin("SVIP Menu""1.0""SNIPER")
    
register_concmd"svip_menu","svipmenu" );
}
public 
svipmenuid )
{
    if(!(
get_user_flags(id) & ADMIN_LEVEL_H))
    {
        
ChatColor(id"!g[SVIP] You Have no Access to Use The Super Vip menu.");
        
        return 
PLUGIN_HANDLED;
    }

    new 
menu menu_create"\wSuper VIP Menu""menu_handler" );
    
menu_additemmenu"\wSuper Armor  \y1000\r$""");
    
menu_additemmenu"\wJanus-3  \y8000\r$""");
    
menu_additemmenu"\wGolden AK47  \y3000\r$""");
    
menu_setpropmenuMPROP_EXITMEXIT_ALL );
    
menu_displayidmenu);
    
    {
    new 
current_mode zp_gamemodes_get_current()
    if (
current_mode != g_GameModeInfectionID && current_mode != g_GameModeMultiID)
    {
        
ChatColor(id"!g[SVIP] You Cant Use The Super Vip Menu Now.");
    
        return 
PLUGIN_HANDLED
    
}
}

}

public 
menu_handleridmenuitem )
{
    switch( 
item )
    {
        case 
0// g_armor
        
{
            new 
money cs_get_user_money(id)
    
            if (
money >= 1000)
            {
                
cs_set_user_money(idmoney 1000)
                
client_cmd(id"svip_armor")
                
ChatColor(id,"!g[SVIP] !yYou have bought !gSuper Armor !yEngoy Killing Zombie");
            }
    
            else
            {
                
ChatColor(id,"!g[SVIP] !yYou dont hav enough money to buy !gSuper Armor")
            }
        }
        case 
1// g_Janus3
        
{
            new 
money cs_get_user_money(id)
    
            if (
money >= 8000)
            {
                
cs_set_user_money(idmoney 8000)
                
client_cmd(id"svip_j3")
                
ChatColor(id,"!g[SVIP] !yYou have bought !gJanus-3 !yEngoy Killing Zombie");
            }
    
            else
            {
                
ChatColor(id,"!g[SVIP] !yYou dont hav enough money to buy !gJanus-3")
            }
        }
        case 
2// g_goldenak
        
{
            new 
money cs_get_user_money(id)
    
            if (
money >= 3000)
            {
                
cs_set_user_money(idmoney 3000)
                
client_cmd(id"svip_goldenak")
                
ChatColor(id,"!g[SVIP] !yYou have bought !gGolden AK47 !yEngoy Killing Zombie");
            }
    
            else
            {
                
ChatColor(id,"!g[SVIP] !yYou dont hav enough money to buy !gGolden AK47")
            }
        }
    }

    
menu_destroymenu );
    return 
PLUGIN_HANDLED;
}

public 
plugin_cfg()
{
    
g_GameModeInfectionID zp_gamemodes_get_id("Infection Mode")
    
g_GameModeMultiID zp_gamemodes_get_id("Multiple Infection Mode")
}

public 
event_round_start()
{
    
g_armor 0
    g_goldenak 
0
    g_Janus3 
0
}

// Stock: ChatColor!
stock ChatColor(const id, const input[], any:...)
{
    new 
count 1players[32]
    static 
msg[191]
    
vformat(msg190input3)
    
    
replace_all(msg190"!g""^4"// Green Color
    
replace_all(msg190"!y""^1"// Default Color
    
replace_all(msg190"!t""^3"// Team Color
    
    
if (idplayers[0] = id; else get_players(playerscount"ch")
    {
        for (new 
0counti++)
        {
            if (
is_user_connected(players[i]))
            {
                
message_begin(MSG_ONE_UNRELIABLEget_user_msgid("SayText"), _players[i])
                
write_byte(players[i]);
                
write_string(msg);
                
message_end();
            }
        }
    }


Last edited by SuperrioR; 01-08-2020 at 14:35.
SuperrioR is offline