Raised This Month: $32 Target: $400
 8% 

[Request For Plugin] CS 1.6 BASEBUILDER


Post New Thread Reply   
 
Thread Tools Display Modes
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 06-04-2021 , 12:47   Re: [Request For Plugin] CS 1.6 BASEBUILDER
Reply With Quote #61

Quote:
Originally Posted by Smex View Post
I fixed the part not shutting down my server, but it only gives normal ak and m4 when i open special weapons menu and buy goldenak and goldenm4.
You made me tired, download this one, that issuse was in post #37 and i said i fixed it in post #48

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

//#pragma semicolon 1
//#pragma reqlib "AkGold"
//#pragma reqlib "M4Gold"

//native give_userAk_gold(id);
//native give_userM4_gold(id);

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"

#define VIP_FLAG ADMIN_LEVEL_H
#define USED_TIME 5

new VipUsed[33] = 0;
#define IsPlayer(%1) ( 1 <= %1 <= g_iMaxPlayers )

new const g_szBulletWeapons[][] = { """weapon_ak47""weapon_m4a1" }

new 
M4_V_MODEL[64] = "models/v_gold_m4.mdl";
new 
M4_P_MODEL[64] = "models/p_gold_m4.mdl";
new 
AK_V_MODEL[64] = "models/v_gold_ak47.mdl";
new 
AK_P_MODEL[64] = "models/p_gold_ak47.mdl";

new 
bool:g_bHasAk47[33];
new 
bool:g_bHasM4a1[33];
new 
g_iMaxPlayers;
new 
m_spriteTexture;

new     
g_pCvarDmgAK,        g_pCvarDmgM4,
    
g_pCvarNoClipAK,     g_pCvarNoClipM4;
    
public 
plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR);
    
register_clcmd("say /vs""Vmmenu");
    
register_clcmd("say /vshop""Vmmenu");
    
register_clcmd("say /vipshop""Vmmenu");  
    
register_event("HLTV""event_new_round""a""1=0""2=0");
    
    
// M4A1 
    
g_pCvarDmgM4 register_cvar("dmg_m4""2");
    
g_pCvarNoClipM4 register_cvar("noclip_m4""1");
    
    
// AK47
    
g_pCvarDmgAK register_cvar("dmg_ak""2");
    
g_pCvarNoClipAK register_cvar("noclip_ak""1");
    
    
RegisterHam(Ham_Spawn"player""Player_Spawn_Post"1);
    
RegisterHam(Ham_TakeDamage"player""ham_TakeDamage_Pre");
    
register_event("WeapPickup","CheckModel","b","1=19");
    
register_event("CurWeapon""CurWeapon""be""1=1");
    for (new 
1sizeof(g_szBulletWeapons); i++)
        if (
g_szBulletWeapons[i][0]) RegisterHam(Ham_Weapon_PrimaryAttackg_szBulletWeapons[i], "ePrimaryAttack"1)
    
    
g_iMaxPlayers get_maxplayers();
}

public 
event_new_round()
{
    new 
players[32], numidp;
    
get_players(playersnum);
    for(new 
i=0i<numi++)
    {
        
idp players[i];
        
VipUsed[idp] = 0;
    }
}

public 
plugin_precache()
{
    
precache_model(AK_V_MODEL);
    
precache_model(AK_P_MODEL);
    
precache_model(M4_V_MODEL);
    
precache_model(M4_P_MODEL);
    
m_spriteTexture precache_model("sprites/dot.spr");
}


public 
CheckModel(id)
{
    new 
szWeapID read_data(2);
    
    if ( 
szWeapID == CSW_AK47 && g_bHasAk47[id] == true )
    {
        
set_pev(idpev_viewmodel2AK_V_MODEL);
        
set_pev(idpev_weaponmodel2AK_P_MODEL);
    }
    
    if ( 
szWeapID == CSW_M4A1 && g_bHasM4a1[id] == true )
    {
        
set_pev(idpev_viewmodel2M4_V_MODEL);
        
set_pev(idpev_weaponmodel2M4_P_MODEL);
    }
    return 
PLUGIN_HANDLED;
}

public 
CurWeapon(iPlayer)
{
    new 
iWeapon read_data(2);
    
CheckModel(iPlayer);
    
    if( 
iWeapon == CSW_AK47 && g_bHasAk47[iPlayer] == true && get_pcvar_num(g_pCvarNoClipAK) == 1)
    {
        
set_pdata_int(get_pdata_cbase(iPlayer373), 51304);
    }
        
    if( 
iWeapon == CSW_M4A1 && g_bHasM4a1[iPlayer] == true && get_pcvar_num(g_pCvarNoClipM4) == 1)
    {
        
set_pdata_int(get_pdata_cbase(iPlayer373), 51304);
    }
}

public 
client_putinserverid )

    
g_bHasAk47[id] = false;
    
g_bHasM4a1[id] = false;
}
 
public 
Player_Spawn_Postid )
{
    if(
is_user_alive(id))
    {
        
g_bHasAk47[id] = false;
        
g_bHasM4a1[id] = false;
    }
}
 
public 
client_disconnect(id)
{
    
g_bHasM4a1[id] = false;
    
g_bHasAk47[id] = false;
}


public 
ham_TakeDamage_Pre(victiminflictorattackerFloat:damagedamage_bits)
{
    if( !
IsPlayerattacker ) || !is_user_aliveattacker ) || inflictor != attacker )
    {
        return;
    }

    if ( 
g_bHasM4a1[attacker] && get_user_weapon(attacker) == CSW_M4A1)
    {
        
SetHamParamFloat4damage get_pcvar_float(g_pCvarDmgAK));
    }
    
    if ( 
g_bHasAk47[attacker] && get_user_weapon(attacker) == CSW_AK47)
    {
        
SetHamParamFloat4damage get_pcvar_float(g_pCvarDmgM4));
    }
}

public 
ePrimaryAttack(iWeapon)
{
    new 
id pev(iWeaponpev_owner)
        
    if(!
g_bHasAk47[id] && !g_bHasM4a1[id])
        return
            
    new 
iClipiAmmo
    
new iWeapon get_user_weapon(idiClipiAmmo)
        
    if(!
iClip || iWeapon != CSW_AK47 && iWeapon != CSW_M4A1)
        return
        
    new 
iVec1[3], iVec2[3]
    
get_user_origin(idiVec11)
    
get_user_origin(idiVec23)
    
message_begin(MSG_BROADCAST,SVC_TEMPENTITY)
    
write_byte(TE_BEAMPOINTS)
    
write_coord(iVec1[0])
    
write_coord(iVec1[1])
    
write_coord(iVec1[2])
    
write_coord(iVec2[0])
    
write_coord(iVec2[1])
    
write_coord(iVec2[2])
    
write_short(m_spriteTexture)
    
write_byte(1)
    
write_byte(5)
    
write_byte(2)
    
write_byte(10)
    
write_byte(0)
    
write_byte(255)
    
write_byte(215)
    
write_byte(0)
    
write_byte(200)
    
write_byte(150)
    
message_end()
}

stock give_golden_ak(id)
{
    
give_item(id"weapon_ak47");
    
cs_set_user_bpammo(idCSW_AK47254);
    
g_bHasAk47[id] = true;
}

stock give_golden_m4(id)
{
    
give_item(id"weapon_m4a1");
    
cs_set_user_bpammo(idCSW_M4A1254);
    
g_bHasM4a1[id] = true;
}



public 
Vmmenu(id)
{
    if(!(
get_user_flags(id) & VIP_FLAG))
    {
        
client_print(idprint_chat"Access Denied");
        return 
PLUGIN_HANDLED;
    }
    if(!
is_user_alive(id))
    {
        
client_print(idprint_chat"You must be alive");
        return 
PLUGIN_HANDLED;
    }
    if(
VipUsed[id] == USED_TIME)
    {
        
client_print(idprint_chat"You can not use more");
        return 
PLUGIN_HANDLED;
    }
    new 
szText[555 char];
    
formatex(szTextcharsmax(szText), "\rBagljas \w|\y VIPSHOP");
    new 
menu menu_create(szText"Vmmenu_handler");
    
    
formatex(szTextcharsmax(szText), "Guns");
    
menu_additem(menuszText"1"0);
    
    
formatex(szTextcharsmax(szText), "Health");
    
menu_additem(menuszText"2"0);
    
    
formatex(szTextcharsmax(szText), "Special Weapons");
    
menu_additem(menuszText"3"0);    
    
    
formatex(szTextcharsmax(szText), "Exit");
    
menu_additem(menuszText"4"0);    
    
    
menu_setprop(menuMPROP_EXITMEXIT_NEVER);
    
menu_display(idmenu0);
    return 
PLUGIN_HANDLED;    
}

public 
Vmmenu_handleridmenuitem )
{
    new 
data[6], iName[64], accesscallback;
    
menu_item_getinfo(menuitemaccessdatacharsmax(data), iNamecharsmax(iName), callback);
    new 
key str_to_numdata );
    
    switch(
key)
    {
        case 
1:
        {
            
Guns(id);
        }
        case 
2:
        {
            
Health(id);
        }
        case 
3:
        {
            
Specialweap(id);
        }        
        case 
4:
        {
            
menu_destroy(menu);
            return 
PLUGIN_HANDLED;
        }
        
    }
    
menu_destroy(menu);
    return 
PLUGIN_HANDLED;
}

public 
Guns(id)
{
    new 
szText[555 char];
    
formatex(szTextcharsmax(szText), "\rBagljas \w|\y VIPSHOP");
    new 
menu menu_create(szText"Guns_handler");
    new 
money cs_get_user_money(id);
    
    
formatex(szTextcharsmax(szText), "%s"money >= 8000 "\wG3SG1 \y[\r8000$\y]" "\dG3SG1");
    
menu_additem(menuszText"1"0);
    
    
formatex(szTextcharsmax(szText), "%s"money >= 4500 "\wM249 \y[\r4500$\y]" "\dM249");
    
menu_additem(menuszText"2"0);
    
    
formatex(szTextcharsmax(szText), "%s"money >= 3000 "\wM4A1 \y[\r3000$\y]" "\dM4A1");
    
menu_additem(menuszText"3"0);
    
    
formatex(szTextcharsmax(szText), "%s"money >= 4000 "\wAk47 \y[\r4000$\y]" "\dAk47");
    
menu_additem(menuszText"4"0);        
    
    
menu_setprop(menuMPROP_EXITMEXIT_ALL);
    
menu_display(idmenu0);
    return 
PLUGIN_HANDLED;
}

public 
Guns_handler(idmenuitem)
{
    if(
item == MENU_EXIT)
    {
        
menu_destroy(menu);
        return 
PLUGIN_HANDLED;
    }
    new 
data[6], iName[64], accesscallback;
    
menu_item_getinfo(menuitemaccessdatacharsmax(data), iNamecharsmax(iName), callback);
    new 
key str_to_num(data);
    new 
money cs_get_user_money(id);
    
    switch(
key)
    {
        case 
1:
        {
            if(
money 8000)
            {
                
client_print(idprint_chat"You do not have enough money");
                
Guns(id);
                return 
PLUGIN_HANDLED;
            }
            else
            {
                
give_item(id"weapon_g3sg1"); 
                
cs_set_user_bpammo(idCSW_G3SG1200); 
                
cs_set_user_money(idmoney 8000);
                
VipUsed[id]++;
                
client_print(idprint_chat"You received G3SG1");
            }
        }
        case 
2:
        {
            if(
money 4500)
            {
                
client_print(idprint_chat"You do not have enough money");
                
Guns(id);
                return 
PLUGIN_HANDLED;
            }
            else
            {
                
give_item(id"weapon_m249");  
                
cs_set_user_bpammo(idCSW_M249200); 
                
cs_set_user_money(idmoney 4500);                
                
VipUsed[id]++;
                
client_print(idprint_chat"You received M249");
            }
        }
        case 
3:
        {
            if(
money 3000)
            {
                
client_print(idprint_chat"You do not have enough money");
                
Guns(id);
                return 
PLUGIN_HANDLED;
            }
            else
            {
                
give_item(id"weapon_m4a1"); 
                
cs_set_user_bpammo(idCSW_M4A190); 
                
cs_set_user_money(idmoney 8000);
                
VipUsed[id]++;
                
client_print(idprint_chat"You received m4a1");
            }
        }
        case 
4:
        {
            if(
money 4000)
            {
                
client_print(idprint_chat"You do not have enough money");
                
Guns(id);
                return 
PLUGIN_HANDLED;
            }
            else
            {
                
give_item(id"weapon_ak47");  
                
cs_set_user_bpammo(idCSW_AK4790); 
                
cs_set_user_money(idmoney 4500);                
                
VipUsed[id]++;
                
client_print(idprint_chat"You received ak47");
            }
        }                    
    }
    
menu_destroy(menu);
    return 
PLUGIN_HANDLED;
}

public 
Specialweap(id)
{
    new 
szText[555 char];
    
formatex(szTextcharsmax(szText), "\rBagljas \w|\y VIPSHOP");
    new 
menu menu_create(szText"Special_handler");
    new 
money cs_get_user_money(id);
    
    
formatex(szTextcharsmax(szText), "%s"money >= 9000 "\wGoldenAK \y[\r9000$\y]" "\dGoldenAK");
    
menu_additem(menuszText"1"0);
    
    
formatex(szTextcharsmax(szText), "%s"money >= 9000 "\wGoldenM4 \y[\r9000$\y]" "\dGoldenAK");
    
menu_additem(menuszText"2"0);        
    
    
menu_setprop(menuMPROP_EXITMEXIT_ALL);
    
menu_display(idmenu0);
    return 
PLUGIN_HANDLED;
}

public 
Special_handler(idmenuitem)
{
    if(
item == MENU_EXIT)
    {
        
menu_destroy(menu);
        return 
PLUGIN_HANDLED;
    }
    new 
data[6], iName[64], accesscallback;
    
menu_item_getinfo(menuitemaccessdatacharsmax(data), iNamecharsmax(iName), callback);
    new 
key str_to_num(data);
    new 
money cs_get_user_money(id);
    new 
name[32];
    
get_user_name(idname31);
    
    switch(
key)
    {
        case 
1:
        {
            if(
money 9000)
            {
                
client_print(idprint_chat"You do not have enough money");
                
Specialweap(id);
                return 
PLUGIN_HANDLED;
            }
            else
            {
                
give_golden_ak(id);
                
cs_set_user_money(idmoney 9000);        
                
VipUsed[id]++;
                
client_print(idprint_chat"You received AkGold");
            }
        }
        case 
2:
        {
            if(
money 9000)
            {
                
client_print(idprint_chat"You do not have enough money");
                
Specialweap(id);
                return 
PLUGIN_HANDLED;
            }
            else
            {
                
give_golden_m4(id);
                
cs_set_user_money(idmoney 9000);        
                
VipUsed[id]++;
                
client_print(idprint_chat"You received M4Gold");
            }
        }                    
    }
    
menu_destroy(menu);
    return 
PLUGIN_HANDLED;
}

public 
Health(id)
{
    new 
szText[555 char];
    
formatex(szTextcharsmax(szText), "\rBagljas \w|\y VIPSHOP");
    new 
menu menu_create(szText"Health_handler");
    new 
money cs_get_user_money(id);
    
    
formatex(szTextcharsmax(szText), "%s"money >= 1000 "\w100 \y[\r1000$\y]" "\d100");
    
menu_additem(menuszText"1"0);
    
    
formatex(szTextcharsmax(szText), "%s"money >= 3000 "\w150 \y[\r3000$\y]" "\d150");
    
menu_additem(menuszText"2"0);
    
    
formatex(szTextcharsmax(szText), "%s"money >= 4000 "\w200 \y[\r4000$\y]" "\d200");
    
menu_additem(menuszText"3"0);
    
    
formatex(szTextcharsmax(szText), "Exit");
    
menu_additem(menuszText"4"0);    
    
    
menu_setprop(menuMPROP_EXITMEXIT_NEVER);
    
menu_display(idmenu0);
    return 
PLUGIN_HANDLED;
}

public 
Health_handler(idmenuitem)
{
    new 
data[6], iName[64], accesscallback;
    
menu_item_getinfo(menuitemaccessdatacharsmax(data), iNamecharsmax(iName), callback);
    new 
key str_to_num(data);
    new 
money cs_get_user_money(id);
    
    switch(
key)
    {
        case 
1:
        {
            if(
money 1000)
            {
                
client_print(idprint_chat"You do not have enough money");
                
Health(id);
                return 
PLUGIN_HANDLED;
            }
            else
            {
                
set_user_health(idget_user_health(id) + 100);
                
cs_set_user_money(idmoney 1000);        
                
VipUsed[id]++;
                
client_print(idprint_chat"You received 100HP");
            }
        }
        case 
2:
        {
            if(
money 3000)
            {
                
client_print(idprint_chat"You do not have enough money");        
                
Health(id);
                return 
PLUGIN_HANDLED;
            }
            else
            {
                
set_user_health(idget_user_health(id) + 150);  
                
cs_set_user_money(idmoney 3000);        
                
VipUsed[id]++;
                
client_print(idprint_chat"You received 150HP");
            }
        }
        case 
3:
        {
            if(
money 4000)
            {
                
client_print(idprint_chat"You do not have enough money");        
                
Health(id);
                return 
PLUGIN_HANDLED;
            }
            else
            {
                
set_user_health(idget_user_health(id) + 200);
                
cs_set_user_money(idmoney 4000);        
                
VipUsed[id]++;
                
client_print(idprint_chat"You received 200HP");
            }
        }
        case 
4:
        {
            
menu_destroy(menu);
            return 
PLUGIN_HANDLED;
        }        
    }
    
menu_destroy(menu);
    return 
PLUGIN_HANDLED;

__________________
Youtube.com/Supremache

Bank System [Nvault - SQL Support]
VIP System
  • If you think it's that simple, then do it yourself.
Supremache is offline
Smex
Member
Join Date: May 2021
Old 06-04-2021 , 13:00   Re: [Request For Plugin] CS 1.6 BASEBUILDER
Reply With Quote #62

Let's do something, is it possible to remove special weapons and the golden weapons? and keep the health and guns menu only?
Smex is offline
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 06-04-2021 , 13:08   Re: [Request For Plugin] CS 1.6 BASEBUILDER
Reply With Quote #63

Quote:
Originally Posted by Smex View Post
Let's do something, is it possible to remove special weapons and the golden weapons? and keep the health and guns menu only?
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>
#pragma semicolon 1
//#pragma reqlib "AkGold"
//#pragma reqlib "M4Gold"

//native give_userAk_gold(id);
//native give_userM4_gold(id);

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"

#define VIP_FLAG ADMIN_LEVEL_H
#define USED_TIME 5

new VipUsed[33] = 0;

public 
plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR);
    
register_clcmd("say /vs""Vmmenu");
    
register_clcmd("say /vshop""Vmmenu");
    
register_clcmd("say /vipshop""Vmmenu");  
    
register_event("HLTV""event_new_round""a""1=0""2=0");
}

public 
event_new_round()
{
    new 
players[32], numidp;
    
get_players(playersnum);
    for(new 
i=0i<numi++)
    {
        
idp players[i];
        
VipUsed[idp] = 0;
    }
}

public 
Vmmenu(id)
{
    if(!(
get_user_flags(id) & VIP_FLAG))
    {
        
client_print(idprint_chat"Access Denied");
        return 
PLUGIN_HANDLED;
    }
    if(!
is_user_alive(id))
    {
        
client_print(idprint_chat"You must be alive");
        return 
PLUGIN_HANDLED;
    }
    if(
VipUsed[id] == USED_TIME)
    {
        
client_print(idprint_chat"You can not use more");
        return 
PLUGIN_HANDLED;
    }
    new 
szText[555 char];
    
formatex(szTextcharsmax(szText), "\rBagljas \w|\y VIPSHOP");
    new 
menu menu_create(szText"Vmmenu_handler");
    
    
formatex(szTextcharsmax(szText), "Guns");
    
menu_additem(menuszText"1"0);
    
    
formatex(szTextcharsmax(szText), "Health");
    
menu_additem(menuszText"2"0);
    
   
// formatex(szText, charsmax(szText), "Special Weapons");
   // menu_additem(menu, szText, "3", 0);    
    
    
formatex(szTextcharsmax(szText), "Exit");
    
menu_additem(menuszText"3"0);    
    
    
menu_setprop(menuMPROP_EXITMEXIT_NEVER);
    
menu_display(idmenu0);
    return 
PLUGIN_HANDLED;    
}

public 
Vmmenu_handleridmenuitem )
{
    new 
data[6], iName[64], accesscallback;
    
menu_item_getinfo(menuitemaccessdatacharsmax(data), iNamecharsmax(iName), callback);
    new 
key str_to_numdata );
    
    switch(
key)
    {
        case 
1:
        {
            
Guns(id);
        }
        case 
2:
        {
            
Health(id);
        }
        
/*case 3:
        {
            Specialweap(id);
        }    */    
        
case 3:
        {
            
menu_destroy(menu);
            return 
PLUGIN_HANDLED;
        }
        
    }
    
menu_destroy(menu);
    return 
PLUGIN_HANDLED;
}

public 
Guns(id)
{
    new 
szText[555 char];
    
formatex(szTextcharsmax(szText), "\rBagljas \w|\y VIPSHOP");
    new 
menu menu_create(szText"Guns_handler");
    new 
money cs_get_user_money(id);
    
    
formatex(szTextcharsmax(szText), "%s"money >= 8000 "\wG3SG1 \y[\r8000$\y]" "\dG3SG1");
    
menu_additem(menuszText"1"0);
    
    
formatex(szTextcharsmax(szText), "%s"money >= 4500 "\wM249 \y[\r4500$\y]" "\dM249");
    
menu_additem(menuszText"2"0);
    
    
formatex(szTextcharsmax(szText), "%s"money >= 3000 "\wM4A1 \y[\r3000$\y]" "\dM4A1");
    
menu_additem(menuszText"3"0);
    
    
formatex(szTextcharsmax(szText), "%s"money >= 4000 "\wAk47 \y[\r4000$\y]" "\dAk47");
    
menu_additem(menuszText"4"0);        
    
    
menu_setprop(menuMPROP_EXITMEXIT_ALL);
    
menu_display(idmenu0);
    return 
PLUGIN_HANDLED;
}

public 
Guns_handler(idmenuitem)
{
    if(
item == MENU_EXIT)
    {
        
menu_destroy(menu);
        return 
PLUGIN_HANDLED;
    }
    new 
data[6], iName[64], accesscallback;
    
menu_item_getinfo(menuitemaccessdatacharsmax(data), iNamecharsmax(iName), callback);
    new 
key str_to_num(data);
    new 
money cs_get_user_money(id);
    
    switch(
key)
    {
        case 
1:
        {
            if(
money 8000)
            {
                
client_print(idprint_chat"You do not have enough money");
                
Guns(id);
                return 
PLUGIN_HANDLED;
            }
            else
            {
                
give_item(id"weapon_g3sg1"); 
                
cs_set_user_bpammo(idCSW_G3SG1200); 
                
cs_set_user_money(idmoney 8000);
                
VipUsed[id]++;
                
client_print(idprint_chat"You received G3SG1");
            }
        }
        case 
2:
        {
            if(
money 4500)
            {
                
client_print(idprint_chat"You do not have enough money");
                
Guns(id);
                return 
PLUGIN_HANDLED;
            }
            else
            {
                
give_item(id"weapon_m249");  
                
cs_set_user_bpammo(idCSW_M249200); 
                
cs_set_user_money(idmoney 4500);                
                
VipUsed[id]++;
                
client_print(idprint_chat"You received M249");
            }
        }
        case 
3:
        {
            if(
money 3000)
            {
                
client_print(idprint_chat"You do not have enough money");
                
Guns(id);
                return 
PLUGIN_HANDLED;
            }
            else
            {
                
give_item(id"weapon_m4a1"); 
                
cs_set_user_bpammo(idCSW_M4A190); 
                
cs_set_user_money(idmoney 8000);
                
VipUsed[id]++;
                
client_print(idprint_chat"You received m4a1");
            }
        }
        case 
4:
        {
            if(
money 4000)
            {
                
client_print(idprint_chat"You do not have enough money");
                
Guns(id);
                return 
PLUGIN_HANDLED;
            }
            else
            {
                
give_item(id"weapon_ak47");  
                
cs_set_user_bpammo(idCSW_AK4790); 
                
cs_set_user_money(idmoney 4500);                
                
VipUsed[id]++;
                
client_print(idprint_chat"You received ak47");
            }
        }                    
    }
    
menu_destroy(menu);
    return 
PLUGIN_HANDLED;
}
/*
public Specialweap(id)
{
    new szText[555 char];
    formatex(szText, charsmax(szText), "\rBagljas \w|\y VIPSHOP");
    new menu = menu_create(szText, "Special_handler");
    new money = cs_get_user_money(id);
    
    formatex(szText, charsmax(szText), "%s", money >= 9000 ? "\wGoldenAK \y[\r9000$\y]" : "\dGoldenAK");
    menu_additem(menu, szText, "1", 0);
    
    formatex(szText, charsmax(szText), "%s", money >= 9000 ? "\wGoldenM4 \y[\r49000$\y]" : "\dGoldenAK");
    menu_additem(menu, szText, "2", 0);        
    
    menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
    menu_display(id, menu, 0);
    return PLUGIN_HANDLED;
}

public Special_handler(id, menu, item)
{
    if(item == MENU_EXIT)
    {
        menu_destroy(menu);
        return PLUGIN_HANDLED;
    }
    new data[6], iName[64], access, callback;
    menu_item_getinfo(menu, item, access, data, charsmax(data), iName, charsmax(iName), callback);
    new key = str_to_num(data);
    new money = cs_get_user_money(id);
    new name[32];
    get_user_name(id, name, 31);
    
    switch(key)
    {
        case 1:
        {
            if(money < 9000)
            {
                client_print(id, print_chat, "You do not have enough money");
                Specialweap(id);
                return PLUGIN_HANDLED;
            }
            else
            {
                client_cmd(id, "say /akgoldvipmenu");
                cs_set_user_money(id, money - 9000);        
                VipUsed[id]++;
                client_print(id, print_chat, "You received AkGold");
            }
        }
        case 2:
        {
            if(money < 9000)
            {
                client_print(id, print_chat, "You do not have enough money");
                Specialweap(id);
                return PLUGIN_HANDLED;
            }
            else
            {
                client_cmd(id, "say /m4goldenvipmenu");
                cs_set_user_money(id, money - 9000);        
                VipUsed[id]++;
                client_print(id, print_chat, "You received M4Gold");
            }
        }                    
    }
    menu_destroy(menu);
    return PLUGIN_HANDLED;
}
*/
public Health(id)
{
    new 
szText[555 char];
    
formatex(szTextcharsmax(szText), "\rBagljas \w|\y VIPSHOP");
    new 
menu menu_create(szText"Health_handler");
    new 
money cs_get_user_money(id);
    
    
formatex(szTextcharsmax(szText), "%s"money >= 1000 "\w100 \y[\r1000$\y]" "\d100");
    
menu_additem(menuszText"1"0);
    
    
formatex(szTextcharsmax(szText), "%s"money >= 3000 "\w150 \y[\r3000$\y]" "\d150");
    
menu_additem(menuszText"2"0);
    
    
formatex(szTextcharsmax(szText), "%s"money >= 4000 "\w200 \y[\r4000$\y]" "\d200");
    
menu_additem(menuszText"3"0);
    
    
formatex(szTextcharsmax(szText), "Exit");
    
menu_additem(menuszText"4"0);    
    
    
menu_setprop(menuMPROP_EXITMEXIT_NEVER);
    
menu_display(idmenu0);
    return 
PLUGIN_HANDLED;
}

public 
Health_handler(idmenuitem)
{
    new 
data[6], iName[64], accesscallback;
    
menu_item_getinfo(menuitemaccessdatacharsmax(data), iNamecharsmax(iName), callback);
    new 
key str_to_num(data);
    new 
money cs_get_user_money(id);
    
    switch(
key)
    {
        case 
1:
        {
            if(
money 1000)
            {
                
client_print(idprint_chat"You do not have enough money");
                
Health(id);
                return 
PLUGIN_HANDLED;
            }
            else
            {
                
set_user_health(idget_user_health(id) + 100);
                
cs_set_user_money(idmoney 1000);        
                
VipUsed[id]++;
                
client_print(idprint_chat"You received 100HP");
            }
        }
        case 
2:
        {
            if(
money 3000)
            {
                
client_print(idprint_chat"You do not have enough money");        
                
Health(id);
                return 
PLUGIN_HANDLED;
            }
            else
            {
                
set_user_health(idget_user_health(id) + 150);  
                
cs_set_user_money(idmoney 3000);        
                
VipUsed[id]++;
                
client_print(idprint_chat"You received 150HP");
            }
        }
        case 
3:
        {
            if(
money 4000)
            {
                
client_print(idprint_chat"You do not have enough money");        
                
Health(id);
                return 
PLUGIN_HANDLED;
            }
            else
            {
                
set_user_health(idget_user_health(id) + 200);
                
cs_set_user_money(idmoney 4000);        
                
VipUsed[id]++;
                
client_print(idprint_chat"You received 200HP");
            }
        }
        case 
4:
        {
            
menu_destroy(menu);
            return 
PLUGIN_HANDLED;
        }        
    }
    
menu_destroy(menu);
    return 
PLUGIN_HANDLED;

__________________
Youtube.com/Supremache

Bank System [Nvault - SQL Support]
VIP System
  • If you think it's that simple, then do it yourself.
Supremache is offline
Smex
Member
Join Date: May 2021
Old 06-04-2021 , 13:34   Re: [Request For Plugin] CS 1.6 BASEBUILDER
Reply With Quote #64

Thank you alot!
Smex is offline
Smex
Member
Join Date: May 2021
Old 06-04-2021 , 18:16   Re: [Request For Plugin] CS 1.6 BASEBUILDER
Reply With Quote #65

I cannot seem to compile this, it has 27 errors.
Smex is offline
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 06-04-2021 , 18:27   Re: [Request For Plugin] CS 1.6 BASEBUILDER
Reply With Quote #66

Quote:
Originally Posted by Smex View Post
I cannot seem to compile this, it has 27 errors.
Last reply in this topic, plugin working fine and i tested it much times and doesn't have any errors

Quote:
Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c) 1997-2013 ITB CompuPhase, AMX Mod X Team

Header size: 764 bytes
Code size: 7912 bytes
Data size: 3800 bytes
Stack/heap size: 16384 bytes; estimated max. usage=781 cells (3124 bytes)
Total requirements: 28860 bytes
Done.
__________________
Youtube.com/Supremache

Bank System [Nvault - SQL Support]
VIP System
  • If you think it's that simple, then do it yourself.
Supremache is offline
Smex
Member
Join Date: May 2021
Old 06-04-2021 , 18:30   Re: [Request For Plugin] CS 1.6 BASEBUILDER
Reply With Quote #67

It tells me it has 27 errors, i cannot compile it.
Smex is offline
Smex
Member
Join Date: May 2021
Old 06-04-2021 , 18:36   Re: [Request For Plugin] CS 1.6 BASEBUILDER
Reply With Quote #68

I fixed it.
Smex 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 00:55.


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