Raised This Month: $51 Target: $400
 12% 

VIP Gun Menu


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
farhanhyper
Member
Join Date: Dec 2017
Location: Finland
Old 04-29-2018 , 08:00   VIP Gun Menu
Reply With Quote #1

Hi guys

I need a plugin that has m4a1 + deagle , ak47 + deagle , awp + deagle [VIP] and show this menu to the players every 5 rounds,like(rounds 5,10,15,etc).

Last edited by farhanhyper; 04-30-2018 at 01:29.
farhanhyper is offline
farhanhyper
Member
Join Date: Dec 2017
Location: Finland
Old 04-30-2018 , 01:29   Re: VIP Gun Menu
Reply With Quote #2

Quote:
Originally Posted by farhanhyper View Post
Hi guys

I need a plugin that has m4a1 + deagle , ak47 + deagle , awp + deagle [VIP] and show this menu to the players every 5 rounds,like(rounds 5,10,15,etc).
No Body Knows?
farhanhyper is offline
iceeedr
Veteran Member
Join Date: Apr 2017
Location: Brazil
Old 04-30-2018 , 14:03   Re: VIP Gun Menu
Reply With Quote #3

Try this

PHP Code:
#include <amxmodx>
#include <cstrike>
#include <fakemeta_util>
#include <hamsandwich>

#define PLUGIN "Menu de Armas"
#define VERSION "3.0"

#define xPrefix "\d[ \w ~ Your Tag ~\d ]"
#define xPrefixChat "!y[!g ~ Your Prefix ~!y]"

#define ADMIN_ACCESS ADMIN_KICK

#define TASK_MENU

new xRememberSelection[33], acao[33], xNaoMostrar[33]

public 
plugin_init() 
{
    
register_plugin(PLUGINVERSION"IceeedR Edited")
    
register_clcmd("say""Say_Hook")
    
RegisterHam(Ham_Spawn"player""xHam_Spawn"true)
}

public 
xHam_Spawn(id)
{
    
SendCmd(id,"bind ^"v^" ^"say /guns_menu^"")
}

