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

[REQ]menu for top 10 rank


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
alferd
Veteran Member
Join Date: Dec 2019
Location: Iran is Always Eternal
Old 01-22-2020 , 00:51   [REQ]menu for top 10 rank
Reply With Quote #1

hi,I want a plugin for (MENU) top10 rank

---
1.ak74+deagle (rank 1)
2.weapon... (rank 2 and 3)
3.weapon... (rank 4 and 5)
4.weapon... (rank 6 and 9
5.deagle (rank 10)
alferd is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 01-22-2020 , 16:57   Re: [REQ]menu for top 10 rank
Reply With Quote #2

some more information please?
__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
alferd
Veteran Member
Join Date: Dec 2019
Location: Iran is Always Eternal
Old 01-23-2020 , 00:00   Re: [REQ]menu for top 10 rank
Reply With Quote #3

A menu for the Top 10 rank

Top 10 Menu
1.ak74+deagle (for rank 1)
2.weapon(I'll add it myself).. (for rank 2 and 3)
3.weapon(I'll add it myself).. (for rank 4 and 5)
4.weapon(I'll add it myself).. (for rank 6 and 9
5.deagle (for rank 10)

Last edited by alferd; 01-23-2020 at 00:00.
alferd is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 01-23-2020 , 05:55   Re: [REQ]menu for top 10 rank
Reply With Quote #4

Could probabaly be optimized, but here you go. Should do the job
PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <csstats>
#include <fun>
#include <cstrike>

#define PLUGIN "Weapon Menu TOP10"
#define VERSION "1.0"
#define AUTHOR "NapoleoN#"

new iRank;
new 
iStats[8];
new 
iBody[8];

public 
plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR);
    
    
register_clcmd("say /weapons""WeaponMenu");
}

public 
WeaponMenu(id)
{
    
iRank get_user_stats(idiStatsiBody);
    if(
iRank <= 10)
    {
        new 
menu menu_create("Weapon Menu""MenuHandler");
        
        
menu_additem(menu"AK47 + Deagle [Rank 1]");
        
menu_additem(menu"weapon... [Rank 2 - 3]");
        
menu_additem(menu"weapon... [Rank 4 - 5]");
        
menu_additem(menu"weapon... [Rank 6 - 9]");
        
menu_additem(menu"Deagle [Rank 10]");
        
        
menu_display(idmenu);
    }
}

public 
MenuHandler(idmenuitem)
{
    if(
is_user_alive(id))
    {
        
iRank get_user_stats(idiStatsiBody);
        
        switch(
item)
        {
            case 
0:
            {
                if(
iRank == 1// Rank 1
                
{
                    
// strip_user_weapons(id); // Use this is u don't want players to have double weapons.
                    // give_item(id, "weapon_knife"); // Give knife again after stripping then.
                    
give_item(id"weapon_ak47");
                    
cs_set_user_bpammo(idCSW_AK4790);
                }
            }
            case 
1:
            {
                if(
iRank <= 3// Ranks 3 or lower.
                
{
                    
// Give Weapon + ammo
                
}
            }
            case 
2:
            {
                if(
iRank <= 5// Ranks 5 or lower.
                
{
                    
// Give Weapon + ammo
                
}
            }
            case 
3:
            {
                if(
iRank <= 9// Ranks 9 or lower.
                
{
                    
// Give weapon + ammo
                
}
            }
            case 
4:
            {
                if(
iRank <= 10// Ranks 10 or lower.
                
{
                    
// strip_user_weapons(id); 
                    // give_item(id, "weapon_knife");
                    
give_item(id"weapon_deagle");
                    
cs_set_user_bpammo(idCSW_DEAGLE35);
                }
            }
                    
        }
    }
    
menu_destroy(menu);

__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
alferd
Veteran Member
Join Date: Dec 2019
Location: Iran is Always Eternal
Old 01-24-2020 , 02:25   Re: [REQ]menu for top 10 rank
Reply With Quote #5

Thank you
alferd is offline
Reply


Thread Tools
Display Modes

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 02:59.


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