Raised This Month: $ Target: $400
 0% 

Plugin VIP !


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
MasKerT
Junior Member
Join Date: Apr 2012
Old 07-25-2013 , 07:17   Plugin VIP !
Reply With Quote #1

Hi,

1. I want to help with something simple. I want to put exit button in this menu:

PHP Code:
#include < amxmodx >
#include < amxmisc >
#include < biohazard >
#include < cstrike >
#include < fakemeta >
#include < fun >
#include < hamsandwich >

#pragma semicolon         1

#define ADMIN_VIP        ADMIN_LEVEL_H

static const PLUGIN[ ]         = "VIP Biohazard";
static const 
VERSION[ ]         = "1.0";

new 
g_bAntidot33 ];
new 
g_bGrenade33 ];
new 
g_bInfection33 ];
new 
g_bEthereal33 ];
new 
g_bGoldM4A133 ];
new 
g_bCameleon33 ];
new 
g_bM32Grenader 33 ];
new 
g_bCrossBow33 ];
new 
g_iUsed32 ];

new 
pCvarUsed;

public 
plugin_init( ) 
{
    
register_pluginPLUGINVERSION"Unhask" );
    
    
RegisterHamHam_Spawn"player""plugin_spawn"true );
    
RegisterHamHam_Killed"player""plugin_death" );
    
    
register_clcmd"say /vipmenu""cmdShowMenu" );
    
    
pCvarUsed         register_cvar"vip_used""3" );
    
}

public 
client_connectid )
{
    if ( !( 
get_user_flagsid ) & ADMIN_VIP ) )
        return 
1;
        
    
g_bAntidotid ] = false;
    
g_bGrenadeid ] = false;
    
g_bInfectionid ] = true;
    
g_bEtherealid ] = false;
    
g_bGoldM4A1id ] = false;
    
g_bCameleonid ] = false;
    
g_bM32Grenaderid ] = false;
    
g_bCrossBowid ] = false;

    return 
1;
}

public 
plugin_spawnid )
{
    if ( !( 
get_user_flagsid ) & ADMIN_VIP ) )
        return 
1;
    
    
g_bAntidotid ] = false;
    
g_bGrenadeid ] = true;
    
g_bInfectionid ] = false;
    
g_bEtherealid ] = true;
    
g_bGoldM4A1id ] = true;
    
g_bCameleonid ] = true;
    
g_bM32Grenaderid ] = true;
    
g_bCrossBowid ] = true;
    
    
g_iUsedid ] = 0;

    return 
1;
}

public 
event_infectvictimattacker )
{
    if ( !( 
get_user_flagsvictim ) & ADMIN_VIP ) )
        return 
1;
    
    
g_bAntidotvictim ] = true;
    
g_bGrenadevictim ] = false;
    
g_bInfectionvictim ] = false;
    
g_bEtherealvictim ] = false;
    
g_bGoldM4A1victim ] = false;
    
g_bCameleonvictim ] = false;
    
g_bM32Grenadervictim ] = false;
    
g_bCrossBowvictim ] = false;

    return 
1;
}

public 
plugin_deathvictimattacker )
{
    if ( !( 
get_user_flagsvictim ) & ADMIN_VIP ) )
        return 
1;
    
    
g_bAntidotvictim ] = false;
    
g_bGrenadevictim ] = false;
    
g_bInfectionvictim ] = true;
    
g_bEtherealvictim ] = false;
    
g_bGoldM4A1victim ] = false;
    
g_bCameleonvictim ] = false;
    
g_bM32Grenadervictim ] = false;
    
g_bCrossBowvictim ] = false;
    
    return 
1;
}

public 
cmdShowMenuid )
{
    if ( !( 
get_user_flagsid ) & ADMIN_VIP ) )
        return 
1;
    
    if ( 
g_iUsedid ] == get_pcvar_numpCvarUsed ) )
        return 
1;
    
    new 
szMenuName165 ];
    
    
formatexszMenuNamesizeof szMenuName ) - 1"VIP Menu^nUsed: \R\r%i"g_iUsedid ] );
    
    new 