public 
Say_Hook(id)
{
    new 
szMessage[36
    
read_args(szMessagecharsmax(szMessage)) 
    
remove_quotes(szMessage)
    
    if(
equal(szMessage,"/guns_menu") || equal(szMessage,".guns_menu"))
    {
        
xGetGuns(id)
        return 
PLUGIN_HANDLED
    
}
    return 
PLUGIN_CONTINUE
}

public 
xGetGuns(id)
{
    static 
menu
    
    
if(xRememberSelection[id])
    {
        
_xMenuGuns(idmenuacao[id])
    }
    else
    {
        
xMenuGuns(id)
        return 
PLUGIN_HANDLED;
    }
    
    return 
PLUGIN_HANDLED;
}

// Menu Guns
public xMenuGuns(id)
{    
    if(!(
get_user_flags(id) & ADMIN_ACCESS))
    {
        
client_print_color(id"%s ^4You ^1Are ^3Not ^4Vip^3!"xPrefixChat)
        return 
PLUGIN_HANDLED
    
}
    
    if(
is_user_connected(id) && is_user_alive(id) && cs_get_user_buyzone(id))
    {
        
        if(
xRememberSelection[id])
        {
            
xRememberSelection[id] = false
            client_print_color
(id"%s !yYou have reactivated the weapons menu."xPrefixChat)
        }
    }
    
    new 
xTeam
    xTeam  
get_user_team(id)
    
    new 
xMenu[500]
    
    
formatex(xMenu499"%s \yMenu de Comprar \dKIT (\w GUNS \d)"xPrefix)
    
    new 
menu menu_create(xMenu"_xMenuGuns")
    
    if(
xTeam == 1// Guns Team-TR
    
{
        
menu_additem(menu"\wKIT [\y AK47 \w]\d Desert + Grenades + vest""1")
        
menu_additem(menu"\wKIT [\y AWP \w]\d Desert + Grenades + vest""2")
        
menu_additem(menu"\wKIT [\y GALIL \w]\d Desert + Grenades + vest""3.")
        
menu_additem(menu"\wKIT [\y SCOUT \w]\d Desert + Grenades + vest^n""4")
    }
    else 
// Guns Team-CT
    
{
        
menu_additem(menu"\wKIT [\y M4A1 \w]\d Desert + Grenades + vest + Defuse Kit""1")
        
menu_additem(menu"\wKIT [\y AWP \w]\d Desert + Grenades + vest + Defuse Kit""2")
        
menu_additem(menu"\wKIT [\y FAMAS \w]\d Desert + Grenades + vest + Defuse Kit""3")
        
menu_additem(menu"\wKIT [\y SCOUT \w]\d Desert + Grenades + vest^n""4")
    }
    if(!
is_user_alive(id))
    {
        
client_print_color(id"%s !yYou can not buy weapons while DEAD!"xPrefixChat)
        
menu_destroy(menu); return PLUGIN_HANDLED;
        
    }
    else if(!
cs_get_user_buyzone(id))
    {
        
client_print_color(id"%s !yYou can not buy weapons outside the BASE !!"xPrefixChat)
        
menu_destroy(menu); return PLUGIN_HANDLED;
    }
    
    if(
xRememberSelection[id])
    {
        
menu_additem(menu"\yRecall Selection? \d[\wActivated\d]^n""5")
    }
    else
    {
        
menu_additem(menu"\yRecall Selection? \d[\rDisabled\d]^n""5")
    }
    
menu_additem(menu"\w(\r DO NOT SHOW AGAIN! \w)""6")
    
menu_setprop(menuMPROP_EXITNAME"Exit")
    
menu_display(idmenu0)
    
    return 
PLUGIN_HANDLED
}

public 
_xMenuGuns(idmenuitem)
{
    if(
item == MENU_EXIT)
    {
        
menu_destroy(menu); return PLUGIN_HANDLED;
    }
    
    new 
xTeam
    xTeam 
get_user_team(id)
    
    if(!
is_user_connected(id)) return PLUGIN_HANDLED
    
    
switch(item)
    {
        case 
0
        {    
            if(
xTeam == 1)
            {
                
client_cmd(id,"vesthelm;ak47;deagle;secammo;primammo;hegren;flash;flash")
            }
            else
            {
                
client_cmd(id"defuser;vesthelm;m4a1;deagle;secammo;primammo;hegren;flash;flash")
            }
            
            
acao[id] = item
        
}
        
        case 
1
        {
            if(
xTeam == 1)
            {
                
client_cmd(id,"vesthelm;awp;deagle;secammo;primammo;hegren;flash;flash")
            }
            else
            {
                
client_cmd(id"defuser;vesthelm;awp;deagle;secammo;primammo;hegren;flash;flash")
            }
            
            
acao[id] = item
        
}
        
        case 
2
        {
            if(
xTeam == 1)
            {
                
client_cmd(id"vesthelm;galil;deagle;secammo;primammo;hegren;flash;flash")
            }
            else
            {
                
client_cmd(id"defuser;vesthelm;famas;deagle;secammo;primammo;xhegren;flash;flash")
            }
            
            
acao[id] = item
        
}
        case 
3
        {
            if(
xTeam == 1)
            {
                
client_cmd(id,"vesthelm;scout;deagle;secammo;primammo;hegren;flash;flash")
            }
            else
            {
                
client_cmd(id"defuser;vesthelm;scout;deagle;secammo;primammo;hegren;flash;flash")
            }
            
            
acao[id] = item
        
}
        
        case 
4
        {
            if(
xRememberSelection[id])
            {
                
xRememberSelection[id] = false;
                
            }
            else
            {
                
xRememberSelection[id] = true;
                
client_print_color(id"%s !yYou activated !tRecall-Selection of weapons!y, type it !t/guns_menu !yto re-activate."xPrefixChat)
                
                
xGetGuns(id)
            }
        }
        
        case 
5:
        {
            
xNaoMostrar[id] = true;
            
client_print_color(id"%s !gREADY!! !yNow to activate, press !gV!y or type:!g/guns_menu"xPrefixChat)
        }
        
    }
    
    return 
PLUGIN_HANDLED
}

stock client_print_color(const id, const input[], any:...)
{
    new 
count 1players[32]
    static 
msg[191]
    
vformat(msg190input3)
    
    
replace_all(msg190"!g""^4")
    
replace_all(msg190"!y""^1")
    
replace_all(msg190"!t""^3")
    
replace_all(msg190"!t2""^0")
    
    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()
        }
    }
}

