Raised This Month: $299 Target: $400
 74% 

Subplugin Submission [ZP] Free VIP Menu


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Fun Stuff       
Dr Zayd
Senior Member
Join Date: Jun 2014
Location: forums.alliedmods.net
Old 07-17-2015 , 21:06   [ZP] Free VIP Menu
Reply With Quote #1


This plugin work for all players in zombie plague only when the server have 16/32 players
to motivate the players to bring theire friends

.:: Commands ::.
  • say /freevip


.:: CVAR's ::.
  • c_minplayers "15"
  • How many players needed to active plugin(Def.: "15")

PHP Code:
//#pragma semicolon 1
#include <amxmodx>
#include <cstrike>
#include <engine>
#include <fun>
#include <hamsandwich>
#include <zombieplague>

// Define the Plugin Version
new const VERSION[] = { "2.3" };

// PREFIX
new const PREFIX[] = { "!g[.:V.I.P:.]!n" };

new 
pNum;

new 
VipUsed[33];


public 
plugin_init()
{
    
register_plugin("Zombie Plague: New VIP Menu"VERSION"");
    
    
RegisterHam(Ham_Spawn"player""FwdHamSpawn_Post"1);
    
    
    
pNum register_cvar("c_minplayers","15")     // Number of Min. Players
    
register_clcmd("say /freevip""cmdVmenu");
    
register_clcmd("say_team /freevip""cmdVmenu");
}

public 
FwdHamSpawn_Post(id)
{
    if ( !
is_user_alive(id)) return 1;
    
    
VipUsed[id] = false;
    
set_user_renderingid_000_);
    
    return 
0;
}

public 
cmdVmenu(id)
{
    if ( 
is_user_alive(id) ){
        if( 
get_playersnum() >= get_pcvar_num(pNum))
        {
            if (!
VipUsed[id]){
                
VipUsed[id] = true;
                
                switch(
cs_get_user_team(id))
                {
                    case 
ZP_TEAM_ZOMBIE:
                    
VipTMenu(id);
                    
                    case 
ZP_TEAM_HUMAN:
                    
VipCTMenu(id);
                }
            }
            else
            {
                
client_printc(id"%s u can use !gFree VIP Menu!n . One Time, every round"PREFIX);
                
client_cmd(id"spk /sound/ng_no.wav");
            }
            
        }
        else {
            
client_printc(id"%s VIP Will Be Actived ON !g%d !nPLayers"PREFIX get_pcvar_num(pNum));
            
client_cmd(id"spk /sound/ng_ok.wav");
        }
    }
    else
    {
        
client_printc(id"%s !nYou need to be !gAlive to run the menu"PREFIX);
        
client_cmd(id"spk /sound/ng_no.wav");
    }
    
    return 
PLUGIN_CONTINUE;
}

public 
VipCTMenu(id)
{
    
client_cmd(id"spk /sound/ng_vipmenu.wav");
    new 
menu menu_create("\yFree VIP Menu \r(Human):^n""VipCTMenu_handler");
    
    
menu_additem(menu"\w50 Hp + 50 Armor""1"0);
    
menu_additem(menu"\wMachingun + Gravity""2"0);
    
menu_additem(menu"\w100 Armor \d[Anti Inf Armor]""3"0);
    
menu_additem(menu"\wExtra AmmoPacks \d[8 AmmoPacks]""4"0);
    
menu_additem(menu"\wG3SG1 \d[Sniper]""5"0);
    
    
menu_setprop(menuMPROP_EXITMEXIT_ALL);
    
menu_display(idmenu0);
}

public 
VipCTMenu_handler(idmenuitem)
{
    if( 
item == MENU_EXIT )
    {
        
menu_destroy(menu);
        return 
PLUGIN_HANDLED;
    }
    
    new 
data[6], iName[64];
    new 
accesscallback;
    
menu_item_getinfo(menuitemaccessdata,5iName63callback);
    
    new 
key str_to_num(data);
    
    switch(
key)
    {
        case 
1:
        {
            
set_user_health(idget_user_health(id) + 50)
            
set_user_armor(idget_user_armor(id) + 100)
            
VipUsed[id] = true
            client_printc
(id"%s You Have !g50 Hp!n + !g100 Armor!n"PREFIX)
        }
        case 
2:
        {
            
give_item(id"weapon_m249");
            
set_user_gravityid0.5 );
            
cs_set_user_bpammo(idCSW_M249200);
            
VipUsed[id] = true;
            
client_printc(id"%s You Have !gM249!n + !gGravity!n"PREFIX)
        }
        case 
3:
        {
            
VipUsed[id] = true;
            
set_user_armor(idget_user_armor(id) + 100);
            
client_printc(id"%s You Have !g140 Armor!n"PREFIX)
        }
        
        case 
4:
        {
            
zp_set_user_ammo_packs(idzp_get_user_ammo_packs(id) + random_num(88));
            
VipUsed[id] = true;
            
client_printc(id"%s You Have !g8 Ammo"PREFIX);
            
        }
        
        case 
5:
        {
            
give_item(id"weapon_g3sg1");
            
cs_set_user_bpammo(idCSW_G3SG1200);
            
VipUsed[id] = true;
            
client_printc(id"%s You choose !gG3sg1"PREFIX);
            
        }
        
    }
    
menu_destroy(menu);
    return 