szMenu menu_createszMenuName"iContent" );
        
    new 
iCallBack  =  menu_makecallback"CallBackMenu" );
    
    
menu_additemszMenu"Antidot""1"_iCallBack );
    
menu_additemszMenu"HE Grenade""2"_iCallBack );
    
menu_additemszMenu"Zombie Spawn""3"_iCallBack );
    
menu_additemszMenu"Ethereal""4"_iCallBack );
    
menu_additemszMenu"M4A1 Gold""5"_iCallBack );
    
menu_additemszMenu"Cameleon""6"_iCallBack );
    
menu_additemszMenu"M32 Grenader""7"_iCallBack );
    
menu_additemszMenu"Crossbow""8"_iCallBack );
    
    
menu_setpropszMenuMEXIT_ALL);

    
menu_setpropszMenuMPROP_PERPAGE);

    
menu_displayidszMenu);
    
    
g_iUsedid ] ++;
    
    return 
1;
}

public 
iContentidszMenuItem )
{
    if ( 
Item == MENU_EXIT )
    {
        
menu_destroyszMenu );
        return 
1;
    }
    
    new 
iData], szName32 ];
    new 
iAccessiCallback;
    
    
menu_item_getinfoszMenuItemiAccessiDatasizeof iData ) - 1szNamesizeof szName ) - 1iCallback );
    
    new 
iKeys str_to_numiData );
    
    switch ( 
iKeys )
    {
        case 
1:
        {
            
        }
        
        case 
2:
        {
        
        }
        
        case 
3:
        {
            
        }
        
        case 
4:
        {
            
            
        }
        
        case 
5:
        {
            
        }
        
        case 
6:
        {
            
        }
        case 
7:
        {
            
        }
        
        case 
8:
        {
            
        }
    
    }

    return 
1;
}

public 
CallBackMenuidszMenuItem )
{    
    new 
iData], szName32 ];
    new 
iAccessiCallback;
    
    
menu_item_getinfoszMenuItemiAccessiDatasizeof iData ) - 1szNamesizeof szName ) - 1iCallback );
    
    
//if ( iData[ 0 ] == 0 ) 
    
    
if( iData] == '1' )
    {
        if( 
g_bAntidotid ] )
            return 
ITEM_ENABLED;
    }
    else if( 
iData] == '2' )
    {
        if( 
g_bGrenadeid ] )
            return 
ITEM_ENABLED;
    }
    else if( 
iData] == '3' )
    {
        if( 
g_bInfectionid ] )
            return 
ITEM_ENABLED;
    }
    else if( 
iData] == '4' )
    {
        if( 
g_bEtherealid ] )
            return 
ITEM_ENABLED;
    }
    else if( 
iData] == '5' )
    {
        if( 
g_bGoldM4A1id ] )
            return 
ITEM_ENABLED;
    }
    
    else if( 
iData] == '6' )
    {
        if( 
g_bCameleonid ] )
            return 
ITEM_ENABLED;
    }
    
    else if( 
iData] == '7' )
    {
        if( 
g_bM32Grenaderid ] )
            return 
ITEM_ENABLED;
    }
    
    else if( 
iData] == '8' )
    {
        if( 
g_bCrossBowid ] )
            return 
ITEM_ENABLED;
    }
    
    return 
ITEM_DISABLED;
        

I made something, but don't work:

PHP Code:
 menu_setpropszMenuMEXIT_ALL);

menu_setpropszMenuMPROP_PERPAGE);

menu_displayidszMenu); 
2. I want to help me with a code for zombie spawn. I wanna put it in menu like an item.

I made something, but I'm in CTs Team.

PHP Code:
 ExecuteHamBHam_CS_RoundRespawnid );
            
 
infect_userid);
            
if ( 
cs_get_user_teamid ) != CS_TEAM_T )
{
    
cs_set_user_teamidCS_TEAM_T );


Last edited by MasKerT; 07-25-2013 at 07:20.
MasKerT is offline
 



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