Raised This Month: $51 Target: $400
 12% 

edit vmenu plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Shitty
Member
Join Date: Sep 2019
Old 01-06-2021 , 18:59   edit vmenu plugin
Reply With Quote #1

could someone edit this vipmenu plugin
1- make the vipmenu exist for ct and t ( in the plugin it is only ct)
2- remove the double damage from the weapons in the plugin
3- remove the /vmenu command and instead make the menu always shows at the first of the rounds
4- make it does not come at the first round of the map or the 2th, make it starts to show at the 3th round of the map, ex : changed the map then u should wait 2 rounds until the menu starts to show to u at the 3th round
5- make the vip player everyround "get" a full armor + grenade, not "set".

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

#define PLUGIN "VIP-Menu"
#define VERSION "1.0"
#define AUTHOR "someone"

#define VIP_LEVEL ADMIN_LEVEL_F

new bool:bUsedMenu[33];
new 
bool:bHasWeapon[33];

new 
bool:bDoJump[33];

new 
iJumpNum[33];

new const 
szMotd[] = "addons/amxmodx/configs/vip.html";

new const 
szMenuItems[][] = 
{
    
"Deadly AK47 + Deadly Deagle.",
    
"Deadly M4A1 + Deadly Deagle.",
    
"Deadly AWP + Deadly Deagle."
};

new const 
iWeapons[] =
{
    
CSW_AK47,
    
CSW_M4A1,
    
CSW_AWP
};

new const 
szWeapons[][] =
{
    
"weapon_ak47",
    
"weapon_m4a1",
    
"weapon_awp"
};

new const 
szWeaponModels[][] =
{
    
"models/vmenu/v_deadly_ak47.mdl",
    
"models/vmenu/v_deadly_m4a1.mdl",
    
"models/vmenu/v_deadly_awp.mdl",
    
"models/vmenu/v_deadly_deagle.mdl"
};

public 
plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR);
    
    
register_clcmd("say /vips""VipsOnline");
    
register_clcmd("say /vip""VipMotd");
    
register_clcmd("say /vmenu""VipMenu");
    
    
RegisterHam(Ham_Spawn"player""PostSpawn"1);
    
RegisterHam(Ham_TakeDamage"player""PreDoubleDamage");
    
RegisterHam(Ham_Killed"player""PostPlayerKilled"1);
    
    
register_event("HLTV""NewRound""a""1=0""2=0");
    
register_event("CurWeapon""WeaponChange""be""1=1");
    
    
register_message(get_user_msgid("ScoreAttrib"), "MsgScoreAttrib");
    
}

public 
plugin_precache()
{
    for(new 
isizeof(szWeaponModels); i++)
    {
        
precache_model(szWeaponModels[i]);
    }
}

public 
NewRound()
{
    new 
szPlayers[32], iNum;
    
get_players(szPlayersiNum);
    
    for(new 
iiNumi++)
    {
        if(
get_user_flags(szPlayers[i]) & VIP_LEVEL)
        {
            
bUsedMenu[szPlayers[i]] = false;
        }
    }
}

