Raised This Month: $32 Target: $400
 8% 

add vip weapons


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
frenetico9
Junior Member
Join Date: Feb 2021
Old 02-13-2021 , 13:52   add vip weapons
Reply With Quote #1

I want to put in this menu, vip, ak-47 and galil weapons for CT and m4a1 and fame for TR with flag b.

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

#define PLUGIN  "CS Revo: Menu de Armas"
#define VERSION "1.0"
#define AUTHOR  "Wilian M."

#define PREFIX_MENUS "\r[BIRUTAS]"
#define PREFIX_CHAT "^4[BIRUTAS]"

/*
Cores para o Chat:

^4 = verde
^3 = cor do time
^1 = cor normal (amarelo)
*/

new xmapname[32], xRemeber[33], xSaveItem[33]

public 
plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
RegisterHam(Ham_Spawn"player""xHamSpawnPost"true)

    
get_mapname(xmapnamecharsmax(xmapname))

    if(
equal(xmapname"awp_"4) || equal(xmapname"aim_"4) || equal(xmapname"35hp_"5) || equal(xmapname"fy_"3)
    || 
equal(xmapname"he_"3))
    {
        
pause("a")
    }

    
xRegisterSay("armas""xShowMenuGuns")
}

public 
xHamSpawnPost(id)
{
    if(
is_user_alive(id))
        
set_task(0.5"xGiveItems"id)
}

public 
xGiveItems(id)
{
    if(
is_user_connected(id))
    {
        static 
xmenu2

        
if(xRemeber[id])
            
_xShowMenuGuns(idxmenu2xSaveItem[id])
        else 
xShowMenuGuns(id)
    }
}

public 
client_disconnected(id)
{
    
xRemeber[id] = false
    xSaveItem
[id] = false
}

public 
xShowMenuGuns(id)
{
    if(
is_user_connected(id))
    {    
        static 
xTeam
        xTeam 
get_user_team(id)

        new 
xFmtx[512]

        
formatex(xFmtxcharsmax(xFmtx), "%s \wMenu de armas"PREFIX_MENUS)

        new 
xMenu menu_create(xFmtx"_xShowMenuGuns")

        if(
xTeam == 1)
        {
            
menu_additem(xMenu"Kit \d[\yAK47 + Desert\d]")
            
menu_additem(xMenu"Kit \d[\yAK47 + USP\d]")
            
menu_additem(xMenu"Kit \d[\yAWP + Desert\d]")
            
menu_additem(xMenu"Kit \d[\yGALIL + Desert\d]^n")
        }
        else
        {
            
menu_additem(xMenu"Kit \d[\yM4A1 + Desert\d]")
            
menu_additem(xMenu"Kit \d[\yM4A1 + USP\d]")
            
menu_additem(xMenu"Kit \d[\yAWP + Desert\d]")
            
menu_additem(xMenu"Kit \d[\yFAMAS + Desert\d]^n")
        }

        if(
xRemeber[id])
            
menu_additem(xMenu"\yRelembrar seleção? \r[Sim]")
        else 
menu_additem(xMenu"\yRelembrar seleção? \r[Não]")

        
menu_setprop(xMenuMPROP_EXITNAME"Sair")
        
menu_display(idxMenu)
    }
}

public 
_xShowMenuGuns(idmenuitem)
{
    if(
item == MENU_EXIT)
    {
        
menu_destroy(menu)

        return 
PLUGIN_HANDLED
    
}

    static 
xTeam
    xTeam 
get_user_team(id)

    switch(
item)
    {
        case 
0:
        {
            if(
xTeam == 1client_cmd(id,"vesthelm;ak47;deagle;secammo;primammo;hegren;flash;flash")
            else 
client_cmd(id,"defuser;vesthelm;m4a1;deagle;secammo;primammo;hegren;flash;flash")

            
xSaveItem[id] = 0
        
}

        case 
1:
        {
            if(
xTeam == 1client_cmd(id,"vesthelm;ak47;usp;secammo;primammo;hegren;flash;flash")
            else 
client_cmd(id,"defuser;vesthelm;m4a1;usp;secammo;primammo;hegren;flash;flash")

            
xSaveItem[id] = 1
        
}

        case 
2:
        {
            if(
xTeam == 1client_cmd(id,"vesthelm;awp;deagle;secammo;primammo;hegren;flash;flash")
            else 
client_cmd(id,"defuser;vesthelm;awp;deagle;secammo;primammo;hegren;flash;flash")

            
xSaveItem[id] = 2
        
}

        case 
3:
        {
            if(
xTeam == 1client_cmd(id,"vesthelm;galil;deagle;secammo;primammo;hegren;flash;flash")
            else 
client_cmd(id,"defuser;vesthelm;famas;deagle;secammo;primammo;hegren;flash;flash")

            
xSaveItem[id] = 3
        
}

        case 
4:
        {
            if(
xRemeber[id])
                
xRemeber[id] = false
            
else xRemeber[id] = true

            xShowMenuGuns
(id)
        }
    }

    return 
PLUGIN_HANDLED
}

stock xRegisterSay(szsay[], szfunction[])
{
    new 
sztemp[64]
    
formatex(sztemp63 "say /%s"szsay)
    
register_clcmd(sztempszfunction)
    
    
formatex(sztemp63 "say .%s"szsay)
    
register_clcmd(sztempszfunction)
    
    
formatex(sztemp63 "say_team /%s"szsay)
    
register_clcmd(sztempszfunction )
    
    
formatex(sztemp63 "say_team .%s"szsay)
    
register_clcmd(sztempszfunction)


Last edited by frenetico9; 02-13-2021 at 15:17.
frenetico9 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 23:38.


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