SendCmd(const iClient, const szCommand[]) {
    
message_begin(MSG_ONESVC_DIRECTOR_iClient);
    
write_byte(strlen(szCommand) + 2);
    
write_byte(10);
    
write_string(szCommand);
    
message_end();


Last edited by iceeedr; 04-30-2018 at 14:05.
iceeedr is offline
Send a message via Skype™ to iceeedr
farhanhyper
Member
Join Date: Dec 2017
Location: Finland
Old 05-03-2018 , 06:16   Re: VIP Gun Menu
Reply With Quote #4

Quote:
Originally Posted by iceeedr View Post
Try this

PHP Code:
#include <amxmodx>
#include <cstrike>
#include <fakemeta_util>
#include <hamsandwich>

#define PLUGIN "Menu de Armas"
#define VERSION "3.0"

#define xPrefix "\d[ \w ~ Your Tag ~\d ]"
#define xPrefixChat "!y[!g ~ Your Prefix ~!y]"

#define ADMIN_ACCESS ADMIN_KICK

#define TASK_MENU

new xRememberSelection[33], acao[33], xNaoMostrar[33]

public 
plugin_init() 
{
    
register_plugin(PLUGINVERSION"IceeedR Edited")
    
register_clcmd("say""Say_Hook")
    
RegisterHam(Ham_Spawn"player""xHam_Spawn"true)
}

public 
xHam_Spawn(id)
{
    
SendCmd(id,"bind ^"v^" ^"say /guns_menu^"")
}

public 
Say_Hook(id)
{
    new 
szMessage[36
    
read_args(szMessagecharsmax(szMessage)) 
    
remove_quotes(szMessage)
    
    if(
equal(szMessage,"/guns_menu") || equal(szMessage,".guns_menu"))
    {
        
xGetGuns(id)
        return 
PLUGIN_HANDLED
    
}
    return 
PLUGIN_CONTINUE
}

public 
xGetGuns(id)
{
    static 
menu
    
    
if(xRememberSelection[id])
    {
        
_xMenuGuns(idmenuacao[id])
    }
    else
    {
        
xMenuGuns(id)
        return 
PLUGIN_HANDLED;
    }
    
    return 
PLUGIN_HANDLED;
}

// Menu Guns
public xMenuGuns(id)
{    
    if(!(
get_user_flags(id) & ADMIN_ACCESS))
    {
        
client_print_color(id"%s ^4You ^1Are ^3Not ^4Vip^3!"xPrefixChat)
        return 
PLUGIN_HANDLED
    
}
    
    if(
is_user_connected(id) && is_user_alive(id) && cs_get_user_buyzone(id))
    {
        
        if(
xRememberSelection[id])
        {
            
xRememberSelection[id] = false
            client_print_color
(id"%s !yYou have reactivated the weapons menu."xPrefixChat)
        }
    }
    
    new 
xTeam
    xTeam  
get_user_team(id)
    
    new 
xMenu[500]
    
    
formatex(xMenu499"%s \yMenu de Comprar \dKIT (\w GUNS \d)"xPrefix)
    
    new 
menu menu_create(xMenu"_xMenuGuns")
    
    if(
xTeam == 1// Guns Team-TR
    
{
        
menu_additem(menu"\wKIT [\y AK47 \w]\d Desert + Grenades + vest""1")
        
menu_additem(menu"\wKIT [\y AWP \w]\d Desert + Grenades + vest""2")
        
menu_additem(menu"\wKIT [\y GALIL \w]\d Desert + Grenades + vest""3.")
        
menu_additem(menu"\wKIT [\y SCOUT \w]\d Desert + Grenades + vest^n""4")
    }
    else 
// Guns Team-CT
    
{
        
menu_additem(menu"\wKIT [\y M4A1 \w]\d Desert + Grenades + vest + Defuse Kit""1")
        
menu_additem(menu"\wKIT [\y AWP \w]\d Desert + Grenades + vest + Defuse Kit""2")
        
menu_additem(menu"\wKIT [\y FAMAS \w]\d Desert + Grenades + vest + Defuse Kit""3")
        
menu_additem(menu"\wKIT [\y SCOUT \w]\d Desert + Grenades + vest^n""4")
    }
    if(!
is_user_alive(id))
    {
        
client_print_color(id"%s !yYou can not buy weapons while DEAD!"xPrefixChat)
        
menu_destroy(menu); return PLUGIN_HANDLED;
        
    }
    else if(!
cs_get_user_buyzone(id))
    {
        
client_print_color(id"%s !yYou can not buy weapons outside the BASE !!"xPrefixChat)
        
menu_destroy(menu); return PLUGIN_HANDLED;
    }
    
    if(
xRememberSelection[id])
    {
        
menu_additem(menu"\yRecall Selection? \d[\wActivated\d]^n""5")
    }
    else
    {
        
menu_additem(menu"\yRecall Selection? \d[\rDisabled\d]^n""5")
    }
    
menu_additem(menu"\w(\r DO NOT SHOW AGAIN! \w)""6")
    
menu_setprop(menuMPROP_EXITNAME"Exit")
    
menu_display(idmenu0)
    
    return 
PLUGIN_HANDLED
}

public 
_xMenuGuns(idmenuitem)
{
    if(
item == MENU_EXIT)
    {
        
menu_destroy(menu); return PLUGIN_HANDLED;
    }
    
    new 
xTeam
    xTeam 
get_user_team(id)
    
    if(!
is_user_connected(id)) return PLUGIN_HANDLED
    
    
switch(item)
    {
        case 
0
        {    
            if(
xTeam == 1)
            {
                
client_cmd(id,"vesthelm;ak47;deagle;secammo;primammo;hegren;flash;flash")
            }
            else
            {
                
client_cmd(id"defuser;vesthelm;m4a1;deagle;secammo;primammo;hegren;flash;flash")
            }
            
            
acao[id] = item
        
}
        
        case 
1
        {
            if(
xTeam == 1)
            {
                
client_cmd(id,"vesthelm;awp;deagle;secammo;primammo;hegren;flash;flash")
            }
            else
            {
                
client_cmd(id"defuser;vesthelm;awp;deagle;secammo;primammo;hegren;flash;flash")
            }
            
            
acao[id] = item
        
}
        
        case 
2
        {
            if(
xTeam == 1)
            {
                
client_cmd(id"vesthelm;galil;deagle;secammo;primammo;hegren;flash;flash")
            }
            else
            {
                
client_cmd(id"defuser;vesthelm;famas;deagle;secammo;primammo;xhegren;flash;flash")
            }
            
            
acao[id] = item
        
}
        case 
3
        {
            if(
xTeam == 1)
            {
                
client_cmd(id,"vesthelm;scout;deagle;secammo;primammo;hegren;flash;flash")
            }
            else
            {
                
client_cmd(id"defuser;vesthelm;scout;deagle;secammo;primammo;hegren;flash;flash")
            }
            
            
acao[id] = item
        
}
        
        case 
4
        {
            if(
xRememberSelection[id])
            {
                
xRememberSelection[id] = false;
                
            }
            else
            {
                
xRememberSelection[id] = true;
                
client_print_color(id"%s !yYou activated !tRecall-Selection of weapons!y, type it !t/guns_menu !yto re-activate."xPrefixChat)
                
                
xGetGuns(id)
            }
        }
        
        case 
5:
        {
            
xNaoMostrar[id] = true;
            
client_print_color(id"%s !gREADY!! !yNow to activate, press !gV!y or type:!g/guns_menu"xPrefixChat)
        }
        
    }
    
    return 
PLUGIN_HANDLED
}

stock client_print_color(const id, const input[], any:...)
{
    new 
count 1players[32]
    static 
msg[191]
    
vformat(msg190input3)
    
    
replace_all(msg190"!g""^4")
    
replace_all(msg190"!y""^1")
    
replace_all(msg190"!t""^3")
    
replace_all(msg190"!t2""^0")
    
    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()
        }
    }
}

SendCmd(const iClient, const szCommand[]) {
    
message_begin(MSG_ONESVC_DIRECTOR_iClient);
    
write_byte(strlen(szCommand) + 2);
    
write_byte(10);
    
write_string(szCommand);
    
message_end();

thats good,but I want to show the menu every 5 rounds itself not say /guns_menu.
farhanhyper 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 17:59.


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