public 
WeaponChange(id
{
    new 
iAmmoiClipiWeapon get_user_weapon(idiAmmoiClip);
    
    if(
bHasWeapon[id])
    {
        for(new 
isizeof(iWeapons); i++)
        {
            if(
iWeapon == iWeapons[i])
            {
                
set_pev(idpev_viewmodel2szWeaponModels[i]);
                break;
            }
        }
        
        if(
iWeapon == CSW_DEAGLE)
        {
            
set_pev(idpev_viewmodel2szWeaponModels[3]);
        }
    }
}

public 
VipsOnline(id) {
    new 
bool:IsFirst true;
    new 
szMessage[256], iLenszPlayers[32], iNum;
    
    
get_players(szPlayersiNum);
    
    for(new 
iiNumi++)
    {
        if(!
is_user_connected(szPlayers[i]) || !(get_user_flags(szPlayers[i]) & VIP_LEVEL))
        {
            continue;
        }
        
        if(!
IsFirst)
        {
            
szMessage[iLen++] = ' ';
            
szMessage[iLen++] = '|';
            
szMessage[iLen++] = ' ';
        }
        
        
szMessage[iLen++] = '^x04';
        
szMessage[iLen] = EOS;
        
        
iLen += get_user_name(szPlayers[i], szMessage[iLen], charsmax(szMessage) - iLen);
        
        
szMessage[iLen++] = '^x01';
        
szMessage[iLen] = EOS;
        
        
IsFirst false;
    }
    
    if(
IsFirst)
    {

        
ColorChat(idGREEN"[Vip-Menu] ^3There are no vips online.");
        return 
PLUGIN_HANDLED;
    }
    else
    {
        
ColorChat(idTEAM_COLOR"Online Vips: %s"szMessage);
        return 
PLUGIN_HANDLED;        
    }
    
    return 
PLUGIN_CONTINUE;
}

public 
VipMotd(id
{
    
show_motd(idszMotd"VIP");
}

public 
VipMenu(id
{
    if(!(
get_user_flags(id) & VIP_LEVEL))
    {
        
ColorChat(idGREEN"[Vip-Menu]^3 Only vips can use this command !");
        return 
PLUGIN_HANDLED;
    }
    
    if(
cs_get_user_team(id) != CS_TEAM_CT)
    {
        
ColorChat(idGREEN"[Vip-Menu]^3 Only CT's can use the Vip-Menu !");
        return 
PLUGIN_HANDLED;
    }
    
    if(
bUsedMenu[id])
    {
        
ColorChat(idGREEN"[Vip-Menu] You can only use this 1 time per round.");
        return 
PLUGIN_HANDLED;
    }
    
    new 
menu menu_create("[Vip-Menu]:""VipMenuHandler");

    for(new 
isizeof(szMenuItems); i++)
    {
        
menu_additem(menuszMenuItems[i]);
    }
    
menu_display(idmenu);
    return 
PLUGIN_HANDLED;
}

public 
VipMenuHandler(idmenuitem)
{
    if(!
is_user_alive(id))
    {
        
menu_destroy(menu);
        return 
PLUGIN_HANDLED;
    }
    
    if(
item == MENU_EXIT)
    {
        
menu_destroy(menu);
        return 
PLUGIN_HANDLED;
    }
    
    
bUsedMenu[id] = true;
    
bHasWeapon[id] = true;
    
    
strip_user_weapons(id);
    
give_item(id"weapon_knife");
    
give_item(idszWeapons[item]);
    
give_item(id"weapon_deagle");
    
cs_set_user_bpammo(idiWeapons[item], 255);
    
cs_set_user_bpammo(idCSW_DEAGLE255);
    
    
set_pev(idpev_viewmodel2szWeaponModels[item]);
    
    
ColorChat(idGREEN"[Vip-Menu]:^3 %s"szMenuItems[item]);
    
    
menu_destroy(menu);
    return 
PLUGIN_HANDLED;
}

public 
PostSpawn(id
{
    if(
get_user_flags(id) & VIP_LEVEL && is_user_alive(id))
    {
        if(
cs_get_user_team(id) == CS_TEAM_CT || cs_get_user_team(id) == CS_TEAM_T)
        {
            
set_user_health(id125);
            
set_user_armor(id125);
        
            new 
iAmmoiClipiWeapon get_user_weapon(idiAmmoiClip);
        
            for(new 
isizeof(iWeapons); i++)
            {
                if(
iWeapon != iWeapons[i])
                {
                    
bHasWeapon[id] = false;
                }
            }
        }
    }
}

public 
PostPlayerKilled(iVictimiAttackeriShouldGib
{
    if(
is_user_connected(iVictim) && bHasWeapon[iVictim])
    {
        
bHasWeapon[iVictim] = false;
    }
}

public 
PreDoubleDamage(idiInflictoriAttackerFloat:iDamageiDamagebits)
{
    if(!
is_user_connected(iAttacker) || iAttacker != iInflictor || !bHasWeapon[iAttacker])
    {
        return 
HAM_IGNORED;
    }
    
    new 
iWeapon get_user_weapon(iAttacker);
    
    for(new 
isizeof(iWeapons); i++)
    {
        if(
iWeapon == iWeapons[i] || iWeapon == CSW_DEAGLE)
        {
            
SetHamParamFloat(4iDamage 2);
            break;
        }
    }
    return 
HAM_HANDLED;
}

public 
client_PreThink(id)
{
    if(
is_user_alive(id) && get_user_flags(id) & VIP_LEVEL)
    {
        new 
iNewButton get_user_button(id);
        new 
iOldButton get_user_oldbutton(id);
        
        if((
iNewButton IN_JUMP) && !(get_entity_flags(id) & FL_ONGROUND) && !(iOldButton IN_JUMP))
        {
            if(
iJumpNum[id] < 1)
            {
                
bDoJump[id] = true;
                
iJumpNum[id]++;
                return 
PLUGIN_CONTINUE;
            }
        }
        
        if((
iNewButton IN_JUMP) && (get_entity_flags(id) & FL_ONGROUND))
        {
            
iJumpNum[id] = 0;
            return 
PLUGIN_CONTINUE;
        }
    }
    return 
PLUGIN_CONTINUE;
}

public 
client_PostThink(id)
{
    if(
is_user_alive(id) && get_user_flags(id) & VIP_LEVEL)
    {
        if(
bDoJump[id] == true)
        {
            new 
Float:fVelocity[3];
            
entity_get_vector(idEV_VEC_velocityfVelocity);
            
fVelocity[2] = random_float(265.0285.0);
            
entity_set_vector(idEV_VEC_velocityfVelocity);
            
bDoJump[id] = false;
            return 
PLUGIN_CONTINUE;
        }
    }
    return 
PLUGIN_CONTINUE;
}

public 
client_putinserver(id
{
    if(
get_user_flags(id) & VIP_LEVEL)
    {
        
bUsedMenu[id] = false;
        
bHasWeapon[id] = false;
        
iJumpNum[id] = 0;
        
bDoJump[id]  =false;
    }
}

public 
client_disconnect(id)
{
    if(
get_user_flags(id) & VIP_LEVEL
    {
        
bUsedMenu[id] = false;
        
bHasWeapon[id] = false;
        
iJumpNum[id] = 0;
        
bDoJump[id]  =false;
    }
}

public 
MsgScoreAttrib(const MsgId, const MsgType, const MsgDest)
{
    static 
id;
    
id get_msg_arg_int(1);
    
    if((
get_user_flags(id) & VIP_LEVEL) && !get_msg_arg_int(2))
    {
        
set_msg_arg_int(2ARG_BYTE, (<< 2));
    }

__________________

Last edited by Shitty; 01-06-2021 at 20:08.
Shitty is offline
iceeedr
Veteran Member
Join Date: Apr 2017
Location: Brazil
Old 01-06-2021 , 19:33   Re: edit vmenu plugin
Reply With Quote #2

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

#define PLUGIN "VIP-Menu"
#define VERSION "1.0"
#define AUTHOR "someone"

#define VIP_LEVEL ADMIN_LEVEL_F

new bool:bUsedMenu[33];
new 
bool:bHasWeapon[33];

new 
bool:bDoJump[33];

new 
iJumpNum[33];

new const 
szMotd[] = "addons/amxmodx/configs/vip.html";

new const 
szMenuItems[][] = 
{
    
"Deadly AK47 + Deadly Deagle.",
    
"Deadly M4A1 + Deadly Deagle.",
    
"Deadly AWP + Deadly Deagle."
};

new const 
iWeapons[] =
{
    
CSW_AK47,
    
CSW_M4A1,
    
CSW_AWP
};

new const 
szWeapons[][] =
{
    
"weapon_ak47",
    
"weapon_m4a1",
    
"weapon_awp"
};

new const 
szWeaponModels[][] =
{
    
"models/vmenu/v_deadly_ak47.mdl",
    
"models/vmenu/v_deadly_m4a1.mdl",
    
"models/vmenu/v_deadly_awp.mdl",
    
"models/vmenu/v_deadly_deagle.mdl"
};

public 
plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR);
    
    
register_clcmd("say /vips""VipsOnline");
    
register_clcmd("say /vip""VipMotd");
    
register_clcmd("say /vmenu""VipMenu");
    
    
RegisterHam(Ham_Spawn"player""PostSpawn"1);
    
RegisterHam(Ham_Killed"player""PostPlayerKilled"1);
    
    
register_event("HLTV""NewRound""a""1=0""2=0");
    
register_event("CurWeapon""WeaponChange""be""1=1");
    
    
register_message(get_user_msgid("ScoreAttrib"), "MsgScoreAttrib");
    
}

public 
plugin_precache()
{
    for(new 
isizeof(szWeaponModels); i++)
    {
        
precache_model(szWeaponModels[i]);
    }
}

public 
NewRound()
{
    new 
szPlayers[32], iNum;
    
get_players(szPlayersiNum);
    
    for(new 
iiNumi++)
    {
        if(
get_user_flags(szPlayers[i]) & VIP_LEVEL)
        {
            
bUsedMenu[szPlayers[i]] = false;
        }
    }
}

public 
WeaponChange(id
{
    new 
iAmmoiClipiWeapon get_user_weapon(idiAmmoiClip);
    
    if(
bHasWeapon[id])
    {
        for(new 
isizeof(iWeapons); i++)
        {
            if(
iWeapon == iWeapons[i])
            {
                
set_pev(idpev_viewmodel2szWeaponModels[i]);
                break;
            }
        }
        
        if(
iWeapon == CSW_DEAGLE)
        {
            
set_pev(idpev_viewmodel2szWeaponModels[3]);
        }
    }
}

public 
VipsOnline(id) {
    new 
bool:IsFirst true;
    new 
szMessage[256], iLenszPlayers[32], iNum;
    
    
get_players(szPlayersiNum);
    
    for(new 
iiNumi++)
    {
        if(!
is_user_connected(szPlayers[i]) || !(get_user_flags(szPlayers[i]) & VIP_LEVEL))
        {
            continue;
        }
        
        if(!
IsFirst)
        {
            
szMessage[iLen++] = ' ';
            
szMessage[iLen++] = '|';
            
szMessage[iLen++] = ' ';
        }
        
        
szMessage[iLen++] = '^x04';
        
szMessage[iLen] = EOS;
        
        
iLen += get_user_name(szPlayers[i], szMessage[iLen], charsmax(szMessage) - iLen);
        
        
szMessage[iLen++] = '^x01';
        
szMessage[iLen] = EOS;
        
        
IsFirst false;
    }
    
    if(
IsFirst)
    {

        
ColorChat(idGREEN"[Vip-Menu] ^3There are no vips online.");
        return 
PLUGIN_HANDLED;
    }
    else
    {
        
ColorChat(idTEAM_COLOR"Online Vips: %s"szMessage);
        return 
PLUGIN_HANDLED;        
    }
    
    return 
PLUGIN_CONTINUE;
}

public 
VipMotd(id
{
    
show_motd(idszMotd"VIP");
}

public 
VipMenu(id
{
    if(!(
get_user_flags(id) & VIP_LEVEL))
    {
        
ColorChat(idGREEN"[Vip-Menu]^3 Only vips can use this command !");
        return 
PLUGIN_HANDLED;
    }
    
    if(
bUsedMenu[id])
    {
        
ColorChat(idGREEN"[Vip-Menu] You can only use this 1 time per round.");
        return 
PLUGIN_HANDLED;
    }
    
    new 
menu menu_create("[Vip-Menu]:""VipMenuHandler");

    for(new 
isizeof(szMenuItems); i++)
    {
        
menu_additem(menuszMenuItems[i]);
    }
    
menu_display(idmenu);
    return 
PLUGIN_HANDLED;
}

public 
VipMenuHandler(idmenuitem)
{
    if(!
is_user_alive(id))
    {
        
menu_destroy(menu);
        return 
PLUGIN_HANDLED;
    }
    
    if(
item == MENU_EXIT)
    {
        
menu_destroy(menu);
        return 
PLUGIN_HANDLED;
    }
    
    
bUsedMenu[id] = true;
    
bHasWeapon[id] = true;
    
    
strip_user_weapons(id);
    
give_item(id"weapon_knife");
    
give_item(idszWeapons[item]);
    
give_item(id"weapon_deagle");
    
cs_set_user_bpammo(idiWeapons[item], 255);
    
cs_set_user_bpammo(idCSW_DEAGLE255);
    
    
set_pev(idpev_viewmodel2szWeaponModels[item]);
    
    
ColorChat(idGREEN"[Vip-Menu]:^3 %s"szMenuItems[item]);
    
    
menu_destroy(menu);
    return 
PLUGIN_HANDLED;
}

public 
PostSpawn(id
{
    if(
get_user_flags(id) & VIP_LEVEL && is_user_alive(id))
    {
        if(
cs_get_user_team(id) == CS_TEAM_CT || cs_get_user_team(id) == CS_TEAM_T)
        {
            
set_user_health(id125);
            
set_user_armor(id125);
        
            new 
iAmmoiClipiWeapon get_user_weapon(idiAmmoiClip);
        
            for(new 
isizeof(iWeapons); i++)
            {
                if(
iWeapon != iWeapons[i])
                {
                    
bHasWeapon[id] = false;
                }
            }
        }
    }
}

public 
PostPlayerKilled(iVictimiAttackeriShouldGib
{
    if(
is_user_connected(iVictim) && bHasWeapon[iVictim])
    {
        
bHasWeapon[iVictim] = false;
    }
}

public 
client_PreThink(id)
{
    if(
is_user_alive(id) && get_user_flags(id) & VIP_LEVEL)
    {
        new 
iNewButton get_user_button(id);
        new 
iOldButton get_user_oldbutton(id);
        
        if((
iNewButton IN_JUMP) && !(get_entity_flags(id) & FL_ONGROUND) && !(iOldButton IN_JUMP))
        {
            if(
iJumpNum[id] < 1)
            {
                
bDoJump[id] = true;
                
iJumpNum[id]++;
                return 
PLUGIN_CONTINUE;
            }
        }
        
        if((
iNewButton IN_JUMP) && (get_entity_flags(id) & FL_ONGROUND))
        {
            
iJumpNum[id] = 0;
            return 
PLUGIN_CONTINUE;
        }
    }
    return 
PLUGIN_CONTINUE;
}

public 
client_PostThink(id)
{
    if(
is_user_alive(id) && get_user_flags(id) & VIP_LEVEL)
    {
        if(
bDoJump[id] == true)
        {
            new 
Float:fVelocity[3];
            
entity_get_vector(idEV_VEC_velocityfVelocity);
            
fVelocity[2] = random_float(265.0285.0);
            
entity_set_vector(idEV_VEC_velocityfVelocity);
            
bDoJump[id] = false;
            return 
PLUGIN_CONTINUE;
        }
    }
    return 
PLUGIN_CONTINUE;
}

public 
client_putinserver(id
{
    if(
get_user_flags(id) & VIP_LEVEL)
    {
        
bUsedMenu[id] = false;
        
bHasWeapon[id] = false;
        
iJumpNum[id] = 0;
        
bDoJump[id]  =false;
    }
}

public 
client_disconnect(id)
{
    if(
get_user_flags(id) & VIP_LEVEL
    {
        
bUsedMenu[id] = false;
        
bHasWeapon[id] = false;
        
iJumpNum[id] = 0;
        
bDoJump[id]  =false;
    }
}

public 
MsgScoreAttrib(const MsgId, const MsgType, const MsgDest)
{
    static 
id;
    
id get_msg_arg_int(1);
    
    if((
get_user_flags(id) & VIP_LEVEL) && !get_msg_arg_int(2))
    {
        
set_msg_arg_int(2ARG_BYTE, (<< 2));
    }

__________________


Quote:
Originally Posted by fysiks View Post
Please stop trying to help. You appear to just be posting random stuff. Wait until you actually understand more about AMX Mod X and how the game works.
https://iceeedr.com.br/
iceeedr is offline
Send a message via Skype™ to iceeedr
Shitty
Member
Join Date: Sep 2019
Old 01-06-2021 , 19:48   Re: edit vmenu plugin
Reply With Quote #3

Quote:
Originally Posted by iceeedr View Post
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <hamsandwich>
#include <colorchat>
#include <cstrike>
#include <fakemeta>
#include <engine>

#define PLUGIN "VIP-Menu"
#define VERSION "1.0"
#define AUTHOR "someone"

#define VIP_LEVEL ADMIN_LEVEL_F

new bool:bUsedMenu[33];
new 
bool:bHasWeapon[33];

new 
bool:bDoJump[33];

new 
iJumpNum[33];

new const 
szMotd[] = "addons/amxmodx/configs/vip.html";

new const 
szMenuItems[][] = 
{
    
"Deadly AK47 + Deadly Deagle.",
    
"Deadly M4A1 + Deadly Deagle.",
    
"Deadly AWP + Deadly Deagle."
};

new const 
iWeapons[] =
{
    
CSW_AK47,
    
CSW_M4A1,
    
CSW_AWP
};

new const 
szWeapons[][] =
{
    
"weapon_ak47",
    
"weapon_m4a1",
    
"weapon_awp"
};

new const 
szWeaponModels[][] =
{
    
"models/vmenu/v_deadly_ak47.mdl",
    
"models/vmenu/v_deadly_m4a1.mdl",
    
"models/vmenu/v_deadly_awp.mdl",
    
"models/vmenu/v_deadly_deagle.mdl"
};

public 
plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR);
    
    
register_clcmd("say /vips""VipsOnline");
    
register_clcmd("say /vip""VipMotd");
    
register_clcmd("say /vmenu""VipMenu");
    
    
RegisterHam(Ham_Spawn"player""PostSpawn"1);
    
RegisterHam(Ham_Killed"player""PostPlayerKilled"1);
    
    
register_event("HLTV""NewRound""a""1=0""2=0");
    
register_event("CurWeapon""WeaponChange""be""1=1");
    
    
register_message(get_user_msgid("ScoreAttrib"), "MsgScoreAttrib");
    
}

public 
plugin_precache()
{
    for(new 
isizeof(szWeaponModels); i++)
    {
        
precache_model(szWeaponModels[i]);
    }
}

public 
NewRound()
{
    new 
szPlayers[32], iNum;
    
get_players(szPlayersiNum);
    
    for(new 
iiNumi++)
    {
        if(
get_user_flags(szPlayers[i]) & VIP_LEVEL)
        {
            
bUsedMenu[szPlayers[i]] = false;
        }
    }
}

public 
WeaponChange(id
{
    new 
iAmmoiClipiWeapon get_user_weapon(idiAmmoiClip);
    
    if(
bHasWeapon[id])
    {
        for(new 
isizeof(iWeapons); i++)
        {
            if(
iWeapon == iWeapons[i])
            {
                
set_pev(idpev_viewmodel2szWeaponModels[i]);
                break;
            }
        }
        
        if(
iWeapon == CSW_DEAGLE)
        {
            
set_pev(idpev_viewmodel2szWeaponModels[3]);
        }
    }
}

public 
VipsOnline(id) {
    new 
bool:IsFirst true;
    new 
szMessage[256], iLenszPlayers[32], iNum;
    
    
get_players(szPlayersiNum);
    
    for(new 
iiNumi++)
    {
        if(!
is_user_connected(szPlayers[i]) || !(get_user_flags(szPlayers[i]) & VIP_LEVEL))
        {
            continue;
        }
        
        if(!
IsFirst)
        {
            
szMessage[iLen++] = ' ';
            
szMessage[iLen++] = '|';
            
szMessage[iLen++] = ' ';
        }
        
        
szMessage[iLen++] = '^x04';
        
szMessage[iLen] = EOS;
        
        
iLen += get_user_name(szPlayers[i], szMessage[iLen], charsmax(szMessage) - iLen);
        
        
szMessage[iLen++] = '^x01';
        
szMessage[iLen] = EOS;
        
        
IsFirst false;
    }
    
    if(
IsFirst)
    {

        
ColorChat(idGREEN"[Vip-Menu] ^3There are no vips online.");
        return 
PLUGIN_HANDLED;
    }
    else
    {
        
ColorChat(idTEAM_COLOR"Online Vips: %s"szMessage);
        return 
PLUGIN_HANDLED;        
    }
    
    return 
PLUGIN_CONTINUE;
}

public 
VipMotd(id
{
    
show_motd(idszMotd"VIP");
}

public 
VipMenu(id
{
    if(!(
get_user_flags(id) & VIP_LEVEL))
    {
        
ColorChat(idGREEN"[Vip-Menu]^3 Only vips can use this command !");
        return 
PLUGIN_HANDLED;
    }
    
    if(
bUsedMenu[id])
    {
        
ColorChat(idGREEN"[Vip-Menu] You can only use this 1 time per round.");
        return 
PLUGIN_HANDLED;
    }
    
    new 
menu menu_create("[Vip-Menu]:""VipMenuHandler");

    for(new 
isizeof(szMenuItems); i++)
    {
        
menu_additem(menuszMenuItems[i]);
    }
    
menu_display(idmenu);
    return 
PLUGIN_HANDLED;
}

public 
VipMenuHandler(idmenuitem)
{
    if(!
is_user_alive(id))
    {
        
menu_destroy(menu);
        return 
PLUGIN_HANDLED;
    }
    
    if(
item == MENU_EXIT)
    {
        
menu_destroy(menu);
        return 
PLUGIN_HANDLED;
    }
    
    
bUsedMenu[id] = true;
    
bHasWeapon[id] = true;
    
    
strip_user_weapons(id);
    
give_item(id"weapon_knife");
    
give_item(idszWeapons[item]);
    
give_item(id"weapon_deagle");
    
cs_set_user_bpammo(idiWeapons[item], 255);
    
cs_set_user_bpammo(idCSW_DEAGLE255);
    
    
set_pev(idpev_viewmodel2szWeaponModels[item]);
    
    
ColorChat(idGREEN"[Vip-Menu]:^3 %s"szMenuItems[item]);
    
    
menu_destroy(menu);
    return 
PLUGIN_HANDLED;
}

public 
PostSpawn(id
{
    if(
get_user_flags(id) & VIP_LEVEL && is_user_alive(id))
    {
        if(
cs_get_user_team(id) == CS_TEAM_CT || cs_get_user_team(id) == CS_TEAM_T)
        {
            
set_user_health(id125);
            
set_user_armor(id125);
        
            new 
iAmmoiClipiWeapon get_user_weapon(idiAmmoiClip);
        
            for(new 
isizeof(iWeapons); i++)
            {
                if(
iWeapon != iWeapons[i])
                {
                    
bHasWeapon[id] = false;
                }
            }
        }
    }
}

public 
PostPlayerKilled(iVictimiAttackeriShouldGib
{
    if(
is_user_connected(iVictim) && bHasWeapon[iVictim])
    {
        
bHasWeapon[iVictim] = false;
    }
}

public 
client_PreThink(id)
{
    if(
is_user_alive(id) && get_user_flags(id) & VIP_LEVEL)
    {
        new 
iNewButton get_user_button(id);
        new 
iOldButton get_user_oldbutton(id);
        
        if((
iNewButton IN_JUMP) && !(get_entity_flags(id) & FL_ONGROUND) && !(iOldButton IN_JUMP))
        {
            if(
iJumpNum[id] < 1)
            {
                
bDoJump[id] = true;
                
iJumpNum[id]++;
                return 
PLUGIN_CONTINUE;
            }
        }
        
        if((
iNewButton IN_JUMP) && (get_entity_flags(id) & FL_ONGROUND))
        {
            
iJumpNum[id] = 0;
            return 
PLUGIN_CONTINUE;
        }
    }
    return 
PLUGIN_CONTINUE;
}

public 
client_PostThink(id)
{
    if(
is_user_alive(id) && get_user_flags(id) & VIP_LEVEL)
    {
        if(
bDoJump[id] == true)
        {
            new 
Float:fVelocity[3];
            
entity_get_vector(idEV_VEC_velocityfVelocity);
            
fVelocity[2] = random_float(265.0285.0);
            
entity_set_vector(idEV_VEC_velocityfVelocity);
            
bDoJump[id] = false;
            return 
PLUGIN_CONTINUE;
        }
    }
    return 
PLUGIN_CONTINUE;
}

public 
client_putinserver(id
{
    if(
get_user_flags(id) & VIP_LEVEL)
    {
        
bUsedMenu[id] = false;
        
bHasWeapon[id] = false;
        
iJumpNum[id] = 0;
        
bDoJump[id]  =false;
    }
}

public 
client_disconnect(id)
{
    if(
get_user_flags(id) & VIP_LEVEL
    {
        
bUsedMenu[id] = false;
        
bHasWeapon[id] = false;
        
iJumpNum[id] = 0;
        
bDoJump[id]  =false;
    }
}

public 
MsgScoreAttrib(const MsgId, const MsgType, const MsgDest)
{
    static 
id;
    
id get_msg_arg_int(1);
    
    if((
get_user_flags(id) & VIP_LEVEL) && !get_msg_arg_int(2))
    {
        
set_msg_arg_int(2ARG_BYTE, (<< 2));
    }

i'm sorry i forgot to put at the topic
could you make the vipmenu come at the first of rounds and without /vmenu command
also make it does not come at the first round of the map or the 2th round
make it come at the third round of the map
ex if u change the map then u should play 2 rounds until the third round comes and u get the vipmenu
also to add everyround a full armor to the vip player
with 1 grenade
i mean make the vip player get a full armor and a grenade when he spawn
__________________

Last edited by Shitty; 01-06-2021 at 19:51.
Shitty is offline
iceeedr
Veteran Member
Join Date: Apr 2017
Location: Brazil
Old 01-06-2021 , 20:00   Re: edit vmenu plugin
Reply With Quote #4

You forgot everything "just", honestly I don't feel like doing it, if by tomorrow nobody has done it yet I do it.
__________________


Quote:
Originally Posted by fysiks View Post
Please stop trying to help. You appear to just be posting random stuff. Wait until you actually understand more about AMX Mod X and how the game works.
https://iceeedr.com.br/
iceeedr is offline
Send a message via Skype™ to iceeedr
Shitty
Member
Join Date: Sep 2019
Old 01-06-2021 , 20:02   Re: edit vmenu plugin
Reply With Quote #5

Quote:
Originally Posted by iceeedr View Post
You forgot everything "just", honestly I don't feel like doing it, if by tomorrow nobody has done it yet I do it.
drugs
__________________
Shitty is offline
Shitty
Member
Join Date: Sep 2019
Old 01-16-2021 , 01:17   Re: edit vmenu plugin
Reply With Quote #6

pump
__________________
Shitty 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 11:44.


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