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

Add after 3 round to take weapons


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
lantimilan
Senior Member
Join Date: May 2016
Old 03-28-2020 , 02:28   Add after 3 round to take weapons
Reply With Quote #1

Hello i find one plugin in google for free vip all time i have problem because vip start with weapons from first round i want first and second round to take just grenade (he_grenade,2flashbang) in round 3 to show menu with weapons

PHP Code:
#include <amxmodx>
#include <fun>
#include <cstrike>
#include <fakemeta_util>
#include <hamsandwich>
#pragma compress 1

#define PLUGIN "Vipka Sistem"
#define VERSION "1.0"
#define AUTHOR "extream-csi"

#define CVAR_PREFEX "VIP Free"

/** define weapon **/
#define PRIMARY_ONLY 1
#define SECONDARY_ONLY 2

/** pId, ADMIN_, Alive, connected, pev_valid **/ 
#define IsValidPev(%1)  (bool:(pev_valid(%1) == 2))
#define IsFlag(%1,%2)   (bool:(get_user_flags(%1) & %2))
#define IsAlive(%1)     (bool:(is_user_alive(%1)))
#define IsConnected(%1) (bool:(is_user_connected(%1)))

/** szMenu, iLen, szMenuTitle **/
#define MENU_TITLE(%1,%2,%3) (%2 = formatex(%1[%2], charsmax(%1), %3))

/** szMenu[], iLen, szItemName **/
#define MENU_ITEM(%1,%2,%3) (%2 += formatex(%1[%2], charsmax(%1) - %2, %3))

/** pId, bitsKeys, szMenu, szMenuId **/
#define SHOW_MENU(%1,%2,%3,%4) show_menu(%1,%2,%3, -1, %4)

/** pId **/
#define HIDE_MENU(%1) show_menu(%1, HULL, "^n")

/** iMenuKey */
#define KEY(%0) (1 << ((%0 + 9) % 10))
#define KEY_HANDLER(%0) ((%0 + 1) % 10)

/** szMenuId, szMenu_Handler **/
#define RegisterMenu(%1,%2) register_menucmd(register_menuid(%1), 1023, %2)

/** define MenuId **/
#define MenuId_Vip "MENU VIP"

/** Constat **/
const m_iClip 51//32 bit
const XO_WEAPONS 4;

const 
PRIMARY_WEAPONS_BIT_SUM = (<< CSW_SCOUT) | (1<< CSW_XM1014) | (<< CSW_M3) | (1<< CSW_MAC10)|(1<<CSW_AUG)|(1<<CSW_UMP45)|(1<<CSW_SG550)|(1<<CSW_GALIL)|(1<<CSW_FAMAS)|(1<<CSW_AWP)|(1<<CSW_MP5NAVY)|(1<<CSW_M249)|(1<<CSW_M4A1)|(1<<CSW_TMP)|(1<<CSW_G3SG1)|(1<<CSW_SG552)|(1<<CSW_AK47)|(1<<CSW_P90)
const 
SECONDARY_WEAPONS_BIT_SUM = (1<<CSW_P228)|(1<<CSW_DEAGLE)|(1<<CSW_ELITE)|(1<<CSW_FIVESEVEN)|(1<<CSW_USP)|(1<<CSW_GLOCK18)

public 
plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR);
    
    
RegisterMenu(MenuId_Vip"ShowMenu_Vip_Handler");
    
    
RegisterHam(Ham_Spawn"player""player_respawn"true);

    
}
public 
player_respawn(pId)
{
    if(
IsAlive(pId) && cs_get_user_team(pId) == CS_TEAM_T)
    {
        
strip_weapons(pId2);
        new 
iWeaponId give_item(pId"weapon_deagle");
        
set_user_armor(pId100); 
        
Weapon_SetAmmo(iWeaponId7);
        
cs_set_user_bpammo(pIdCSW_DEAGLE35); 
        
fm_give_item(pId"weapon_hegrenade");
        
fm_give_item(pId"weapon_flashbang");
        
cs_set_user_bpammo(pIdCSW_FLASHBANG2);
        
ShowMenu_VippId );
    }
    if(
IsAlive(pId) && cs_get_user_team(pId) == CS_TEAM_CT)
    {
        
strip_weapons(pId2);
        new 
iWeaponId give_item(pId"weapon_deagle");
        
cs_set_user_defuse(pId10160_0);
        
set_user_armor(pId100);
        
Weapon_SetAmmo(iWeaponId7);
        
cs_set_user_bpammo(pIdCSW_DEAGLE35);
        
fm_give_item(pId"weapon_hegrenade");
        
fm_give_item(pId"weapon_flashbang");
        
cs_set_user_bpammo(pIdCSW_FLASHBANG2);
        
ShowMenu_VippId );
    }
}  