PLUGIN_HANDLED;
}

public 
VipTMenu(id)
{
    new 
menu menu_create("\yFree VIP Menu \r(Zombies):^n""VipTMenu_handler");
    
    
menu_additem(menu"\w500 Hp""1"0);
    
menu_additem(menu"\wRandom AmmoPacks \d[From 1 to 9 AP]""2"0);
    
    
menu_setprop(menuMPROP_EXITMEXIT_ALL);
    
menu_display(idmenu0);
}

public 
VipTMenu_handler(idmenuitem)
{
    if( 
item == MENU_EXIT )
    {
        
menu_destroy(menu);
        return 
PLUGIN_HANDLED;
    }
    
    new 
data[6], iName[64];
    new 
accesscallback;
    
menu_item_getinfo(menuitemaccessdata,5iName63callback);
    
    new 
key str_to_num(data);
    
    switch(
key)
    {
        case 
1:
        {
            
VipUsed[id] = true;
            
set_user_health(idget_user_health(id) + 500);
            
client_printc(id"%s You Have !g500 HP"PREFIX);
            
VipUsed[id] = true;
        }
        
        case 
2:
        {
            
zp_set_user_ammo_packs(idzp_get_user_ammo_packs(id) + random_num(19))
            
VipUsed[id] = true;
            
client_printc(id"%s You Have !gSome AmmoPacks!n"PREFIX);
        }
        
    }
    
    
menu_destroy(menu);
    return 
PLUGIN_HANDLED;
}

// Colour Chat
stock client_printc(const id, const input[], any:...)
{
    new 
count 1players[32];
    static 
msg[191];
    
vformat(msg190input3);
    
    
replace_all(msg190"!g""^x04"); // Green Color
    
replace_all(msg190"!n""^x01"); // Default Color
    
replace_all(msg190"!t""^x03"); // Team Color
    
    
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();
            }
        }
    }

- My 1sT Plugin i hope you like it and thnx for Spawner for help

Last edited by Dr Zayd; 09-07-2015 at 10:48. Reason: info
Dr Zayd is offline
Linkin Hisoka
Senior Member
Join Date: Sep 2014
Location: Morocco, Marrakesh
Old 07-17-2015 , 22:33   Re: [ZP] Free VIP Menu
Reply With Quote #2

Nice but no information about the plugin ?
__________________
Moroccan and proud
Linkin Hisoka is offline
Old 07-17-2015, 23:43
Jhob94
This message has been deleted by asherkin.
ZiZox
Senior Member
Join Date: Sep 2014
Location: Morocco
Old 07-18-2015 , 19:25   Re: [ZP] Free VIP Menu
Reply With Quote #3

COOL :')
__________________
ZiZox is offline
Send a message via Skype™ to ZiZox
Dr Zayd
Senior Member
Join Date: Jun 2014
Location: forums.alliedmods.net
Old 08-04-2015 , 05:11   Re: [ZP] Free VIP Menu
Reply With Quote #4

Thanks ^^
Quote:
Nice but no information about the plugin ?
i forgot :p
__________________
Invisible System | 100%
ـــــــــــــــــــــــــــــ
Anti setinfo check | Ez Plugin and lite
ـــــــــــــــــــــــــــــ
[ZP] Free VIP Menu | Free VIP menu | ZP-Mod |

Last edited by Dr Zayd; 08-04-2015 at 05:12.
Dr Zayd is offline
Dr Zayd
Senior Member
Join Date: Jun 2014
Location: forums.alliedmods.net
Old 09-13-2015 , 16:01   Re: [ZP] Free VIP Menu
Reply With Quote #5

Bump ? :v
Dr Zayd is offline
Depresie
Veteran Member
Join Date: Nov 2013
Old 09-14-2015 , 12:26   Re: [ZP] Free VIP Menu
Reply With Quote #6

why are you bumping it ?...
Depresie is offline
amir saiaoud
Senior Member
Join Date: May 2015
Location: essaouira , maroc
Old 09-16-2015 , 09:20   Re: [ZP] Free VIP Menu
Reply With Quote #7

NiCe ;)
__________________
amir saiaoud is offline
Send a message via Skype™ to amir saiaoud
Dr Zayd
Senior Member
Join Date: Jun 2014
Location: forums.alliedmods.net
Old 09-18-2015 , 13:06   Re: [ZP] Free VIP Menu
Reply With Quote #8

Quote:
Originally Posted by Depresie View Post
why are you bumping it ?...
More Views
__________________
Invisible System | 100%
ـــــــــــــــــــــــــــــ
Anti setinfo check | Ez Plugin and lite
ـــــــــــــــــــــــــــــ
[ZP] Free VIP Menu | Free VIP menu | ZP-Mod |
Dr Zayd is offline
BN Houssam
BANNED
Join Date: Sep 2015
Location: Oujda
Old 09-26-2015 , 17:06   Re: [ZP] Free VIP Menu
Reply With Quote #9

Niceeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee :')
BN Houssam is offline
amir saiaoud
Senior Member
Join Date: May 2015
Location: essaouira , maroc
Old 10-16-2015 , 11:31   Re: [ZP] Free VIP Menu
Reply With Quote #10

where is the sound file :/ /sound/ng_vipmenu.wav ?
__________________
amir saiaoud is offline
Send a message via Skype™ to amir saiaoud
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 00:40.


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