Need to Reedit this [VIP Menu] Plugin

Статус
В этой теме нельзя размещать новые ответы.
Сообщения
5
Реакции
0
Hi All !!!
1) Add Awp and Deagle in VIP Plugin
2) Add print in chat
[Server Tag] You have 30 Sec to Select VIP Guns or it will Closed !!!
3) Start of first 3 Round of the map it should give Players to He+Flash (No VIP Gun in first 3 Rounds)

Код:
#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <cstrike>

new g_c4, g_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 i = 1; i <= 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)
    {
        ChatColor(0, "^4%s ^03The Vip Menu appears from the^4 3rd^3 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, "\wM4A1 + Deagle", "0", 0)
    menu_additem(menu, "\wAK47 + Deagle", "1", 0)
    
    menu_setprop(menu, MPROP_EXITNAME, "\wExit")
    
    menu_display(id, menu, 0)
}

public OpenMenu_sub(id, menu, item)
{
    if(item == MENU_EXIT)
    {
        menu_destroy(menu)
        return PLUGIN_HANDLED
    }
    
    switch(item)
    {
        case 0:
        {
            select_m4a1(id)
        }
        case 1:
        {
            select_ak47(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(id, CSW_AK47, 90)
    give_item(id, "weapon_deagle")
    cs_set_user_bpammo(id, CSW_DEAGLE, 35)
    
    if(user_has_weapon(id, CSW_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(id, 1, 1)
        }
    }
    
    ChatColor(0, "^4%s^3 Received^4 AK47^3 &^4 Deagle^3 !", 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(id, CSW_M4A1, 90)
    give_item(id, "weapon_deagle")
    cs_set_user_bpammo(id, CSW_DEAGLE, 35)
    
    if(user_has_weapon(id, CSW_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(id, 1, 1)
        }
    }
    
    ChatColor(0,"^4%s^3 Received ^4M4A1^3 &^4 Deagle^3 !", PREFIX_CENTER)
}



stock ChatColor(const id, const input[], any:...) {
    static csaymsg;
    if (!csaymsg) { csaymsg = get_user_msgid("SayText"); }
    
    static count, players[32], i, player;
    count = 1;
    i = 0;
    static msg[191];
    vformat(msg, 190, input, 3);
    
    replace_all(msg, 190, "!g", "^4");
    replace_all(msg, 190, "!y", "^1");
    replace_all(msg, 190, "!n", "^1");
    replace_all(msg, 190, "!t", "^3");
    
    if (id)
    {
        players[0] = id;
    }
    else
    {
        get_players(players, count, "ch");
    }
    
    for (i = 0; i < count; i++)
    {
        player = players[i];
        if (is_user_connected(player))
        {
            message_begin(MSG_ONE_UNRELIABLE, csaymsg, _, player);
            write_byte(player);
            write_string(msg);
            message_end();
        }
    }
}
 
Статус
В этой теме нельзя размещать новые ответы.

Пользователи, просматривающие эту тему

Сейчас на форуме нет ни одного пользователя.
Сверху Снизу