ShowMenu_Vip(pId)
{
    new 
szMenu[512], iLenbitsKeys KEY(0)|KEY(1)|KEY(2)|KEY(3)|KEY(4)|KEY(5);
    
    
MENU_TITLE(szMenuiLen"\rR \wG \yB  \yV\w.\rI\y.\wP \r] \wFree Guns^n^n"CVAR_PREFEX);
    
    
MENU_ITEM(szMenuiLen"^n\r[\w%d\r] \wMerr \rAK47 \w+ \rDeagle"1);
    
MENU_ITEM(szMenuiLen"^n\r[\w%d\r] \wMerr \rM4A1 \w+ \rDeagle"2);
    
    
MENU_ITEM(szMenuiLen"^n^n\r[\w%d\r] \rMbylle"0);
    return 
SHOW_MENU(pIdbitsKeysszMenuMenuId_Vip);
}

public 
ShowMenu_Vip_Handler(pIdiKey)
{
    new 
szName[33];
    
get_user_name(pIdszName32);
    switch(
KEY_HANDLER(iKey))
    {
        case 
1:
        {
            
strip_weapons(pId1);
            new 
iWeaponId give_item(pId"weapon_ak47");
            
Weapon_SetAmmo(iWeaponId30);
            
cs_set_user_bpammo(pIdCSW_AK4790); 
            
ColorChat(pId,"!g[!y%s!g] !tJu !y[!tV.!gI.!tP!y] !g%s !tZgjedhet !gAK47 !t+ !gDeagle"CVAR_PREFEXszName);
        }
        case 
2:
        {
            
strip_weapons(pId1);
            new 
iWeaponId give_item(pId"weapon_m4a1");
            
Weapon_SetAmmo(iWeaponId30);
            
cs_set_user_bpammo(pIdCSW_M4A190); 
            
ColorChat(pId"!g[!y%s!g] !tJu !y[!tV.!gI.!tP!y] !g%s !tZgjedhet !gM4A1 !t+ !gDeagle"CVAR_PREFEXszName);
        }
    }
}

bool:Weapon_SetAmmo(iEntiAmmo

    if(!
IsValidPev(iEnt)) 
    return 
false

    
set_pdata_int(iEntm_iClipiAmmoXO_WEAPONS); 

    return 
true
}

stock strip_weapons(pIdstripwhat)
{
    new 
weapons[32], num_weaponsindexweaponid;
    
get_user_weapons(pIdweaponsnum_weapons);
    for(
index index num_weapons ;index++)
    {
        
weaponid weapons[index];
        if((
stripwhat == PRIMARY_ONLY && ((1<<weaponid) & PRIMARY_WEAPONS_BIT_SUM)) ||(stripwhat == SECONDARY_ONLY && ((1<<weaponid) & SECONDARY_WEAPONS_BIT_SUM)))
        {
            new 
wname[32];
            
get_weaponname(weaponid,wname,charsmax(wname));
            
engclient_cmd(pId"drop"wname);
        }
    }
}

stock ColorChat(const pId, const input[], any:...)
{
    new 
count 1players[32], msg[191]; vformat(msg190input3)
    
replace_all(msg190"!g""^4")
    
replace_all(msg190"!y""^1")
    
replace_all(msg190"!t""^3")
    if(
pId)players[0] = pId; else get_players(playerscount"ch")
    {
        for(new 
0counti++)
        {
            if(
IsConnected(players[i]))
            {
                
message_begin(MSG_ONE_UNRELIABLEget_user_msgid("SayText"), _players[i])
                
write_byte(players[i])
                
write_string(msg)
                
message_end()
            }
        }
    }

lantimilan is offline
Send a message via MSN to lantimilan
Carrion
Member
Join Date: Mar 2020
Old 03-29-2020 , 12:26   Re: Add after 3 round to take weapons
Reply With Quote #2

i did not tested it

sma
Carrion 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 09:07.


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