Raised This Month: $ Target: $400
 0% 

Request a plugin Admin Menu


Post New Thread Reply   
 
Thread Tools Display Modes
Hey
Member
Join Date: Dec 2017
Old 01-23-2018 , 14:40   Re: Request a plugin Admin Menu
Reply With Quote #11

i don't have to prove it to you but i just wanted to point for some people like you who will say that i didn't wrote it like you just did right there lol, i always thought people were being harsh on you but i guess you deserve it anyway.

NOTE: if you just can't code that doesn't make everyone else stupid like you DEXTER.

Last edited by Hey; 01-23-2018 at 14:41.
Hey is offline
KING of Gold
Member
Join Date: Dec 2017
Old 01-24-2018 , 12:07   Re: Request a plugin Admin Menu
Reply With Quote #12

new error:
Uso: admin_menu
__________________
Cs KING of Gold
AlferD
KING of Gold is offline
D3XT3R
AlliedModders Donor
Join Date: Nov 2016
Location: Lithuania, Bomb A (Kauna
Old 01-24-2018 , 13:29   Re: Request a plugin Admin Menu
Reply With Quote #13

Quote:
Originally Posted by Hey View Post
i don't have to prove it to you but i just wanted to point for some people like you who will say that i didn't wrote it like you just did right there lol, i always thought people were being harsh on you but i guess you deserve it anyway.

NOTE: if you just can't code that doesn't make everyone else stupid like you DEXTER.
ok srr
__________________
D3XT3R is offline
Send a message via Skype™ to D3XT3R
D3XT3R
AlliedModders Donor
Join Date: Nov 2016
Location: Lithuania, Bomb A (Kauna
Old 01-24-2018 , 13:30   Re: Request a plugin Admin Menu
Reply With Quote #14

did you tired this?
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <fun>

// CS Offsets
#if cellbits == 32
const OFFSET_CLIPAMMO 51
#else
const OFFSET_CLIPAMMO 65
#endif
const OFFSET_LINUX_WEAPONS 4

// Max Clip for weapons
new const MAXCLIP[] = { -113, -11017, -1303013020253035251220,
            
10301008303020273030, -150 }

new 
g_szUnClipMenu[33]
new 
g_szNoClipMenu[33]

public 
plugin_init()
{
    
register_plugin("aDmin Menu""1.0""DeXTeR")
        
    
register_concmd("adminmenu""Show_aDmin_Menu"ADMIN_BAN)
    
    
register_message(get_user_msgid("CurWeapon"), "message_cur_weapon")
}

public 
Show_aDmin_Menu(id,level,cid)
{
    if(!
cmd_access(idlevelcid1))
        return 
PLUGIN_HANDLED;
        
    if(!
is_user_alive(id))
        return 
PLUGIN_HANDLED
    
    
new szInfo[256], szUnClipMenu[256], szNoClipMenu[256];
    
formatex(szInfocharsmax(szInfo), "AdmiN Menu");
    
    new 
menu menu_create(szInfo "aDmin_Menu");
    
    if(
g_szUnClipMenu[id]) { formatex(szUnClipMenucharsmax(szUnClipMenu), "Unlimited Clip \r[\yON\r]"); }
    else { 
formatex(szUnClipMenucharsmax(szUnClipMenu), "Unlimited Clip \r[\dOFF\r]"); }
    
    if(
g_szNoClipMenu[id]) { formatex(szNoClipMenucharsmax(szNoClipMenu), "Noclip Clip \r[\yON\r]"); }
    else { 
formatex(szNoClipMenucharsmax(szNoClipMenu), "Noclip Clip \r[\dOFF\r]"); }
    
    new 
szExit[15];
    
formatex(szExitcharsmax(szExit), "Close");
    
    
menu_setprop(menuMPROP_EXITNAMEszExit);
    
    
menu_display(id menu 0);


public 
aDmin_Menu(id menu item

    if (!
is_user_alive(id))
        return 
PLUGIN_HANDLED;
        
    if(
item == MENU_EXIT
    { 
        
menu_destroy(menu); 
        return 
PLUGIN_HANDLED;
    } 
    new 
data[6], iName[64];
    new 
accesscallback;
    
menu_item_getinfo(menuitemaccessdata,5iName63callback);

    new 
item_id str_to_num(data);
    
    switch (
item_id)
    {
        case 
0:
        {
            if(!
g_szUnClipMenu[id])
            {
                
g_szUnClipMenu[id] = 1
                
Show_aDmin_Menu(id);
            }
            else
            {
                
g_szUnClipMenu[id] = 0
                
Show_aDmin_Menu(id);
            }
        }
        case 
1:
        {
            if(!
g_szNoClipMenu[id])
            {
                
g_szNoClipMenu[id] = 1
                
set_user_noclip(id1)
                
                
Show_aDmin_Menu(id);
            }
            else
            {
                
g_szNoClipMenu[id] = 0
                
set_user_noclip(id0)
                
                
Show_aDmin_Menu(id);
            }
        }
    }

    
menu_destroy(menu); 
    return 
PLUGIN_HANDLED;
}

public 
client_putinserver(id)
{
    
g_szUnClipMenu[id] = 0;
    
g_szNoClipMenu[id] = 0;
}

public 
client_disconnected(id)
{
    
g_szUnClipMenu[id] = 0;
    
g_szNoClipMenu[id] = 0;
}

// Unlimited clip code
public message_cur_weapon(msg_idmsg_destmsg_entity)
{
    
// Player doesn't have the unlimited clip upgrade
    
if (!g_szUnClipMenu[msg_entity])
        return;
    
    
// Player not alive or not an active weapon
    
if (!is_user_alive(msg_entity) || get_msg_arg_int(1) != 1)
        return;
    
    static 
weaponclip
    weapon 
get_msg_arg_int(2// get weapon ID
    
clip get_msg_arg_int(3// get weapon clip
    
    // Unlimited Clip Ammo
    
if (MAXCLIP[weapon] > 2// skip grenades
    
{
        
set_msg_arg_int(3get_msg_argtype(3), MAXCLIP[weapon]) // HUD should show full clip all the time
        
        
if (clip 2// refill when clip is nearly empty
        
{
            
// Get the weapon entity
            
static wname[32], weapon_ent
            get_weaponname
(weaponwnamesizeof wname 1)
            
weapon_ent fm_find_ent_by_owner(-1wnamemsg_entity)
            
            
// Set max clip on weapon
            
fm_set_weapon_ammo(weapon_entMAXCLIP[weapon])
        }
    }
}

// Find entity by its owner (from fakemeta_util)
stock fm_find_ent_by_owner(entity, const classname[], owner)
{
    while ((
entity engfunc(EngFunc_FindEntityByStringentity"classname"classname)) && pev(entitypev_owner) != owner) {}
    
    return 
entity;
}

// Set Weapon Clip Ammo
stock fm_set_weapon_ammo(entityamount)
{
    
set_pdata_int(entityOFFSET_CLIPAMMOamountOFFSET_LINUX_WEAPONS);

__________________
D3XT3R is offline
Send a message via Skype™ to D3XT3R
Hey
Member
Join Date: Dec 2017
Old 01-24-2018 , 18:32   Re: Request a plugin Admin Menu
Reply With Quote #15

sorry about that the code was not working cuz that what happens when you do not test your code, i made it much better now and i did test it, Enjoy.
Hey 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 06:31.


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