Raised This Month: $ Target: $400
 0% 

[Plugin] Vip Menu For All


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Plugin Info:     Modification:   ALL        Category:   Admin Commands       
vulcaNN
Junior Member
Join Date: Dec 2018
Old 01-11-2019 , 18:49   [Plugin] Vip Menu For All
Reply With Quote #1

Hi, I leave here a new public plugin for you. The Free Vip plugin is a plugin that after the third round appears a weapons menu for everyone. If there is any mistake, tell me.

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <cstrike>
#include <ColorChat>

new g_c4g_round

#define PREFIX_CENTER "[ Vip Free ]"
#define PREFIX_CHAT "^4[ Vip Free ]"

public plugin_init()
{
    
register_plugin("Free Vip Menu""""vulcaNN")
    
    
register_logevent("logevent_round_start"2"1=Round_Start")
    
register_event("TextMsg""Event_Round_Restart""a""2=#Game_Commencing""2=#Game_will_restart_in")
}

public 
logevent_round_start()
{
    
g_round++
    
    if(
g_round >= 3)
    {
        for(new 
1<= get_maxplayers(); i++)
        {
            if(!
is_user_connected(i))
                continue
                
            
menu_vmenu(i)
        }
    }
}

public 
Event_Round_Restart()
{
    
g_round 0
}

public 
menu_vmenu(id)
{
    if(
g_round 3)
    {
        
// ColorChat(id, GREEN, "%s ^01The Vip Menu appears from the third round.", PREFIX_CHAT) ; This is for if they wanted to tell you from which round the menu appears.
        
return PLUGIN_HANDLED
    
}
    
    
OpenMenu(id)
    return 
PLUGIN_HANDLED;
}

public 
OpenMenu(id)
{
    new 
menu menu_create("\r[ Free Vip ]^n\yMenu Vip""OpenMenu_sub")
    
    
menu_additem(menu"\wAK47 + Deagle""0"0)
    
menu_additem(menu"\wM4A1 + Deagle""1"0)
    
    
menu_setprop(menuMPROP_EXITNAME"\wExit")
    
    
menu_display(idmenu0)
}

public 
OpenMenu_sub(idmenuitem)
{
    if(
item == MENU_EXIT)
    {
        
menu_destroy(menu)
        return 
PLUGIN_HANDLED
    
}
    
    switch(
item)
    {
        case 
0:
        {
            
select_ak47(id)
        }
        case 
1:
        {
            
select_m4a1(id)
        }
    }
    
menu_destroy(menu)
    return 
PLUGIN_HANDLED
}

public 
select_ak47(id)
{
    
strip_user_weapons(id)
    
give_item(id"weapon_knife")
    
give_item(id"item_assaultsuit")
    
give_item(id"weapon_hegrenade")
    
give_item(id"weapon_flashbang")
    
give_item(id"weapon_flashbang")
    
give_item(id"weapon_ak47")
    
cs_set_user_bpammo(idCSW_AK4790)
    
give_item(id"weapon_deagle")
    
cs_set_user_bpammo(idCSW_DEAGLE35)
    
    if(
user_has_weapon(idCSW_C4))
        
g_c4 true
    
    
if(cs_get_user_team(id) == CS_TEAM_CT)
    {
        
give_item(id"item_thighpack")
    }
    else if(
cs_get_user_team(id) == CS_TEAM_T)
    {
        if(
g_c4)
        {
            
give_item(id"weapon_c4")
            
cs_set_user_plant(id11)
        }
    }
        
    
client_print(idprint_center"%s Received AK47 & Deagle !"PREFIX_CENTER)
}

public 
select_m4a1(id)
{
    
strip_user_weapons(id)
    
give_item(id"weapon_knife")
    
give_item(id"item_assaultsuit")
    
give_item(id"weapon_hegrenade")
    
give_item(id"weapon_flashbang")
    
give_item(id"weapon_flashbang")
    
give_item(id"weapon_m4a1")
    
cs_set_user_bpammo(idCSW_M4A190)
    
give_item(id"weapon_deagle")
    
cs_set_user_bpammo(idCSW_DEAGLE35)
    
    if(
user_has_weapon(idCSW_C4))
        
g_c4 true
    
    
if(cs_get_user_team(id) == CS_TEAM_CT)
    {
        
give_item(id"item_thighpack")
    }
    else if(
cs_get_user_team(id) == CS_TEAM_T)
    {
        if(
g_c4)
        {
            
give_item(id"weapon_c4")
            
cs_set_user_plant(id11)
        }
    }
        
    
client_print(idprint_center"%s Received M4A1 & Deagle !"PREFIX_CENTER)

By: vulcaNN
Attached Files
File Type: sma Get Plugin or Get Source (Free_Vip.sma - 901 views - 3.0 KB)
vulcaNN is offline
 


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 20:43.


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