AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Shop Edit (https://forums.alliedmods.net/showthread.php?t=223384)

PepsiSexy 08-12-2013 23:31

Shop Edit
 
1 Attachment(s)
Hello can someone edit this Shop for me a little bit?
First off you can change the Costs of each Item easily but the Price doenst show in game. So in game its just for example 25 Health, I want that the Price i put in the Plugin is also there.

What i also want is that it shows Chat Messages for every Item if you buy it.

Some Bugs i know:
If you have an AWP and buy Bullets for it it works great, but if you buy bullets again it says "You dont have an AWP" or something..

Another bug is on Power Menu if you buy for example Boots of Speed and Stealth the the Hud Messages of the time for each bugs. If you buy 1 it shows you timer for it, but if you buy both it shows both timers at same spot and the hud always changes.

Another Bug is if you buy No Fall Damage it doenst go away if you die. So if you buy it once you have it the whole map, i want that it only holds for 1 round or when you die.

Thats alot of changes but please can someone do it for me?

Thanks


PHP Code:

#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <hamsandwich>
#include <fakemeta>
#include <engine>
#include <fun>

new const PLUGIN[ ] = "HideNSeek Shop";
new const 
VERSION[ ] = "1.0";
new const 
CLAN_TAG[ ] = "[HNSShop]"// Your clan tag goes here

#define BOOTS_TIME 13.0
#define STEALTH_TIME 12.0
#define CAMO_TIME 12.0

#define BOOTS_COUNTDOWN 13
#define STEALTH_COUNTDOWN 12
#define CAMO_COUNTDOWN 12

native add_user_immuneid );
native remove_user_immuneid );

native hnsxp_get_user_xpid );
native hnsxp_set_user_xpidxp );

stock hnsxp_add_user_xpidxp )
{
    return 
hnsxp_set_user_xpidhnsxp_get_user_xpid ) + xp );
}

enum _:ItemStruct
{
    
Name[32],
    
Cost
};

new const 
g_HealthInfo[6][ItemStruct] =
{
    { 
"25 Health"5000 },
    { 
"50 Health"},
    { 
"75 Health"},
    { 
"100 Health"},
    { 
"125 Health"},
    { 
"150 Health"}
};

new const 
g_ArmorInfo[6][ItemStruct] =
{
    { 
"25 Armor"},
    { 
"50 Armor"},
    { 
"75 Armor"},
    { 
"100 Armor"},
    { 
"125 Armor"},
    { 
"150 Armor"}
};

new const 
g_XPInfo[6][ItemStruct] =
{
    { 
"25 XP"},
    { 
"50 XP"},
    { 
"75 XP"},
    { 
"100 XP"},
    { 
"125 XP"},
    { 
"150 XP"}
};

new const 
g_WeaponInfo[5][ItemStruct] =
{
    { 
"Awp"},
    { 
"Deagle"},
    { 
"HE Grenade"},
    { 
"Frost Nade"},
    { 
"Flashbang"}
};

new const 
g_AmmoInfo[4][ItemStruct] =
{
    { 
"1 Awp Bullet"},
    { 
"2 Awp Bullets"},
    { 
"1 Deagle Bullet"},
    { 
"2 Deagle Bullets"}
};

new const 
g_PowerInfo[6][ItemStruct] =
{
    { 
"Anti-Flash"},
    { 
"Anti-Frost"},
    { 
"No Fall Damage"},
    { 
"Boots of Speed"},
    { 
"Stealth"},
    { 
"Camouflage"}
};

new 
pCvar_enable;

new 
bool:g_bRespawnUsed[33];
new 
bool:g_bHasNoFrost[33], bool:g_bHasNoFall[33], bool:g_bHasNoFlash[33], bool:g_bHasBoots[33], bool:g_bHasStealth[33];
new 
bool:g_bHasCamo[33];
new 
bool:g_bHasAwp[33], bool:g_bHasDeagle[33];
new 
bool:g_bHas1Awp[33], bool:g_bHas2Awp[33], bool:g_bHas1Deagle[33], bool:g_bHas2Deagle[33];
new 
bool:g_bHasFlash[33], bool:g_bHasFrost[33], bool:g_bHasGrenade[33];
new 
bool:g_bHas25HP[33], bool:g_bHas50HP[33], bool:g_bHas75HP[33], bool:g_bHas100HP[33], bool:g_bHas125HP[33], bool:g_bHas150HP[33];
new 
bool:g_bHas25AM[33], bool:g_bHas50AM[33], bool:g_bHas75AM[33], bool:g_bHas100AM[33], bool:g_bHas125AM[33], bool:g_bHas150AM[33];
new 
bool:g_bHas25XP[33], bool:g_bHas50XP[33], bool:g_bHas75XP[33], bool:g_bHas100XP[33], bool:g_bHas125XP[33], bool:g_bHas150XP[33];

new 
g_iBootTimeg_iCamoTimeg_iStealthTime;

new 
bool:g_track_enemy;
new 
bool:g_track[33];
new 
Float:g_gametimeg_owner;
new 
Float:g_gametime2;
new 
grenade[32], last;
new 
g_sync_check_data;

new 
g_msgScreenFade;
new 
g_HudSyncInfo;

public 
plugin_init( )
{
    
register_pluginPLUGINVERSION"Kreation" );
    
register_cvar"shop_version"VERSIONFCVAR_SERVER FCVAR_SPONLY );
    
    
pCvar_enable register_cvar"shop_enable""1"FCVAR_SERVER );
    
    
register_clcmd"say /shop""CmdMainMenu" );
    
register_clcmd"say shop""CmdMainMenu" );
    
register_clcmd"say_team /shop""CmdMainMenu" );
    
register_clcmd"say_team shop""CmdMainMenu" );
    
    
register_event"DeathMsg""EventDeath""a" );
    
register_event("ScreenFade""eventFlash""be""4=255""5=255""6=255""7>199");
    
register_event("TextMsg""fire_in_the_hole""b""2&#Game_radio""4&#Fire_in_the_hole");
    
register_event("TextMsg""fire_in_the_hole2""b""3&#Game_radio""5&#Fire_in_the_hole");
    
register_event("99""grenade_throw""b");
    
    
register_forwardFM_EmitSound"fw_emitsound" );
    
register_forwardFM_PlayerPreThink"FwdPlayerPreThink");
    
    
register_logevent"EventRoundStart"2"1=Round_Start" );
    
    
g_msgScreenFade get_user_msgid"ScreenFade" );
    
g_HudSyncInfo CreateHudSyncObj( );
}

public 
plugin_natives( )
{
    
register_library"sc_shop" );
    
    
register_native"get_user_antiflash""_get_user_antiflash" );
}

public 
_get_user_antiflashiPluginiParams )
{
    new 
iClient get_param);
    
    if( 
g_bHasNoFlash[iClient] )
        return 
1;
    else
        return 
0;
    
    return -
1;
}

public 
client_connectid )
{
    
g_bHasNoFlash[id] = false;
    
g_bHasNoFrost[id] = false;
    
g_bHasNoFall[id] = false;
    
g_bHasBoots[id] = false;
    
g_bHasStealth[id] = false;
    
g_bHasCamo[id] = false;
    
    
g_bHasFlash[id] = false;
    
g_bHasFrost[id] = false;
    
g_bHasGrenade[id] = false;
    
g_bHasAwp[id] = false;
    
g_bHasDeagle[id] = false;
    
    
g_bHas1Awp[id] = false;
    
g_bHas2Awp[id] = false;
    
    
g_bHas1Deagle[id] = false;
    
g_bHas2Deagle[id] = false;
    
    
g_bHas25HP[id] = false;
    
g_bHas50HP[id] = false;
    
g_bHas75HP[id] = false;
    
g_bHas100HP[id] = false;
    
g_bHas125HP[id] = false;
    
g_bHas150HP[id] = false;
    
    
g_bHas25AM[id] = false;
    
g_bHas50AM[id] = false;
    
g_bHas75AM[id] = false;
    
g_bHas100AM[id] = false;
    
g_bHas125AM[id] = false;
    
g_bHas150AM[id] = false;
    
    
g_bHas25XP[id] = false;
    
g_bHas50XP[id] = false;
    
g_bHas75XP[id] = false;
    
g_bHas100XP[id] = false;
    
g_bHas125XP[id] = false;
    
g_bHas150XP[id] = false;
    
    
remove_user_immuneid );
    
    if( 
task_exists550 ) )
        
remove_task550 );
    
    if( 
task_exists551 ) )
        
remove_task551 );
    
    if( 
task_exists552 ) )
        
remove_task552 );
}

public 
FwdPlayerPreThinkid )
{
    if( 
is_user_aliveid ) && g_bHasNoFall[id] )
    {
        
set_pevidpev_watertype, -);
    }
    else
    {
        
set_pevidpev_watertype, -);
    }
}

public 
EventRoundStart( )
{
    new 
players[32], pnumid;
    
get_playersplayerspnum );
    
    for( new 
0pnumi++ )
    {
        
id players[i];
        
        if( 
is_user_connectedid ) )
        {
            
g_bHasNoFlash[id] = false;
            
g_bHasNoFrost[id] = false;
            
g_bHasNoFall[id] = false;
            
g_bHasBoots[id] = false;
            
g_bHasStealth[id] = false;
            
g_bHasCamo[id] = false;
        
            
g_bHasFlash[id] = false;
            
g_bHasFrost[id] = false;
            
g_bHasGrenade[id] = false;
            
g_bHasAwp[id] = false;
            
g_bHasDeagle[id] = false;
        
            
g_bHas1Awp[id] = false;
            
g_bHas2Awp[id] = false;
        
            
g_bHas1Deagle[id] = false;
            
g_bHas2Deagle[id] = false;
        
            
g_bHas25HP[id] = false;
            
g_bHas50HP[id] = false;
            
g_bHas75HP[id] = false;
            
g_bHas100HP[id] = false;
            
g_bHas125HP[id] = false;
            
g_bHas150HP[id] = false;
        
            
g_bHas25AM[id] = false;
            
g_bHas50AM[id] = false;
            
g_bHas75AM[id] = false;
            
g_bHas100AM[id] = false;
            
g_bHas125AM[id] = false;
            
g_bHas150AM[id] = false;
        
            
g_bHas25XP[id] = false;
            
g_bHas50XP[id] = false;
            
g_bHas75XP[id] = false;
            
g_bHas100XP[id] = false;
            
g_bHas125XP[id] = false;
            
g_bHas150XP[id] = false;
        
            
remove_user_immuneid );
        }
    }
}

public 
EventDeath( )
{
    new 
id read_data);
    
    
g_bHasNoFlash[id] = false;
    
g_bHasNoFrost[id] = false;
    
g_bHasNoFall[id] = false;
    
g_bHasBoots[id] = false;
    
g_bHasStealth[id] = false;
    
g_bHasCamo[id] = false;
    
    
g_bHasFlash[id] = false;
    
g_bHasFrost[id] = false;
    
g_bHasGrenade[id] = false;
    
g_bHasAwp[id] = false;
    
g_bHasDeagle[id] = false;
    
    
g_bHas1Awp[id] = false;
    
g_bHas2Awp[id] = false;
    
    
g_bHas1Deagle[id] = false;
    
g_bHas2Deagle[id] = false;
    
    
g_bHas25HP[id] = false;
    
g_bHas50HP[id] = false;
    
g_bHas75HP[id] = false;
    
g_bHas100HP[id] = false;
    
g_bHas125HP[id] = false;
    
g_bHas150HP[id] = false;
    
    
g_bHas25AM[id] = false;
    
g_bHas50AM[id] = false;
    
g_bHas75AM[id] = false;
    
g_bHas100AM[id] = false;
    
g_bHas125AM[id] = false;
    
g_bHas150AM[id] = false;
    
    
g_bHas25XP[id] = false;
    
g_bHas50XP[id] = false;
    
g_bHas75XP[id] = false;
    
g_bHas100XP[id] = false;
    
g_bHas125XP[id] = false;
    
g_bHas150XP[id] = false;
    
    
remove_user_immuneid );
}

public 
CmdMainMenuid )
{
    if( !
get_pcvar_numpCvar_enable ) )
        return 
PLUGIN_HANDLED;
    
    new 
main menu_create"HideNSeek Shop""main_handler" );
    
    
menu_additemmain"Health Menu""1" );
    
menu_additemmain"Armor Menu""2" );
    if( 
get_user_teamid ) == )
        
menu_additemmain"Weapon Menu""3" );
    
menu_additemmain"Ammo Menu""4" );
    
menu_additemmain"Power Menu""5" );
    
menu_additemmain"XP Menu""6" );
    
    new 
info[70];
    
formatexinfosizeofinfo ) - 1"%sRespawn ( 1 Per Map )"g_bRespawnUsed[id] ? "\d" "\w" );
    
menu_additemmaininfo"7" );
    
    
menu_setpropmainMPROP_EXITMEXIT_ALL );
    
    
menu_displayidmain);
    
    return 
PLUGIN_CONTINUE;
}

public 
main_handleridmainitem )
{
    if( 
item == MENU_EXIT )
    {
        
menu_destroymain );
        return 
PLUGIN_HANDLED;
    }
    
    new 
data[6], iName[64], accesscallback;
    
menu_item_getinfomainitemaccessdata5iName63callback );
    
    new 
picked str_to_numdata );
    
    switch( 
picked )
    {
        case 
1: { CmdHealthMenuid ); }
        case 
2: { CmdArmorMenuid ); }
        case 
3: { CmdWeaponMenuid ); }
        case 
4: { CmdAmmoMenuid ); }
        case 
5: { CmdPowerMenuid ); }
        case 
6: { CmdXPMenuid ); }
        case 
7:
        {
            if( !
g_bRespawnUsed[id] )
            {
                if( !
is_user_aliveid ) )
                {
                    
ExecuteHamBHam_CS_RoundRespawnid );
                    
g_bRespawnUsed[id] = true;
                    
client_printidprint_chat"%s You have been respawned!"CLAN_TAG );
                }
                else
                {
                    
client_printidprint_chat"%s You must be dead to respawn!"CLAN_TAG );
                    return 
PLUGIN_HANDLED;
                }
            }
        }
    }
    
    
menu_destroymain );
    
    return 
PLUGIN_HANDLED;
}

public 
CmdHealthMenuid )
{
    new 
hmenu menu_create"Health Menu""health_handler" );
    
    
menu_additemhmenug_HealthInfo[0][Name], "1" );
    
menu_additemhmenug_HealthInfo[1][Name], "2" );
    
menu_additemhmenug_HealthInfo[2][Name], "3" );
    
menu_additemhmenug_HealthInfo[3][Name], "4" );
    
menu_additemhmenug_HealthInfo[4][Name], "5" );
    
menu_additemhmenug_HealthInfo[5][Name], "6" );
    
    
menu_setprophmenuMPROP_EXITMEXIT_ALL );
    
menu_setprophmenuMPROP_EXITNAME"\wBack" );
    
    
menu_displayidhmenu);
}

public 
health_handleridhmenuitem )
{
    if( 
item == MENU_EXIT )
    {
        
menu_destroyhmenu );
        
CmdMainMenuid );
        return 
PLUGIN_HANDLED;
    }
    
    new 
data[6], iName[64];
    new 
accesscallback;
    
menu_item_getinfohmenuitemaccessdata5iName63callback );
    
    new 
picked str_to_numdata );
    new 
money cs_get_user_moneyid );
    
    switch( 
picked )
    {
        case 
1:
        {
            if( 
money >= g_HealthInfo[0][Cost] )
            {
                if( 
is_user_aliveid ) )
                {
                    if( !
g_bHas25HP[id] )
                    {
                        
cs_set_user_moneyidmoney g_HealthInfo[0][Cost] );
                    
                        new 
health get_user_healthid ) + 25;
                        
set_user_healthidhealth );
                        
g_bHas25HP[id] = true;
                    
                        
client_cmdid"spk items/medshot4" );
                    }
                    else
                    {
                        
client_printidprint_chat"%s You already bought this item!"CLAN_TAG );
                        return 
PLUGIN_HANDLED;
                    }
                }
                else
                {
                    
client_printidprint_chat"%s You must be alive to use the shop!"CLAN_TAG );
                    return 
PLUGIN_HANDLED;
                }
            }
            else
            {
                
client_printidprint_chat"%s You don't have enough money for this!"CLAN_TAG );
                return 
PLUGIN_HANDLED;
            }
        }
        case 
2:
        {
            if( 
money >= g_HealthInfo[1][Cost] )
            {
                if( 
is_user_aliveid ) )
                {
                    if( !
g_bHas50HP[id] )
                    {
                        
cs_set_user_moneyidmoney g_HealthInfo[1][Cost] );
                    
                        new 
health get_user_healthid ) + 50;
                        
set_user_healthidhealth );
                        
g_bHas50HP[id] = true;
                    
                        
client_cmdid"spk items/medshot4" );
                    }
                    else
                    {
                        
client_printidprint_chat"%s You already bought this item!"CLAN_TAG );
                        return 
PLUGIN_HANDLED;
                    }
                }
                else
                {
                    
client_printidprint_chat"%s You must be alive to use the shop!"CLAN_TAG );
                    return 
PLUGIN_HANDLED;
                }
            }
            else
            {
                
client_printidprint_chat"%s You don't have enough money for this!"CLAN_TAG );
                return 
PLUGIN_HANDLED;
            }
        }
        case 
3:
        {
            if( 
money >= g_HealthInfo[2][Cost] )
            {
                if( 
is_user_aliveid ) )
                {
                    if( !
g_bHas75HP[id] )
                    {
                        
cs_set_user_moneyidmoney g_HealthInfo[2][Cost] )
                    
                        new 
health get_user_healthid ) + 75;
                        
set_user_healthidhealth );
                        
g_bHas75HP[id] = true;
                    
                        
client_cmdid"spk items/medshot4" );
                    }
                    else
                    {
                        
client_printidprint_chat"%s You already bought this item!"CLAN_TAG );
                        return 
PLUGIN_HANDLED;
                    }
                }
                else
                {
                    
client_printidprint_chat"%s You must be alive to use the shop!"CLAN_TAG );
                    return 
PLUGIN_HANDLED;
                }
            }
            else
            {
                
client_printidprint_chat"%s You don't have enough money for this!"CLAN_TAG );
                return 
PLUGIN_HANDLED;
            }
        }
        case 
4:
        {
            if( 
money >= g_HealthInfo[3][Cost] )
            {
                if( 
is_user_aliveid ) )
                {
                    if( !
g_bHas100HP[id] )
                    {
                        
cs_set_user_moneyidmoney g_HealthInfo[3][Cost] );
                    
                        new 
health get_user_healthid ) + 100;
                        
set_user_healthidhealth );
                        
g_bHas100HP[id] = true;
                    
                        
client_cmdid"spk items/medshot4" );
                    }
                    else
                    {
                        
client_printidprint_chat"%s You already bought this item!"CLAN_TAG );
                        return 
PLUGIN_HANDLED;
                    }
                }
                else
                {
                    
client_printidprint_chat"%s You must be alive to use the shop!"CLAN_TAG );
                    return 
PLUGIN_HANDLED;
                }
            }
            else
            {
                
client_printidprint_chat"%s You don't have enough money for this!"CLAN_TAG );
                return 
PLUGIN_HANDLED;
            }
        }
        case 
5:
        {
            if( 
money >= g_HealthInfo[4][Cost] )
            {
                if( 
is_user_aliveid ) )
                {
                    if( !
g_bHas125HP[id] )
                    {
                        
cs_set_user_moneyidmoney g_HealthInfo[4][Cost] );
                    
                        new 
health get_user_healthid ) + 125;
                        
set_user_healthidhealth );
                        
g_bHas125HP[id] = true;
                    
                        
client_cmdid"spk items/medshot4" );
                    }
                    else
                    {
                        
client_printidprint_chat"%s You already bought this item!"CLAN_TAG );
                        return 
PLUGIN_HANDLED;
                    }
                }
                else
                {
                    
client_printidprint_chat"%s You must be alive to use the shop!"CLAN_TAG );
                    return 
PLUGIN_HANDLED;
                }
            }
            else
            {
                
client_printidprint_chat"%s You don't have enough money for this!"CLAN_TAG );
                return 
PLUGIN_HANDLED;
            }
        }
        case 
6:
        {
            if( 
money >= g_HealthInfo[5][Cost] )
            {
                if( 
is_user_aliveid ) )
                {
                    if( !
g_bHas150HP[id] )
                    {
                        
cs_set_user_moneyidmoney g_HealthInfo[5][Cost] );
                    
                        new 
health get_user_healthid ) + 150;
                        
set_user_healthidhealth );
                        
g_bHas150HP[id] = true;
                    
                        
client_cmdid"spk items/medshot4" );
                    }
                    else
                    {
                        
client_printidprint_chat"%s You already bought this item!"CLAN_TAG );
                        return 
PLUGIN_HANDLED;
                    }
                }
                else
                {
                    
client_printidprint_chat"%s You must be alive to use the shop!"CLAN_TAG );
                    return 
PLUGIN_HANDLED;
                }
            }
            else
            {
                
client_printidprint_chat"%s You don't have enough money for this!"CLAN_TAG );
                return 
PLUGIN_HANDLED;
            }
        }
    }
    
    
menu_destroyhmenu );
    
CmdMainMenuid );
    return 
PLUGIN_HANDLED;
}

public 
CmdArmorMenuid )
{
    new 
amenu menu_create"Armor Menu""armor_handler" );
    
    
menu_additemamenug_ArmorInfo[0][Name], "1" );
    
menu_additemamenug_ArmorInfo[1][Name], "2" );
    
menu_additemamenug_ArmorInfo[2][Name], "3" );
    
menu_additemamenug_ArmorInfo[3][Name], "4" );
    
menu_additemamenug_ArmorInfo[4][Name], "5" );
    
menu_additemamenug_ArmorInfo[5][Name], "6" );
    
    
menu_setpropamenuMPROP_EXITMEXIT_ALL );
    
menu_setpropamenuMPROP_EXITNAME"\wBack" );
    
    
menu_displayidamenu);
}

public 
armor_handleridamenuitem )
{
    if( 
item == MENU_EXIT )
    {
        
menu_destroyamenu );
        
CmdMainMenuid );
        return 
PLUGIN_HANDLED;
    }
    
    new 
data[6], iName[64];
    new 
accesscallback;
    
menu_item_getinfoamenuitemaccessdata5iName63callback );
    
    new 
picked str_to_numdata );
    new 
money cs_get_user_moneyid );
    
    switch( 
picked )
    {
        case 
1:
        {
            if( 
money >= g_ArmorInfo[0][Cost] )
            {
                if( 
is_user_aliveid ) )
                {
                    if( !
g_bHas25AM[id] )
                    {
                        
cs_set_user_moneyidmoney g_ArmorInfo[0][Cost] );
                    
                        new 
armor get_user_armorid ) + 25;
                        
set_user_armoridarmor );
                        
g_bHas25AM[id] = true;
                    }
                    else
                    {
                        
client_printidprint_chat"%s You already bought this item!"CLAN_TAG );
                        return 
PLUGIN_HANDLED;
                    }
                }
                else
                {
                    
client_printidprint_chat"%s You must be alive to use the shop!"CLAN_TAG );
                    return 
PLUGIN_HANDLED;
                }
            }
            else
            {
                
client_printidprint_chat"%s You don't have enough money for this!"CLAN_TAG );
                return 
PLUGIN_HANDLED;
            }
        }
        case 
2:
        {
            if( 
money >= g_ArmorInfo[1][Cost] )
            {
                if( 
is_user_aliveid ) )
                {
                    if( !
g_bHas50AM[id] )
                    {
                        
cs_set_user_moneyidmoney g_ArmorInfo[1][Cost] );
                    
                        new 
armor get_user_armorid ) + 50;
                        
set_user_armoridarmor );
                        
g_bHas50AM[id] = true;
                    }
                    else
                    {
                        
client_printidprint_chat"%s You already bought this item!"CLAN_TAG );
                        return 
PLUGIN_HANDLED;
                    }
                }
                else
                {
                    
client_printidprint_chat"%s You must be alive to use the shop!"CLAN_TAG );
                    return 
PLUGIN_HANDLED;
                }
            }
            else
            {
                
client_printidprint_chat"%s You don't have enough money for this!"CLAN_TAG );
                return 
PLUGIN_HANDLED;
            }
        }
        case 
3:
        {
            if( 
money >= g_ArmorInfo[2][Cost] )
            {
                if( 
is_user_aliveid ) )
                {
                    if( !
g_bHas75AM[id] )
                    {
                        
cs_set_user_moneyidmoney g_ArmorInfo[2][Cost] )
                    
                        new 
armor get_user_armorid ) + 75;
                        
set_user_armoridarmor );
                        
g_bHas75AM[id] = true;
                    }
                    else
                    {
                        
client_printidprint_chat"%s You already bought this item!"CLAN_TAG );
                        return 
PLUGIN_HANDLED;
                    }
                }
                else
                {
                    
client_printidprint_chat"%s You must be alive to use the shop!"CLAN_TAG );
                    return 
PLUGIN_HANDLED;
                }
            }
            else
            {
                
client_printidprint_chat"%s You don't have enough money for this!"CLAN_TAG );
                return 
PLUGIN_HANDLED;
            }
        }
        case 
4:
        {
            if( 
money >= g_ArmorInfo[3][Cost] )
            {
                if( 
is_user_aliveid ) )
                {
                    if( !
g_bHas100AM[id] )
                    {
                        
cs_set_user_moneyidmoney g_ArmorInfo[3][Cost] );
                    
                        new 
armor get_user_armorid ) + 100;
                        
set_user_armoridarmor );
                        
g_bHas100AM[id] = true;
                    }
                    else
                    {
                        
client_printidprint_chat"%s You already bought this item!"CLAN_TAG );
                        return 
PLUGIN_HANDLED;
                    }
                }
                else
                {
                    
client_printidprint_chat"%s You must be alive to use the shop!"CLAN_TAG );
                    return 
PLUGIN_HANDLED;
                }
            }
            else
            {
                
client_printidprint_chat"%s You don't have enough money for this!"CLAN_TAG );
                return 
PLUGIN_HANDLED;
            }
        }
        case 
5:
        {
            if( 
money >= g_ArmorInfo[4][Cost] )
            {
                if( 
is_user_aliveid ) )
                {
                    if( !
g_bHas125AM[id] )
                    {
                        
cs_set_user_moneyidmoney g_ArmorInfo[4][Cost] );
                    
                        new 
armor get_user_armorid ) + 125;
                        
set_user_armoridarmor );
                        
g_bHas125AM[id] = true;
                    }
                    else
                    {
                        
client_printidprint_chat"%s You already bought this item!"CLAN_TAG );
                        return 
PLUGIN_HANDLED;
                    }
                }
                else
                {
                    
client_printidprint_chat"%s You must be alive to use the shop!"CLAN_TAG );
                    return 
PLUGIN_HANDLED;
                }
            }
            else
            {
                
client_printidprint_chat"%s You don't have enough money for this!"CLAN_TAG );
                return 
PLUGIN_HANDLED;
            }
        }
        case 
6:
        {
            if( 
money >= g_ArmorInfo[5][Cost] )
            {
                if( 
is_user_aliveid ) )
                {
                    if( !
g_bHas150AM[id] )
                    {
                        
cs_set_user_moneyidmoney g_ArmorInfo[5][Cost] );
                    
                        new 
armor get_user_armorid ) + 150;
                        
set_user_armoridarmor );
                        
g_bHas150AM[id] = true;
                    }
                    else
                    {
                        
client_printidprint_chat"%s You already bought this item!"CLAN_TAG );
                        return 
PLUGIN_HANDLED;
                    }
                }
                else
                {
                    
client_printidprint_chat"%s You must be alive to use the shop!"CLAN_TAG );
                    return 
PLUGIN_HANDLED;
                }
            }
            else
            {
                
client_printidprint_chat"%s You don't have enough money for this!"CLAN_TAG );
                return 
PLUGIN_HANDLED;
            }
        }
    }
    
    
menu_destroyamenu );
    
CmdMainMenuid );
    return 
PLUGIN_HANDLED;
}

public 
CmdWeaponMenuid )
{
    new 
wmenu menu_create"Weapon Menu""weapon_handler" );
    
    
menu_additemwmenug_WeaponInfo[0][Name], "1" );
    
menu_additemwmenug_WeaponInfo[1][Name], "2" );
    
menu_additemwmenug_WeaponInfo[2][Name], "3" );
    
menu_additemwmenug_WeaponInfo[3][Name], "4" );
    
menu_additemwmenug_WeaponInfo[4][Name], "5" );
    
    
menu_setpropwmenuMPROP_EXITMEXIT_ALL );
    
menu_setpropwmenuMPROP_EXITNAME"\wBack" );
    
    
menu_displayidwmenu);
}

public 
weapon_handleridwmenuitem )
{
    if( 
item == MENU_EXIT )
    {
        
menu_destroywmenu );
        
CmdMainMenuid );
        return 
PLUGIN_HANDLED;
    }
    
    new 
data[6], iName[64];
    new 
accesscallback;
    
menu_item_getinfowmenuitemaccessdata5iName63callback );
    
    new 
picked str_to_numdata );
    new 
money cs_get_user_moneyid );
    
    switch( 
picked )
    {
        case 
1:
        {
            if( 
money >= g_WeaponInfo[0][Cost] )
            {
                if( 
is_user_aliveid ) )
                {
                    if( !
g_bHasAwp[id] )
                    {
                        
cs_set_user_moneyidmoney g_WeaponInfo[0][Cost] );
                    
                        
give_itemid"weapon_awp" );
                        
cs_set_weapon_ammofind_ent_by_owner1"weapon_awp"id ), );
                        
g_bHasAwp[id] = true;
                    }
                    else
                    {
                        
client_printidprint_chat"%s You already bought this item!"CLAN_TAG );
                        return 
PLUGIN_HANDLED;
                    }
                }
                else
                {
                    
client_printidprint_chat"%s You must be alive to use the shop!"CLAN_TAG );
                    return 
PLUGIN_HANDLED;
                }
            }
            else
            {
                
client_printidprint_chat"%s You don't have enough money for this!"CLAN_TAG );
                return 
PLUGIN_HANDLED;
            }
        }
        case 
2:
        {
            if( 
money >= g_WeaponInfo[1][Cost] )
            {
                if( 
is_user_aliveid ) )
                {
                    if( !
g_bHasDeagle[id] )
                    {
                        
cs_set_user_moneyidmoney g_WeaponInfo[1][Cost] );
                    
                        
give_itemid"weapon_deagle" );
                        
cs_set_weapon_ammofind_ent_by_owner1"weapon_deagle"id ), );
                        
g_bHasDeagle[id] = true;
                    }
                    else
                    {
                        
client_printidprint_chat"%s You already bought this item!"CLAN_TAG );
                        return 
PLUGIN_HANDLED;
                    }
                }
                else
                {
                    
client_printidprint_chat"%s You must be alive to use the shop!"CLAN_TAG );
                    return 
PLUGIN_HANDLED;
                }
            }
            else
            {
                
client_printidprint_chat"%s You don't have enough money for this!"CLAN_TAG );
                return 
PLUGIN_HANDLED;
            }
        }
        case 
3:
        {
            if( 
money >= g_WeaponInfo[2][Cost] )
            {
                if( 
is_user_aliveid ) )
                {
                    if( !
g_bHasGrenade[id] )
                    {
                        
cs_set_user_moneyidmoney g_WeaponInfo[2][Cost] );
                        
give_itemid"weapon_hegrenade" );
                        
g_bHasGrenade[id] = true;
                    }
                    else
                    {
                        
client_printidprint_chat"%s You already bought this item!"CLAN_TAG );
                        return 
PLUGIN_HANDLED;
                    }
                }
                else
                {
                    
client_printidprint_chat"%s You must be alive to use the shop!"CLAN_TAG );
                    return 
PLUGIN_HANDLED;
                }
            }
            else
            {
                
client_printidprint_chat"%s You don't have enough money for this!"CLAN_TAG );
                return 
PLUGIN_HANDLED;
            }
        }
        case 
4:
        {
            if( 
money >= g_WeaponInfo[3][Cost] )
            {
                if( 
is_user_aliveid ) )
                {
                    if( !
g_bHasFrost[id] )
                    {
                        
cs_set_user_moneyidmoney g_WeaponInfo[3][Cost] );
                        
give_itemid"weapon_smokegrenade" );
                        
g_bHasFrost[id] = true;
                    }
                    else
                    {
                        
client_printidprint_chat"%s You already bought this item!"CLAN_TAG );
                        return 
PLUGIN_HANDLED;
                    }
                }
                else
                {
                    
client_printidprint_chat"%s You must be alive to use the shop!"CLAN_TAG );
                    return 
PLUGIN_HANDLED;
                }
            }
            else
            {
                
client_printidprint_chat"%s You don't have enough money for this!"CLAN_TAG );
                return 
PLUGIN_HANDLED;
            }
        }
        case 
5:
        {
            if( 
money >= g_WeaponInfo[4][Cost] )
            {
                if( 
is_user_aliveid ) )
                {
                    if( !
g_bHasFlash[id] )
                    {
                        
cs_set_user_moneyidmoney g_WeaponInfo[4][Cost] );
                        
give_itemid"weapon_flashbang" );
                        
g_bHasFlash[id] = true;
                    }
                    else
                    {
                        
client_printidprint_chat"%s You already bought this item!"CLAN_TAG );
                        return 
PLUGIN_HANDLED;
                    }
                }
                else
                {
                    
client_printidprint_chat"%s You must be alive to use the shop!"CLAN_TAG );
                    return 
PLUGIN_HANDLED;
                }
            }
            else
            {
                
client_printidprint_chat"%s You don't have enough money for this!"CLAN_TAG );
                return 
PLUGIN_HANDLED;
            }
        }
    }
    
    
menu_destroywmenu );
    
CmdMainMenuid );
    return 
PLUGIN_HANDLED;
}

public 
CmdAmmoMenuid )
{
    new 
ammomenu menu_create"Ammo Menu""ammo_handler" );
    
    
menu_additemammomenug_AmmoInfo[0][Name], "1" );
    
menu_additemammomenug_AmmoInfo[1][Name], "2" );
    
menu_additemammomenug_AmmoInfo[2][Name], "3" );
    
menu_additemammomenug_AmmoInfo[3][Name], "4" );
    
    
menu_setpropammomenuMPROP_EXITMEXIT_ALL );
    
menu_setpropammomenuMPROP_EXITNAME"\wBack" );
    
    
menu_displayidammomenu);
}

public 
ammo_handleridammomenuitem )
{
    if( 
item == MENU_EXIT )
    {
        
menu_destroyammomenu );
        
CmdMainMenuid );
        return 
PLUGIN_HANDLED;
    }
    
    new 
data[6], iName[64];
    new 
accesscallback;
    
menu_item_getinfoammomenuitemaccessdata5iName63callback );
    
    new 
picked str_to_numdata );
    new 
money cs_get_user_moneyid );
    
    switch( 
picked )
    {
        case 
1:
        {
            if( 
money >= g_AmmoInfo[0][Cost] )
            {
                if( 
is_user_aliveid ) )
                {
                    if( 
user_has_weaponidCSW_AWP) )
                    {
                        if( !
g_bHas1Awp[id] )
                        {
                            
cs_set_user_moneyidmoney g_AmmoInfo[0][Cost] );
                            
cs_add_weapon_ammoidCSW_AWP);
                            
g_bHas1Awp[id] = true;
                        }
                        else
                        {
                            
client_printidprint_chat"%s You already bought this item!"CLAN_TAG );
                            return 
PLUGIN_HANDLED;
                        }
                    }
                    else
                    {
                        
client_printidprint_chat"%s You don't have an Awp!"CLAN_TAG );
                        return 
PLUGIN_HANDLED;
                    }
                }
                else
                {
                    
client_printidprint_chat"%s You must be alive to use the shop!"CLAN_TAG );
                    return 
PLUGIN_HANDLED;
                }
            }
            else
            {
                
client_printidprint_chat"%s You don't have enough money for this!"CLAN_TAG );
                return 
PLUGIN_HANDLED;
            }
        }
        case 
2:
        {
            if( 
money >= g_AmmoInfo[1][Cost] )
            {
                if( 
is_user_aliveid ) )
                {
                    if( 
user_has_weaponidCSW_AWP) )
                    {
                        if( !
g_bHas2Awp[id] )
                        {
                            
cs_set_user_moneyidmoney g_AmmoInfo[1][Cost] );
                            
cs_add_weapon_ammoidCSW_AWP);
                            
g_bHas2Awp[id] = true;
                        }
                        else
                        {
                            
client_printidprint_chat"%s You already bought this item!"CLAN_TAG );
                            return 
PLUGIN_HANDLED;
                        }
                    }
                    else
                    {
                        
client_printidprint_chat"%s You don't have an Awp!"CLAN_TAG );
                        return 
PLUGIN_HANDLED;
                    }
                }
                else
                {
                    
client_printidprint_chat"%s You must be alive to use the shop!"CLAN_TAG );
                    return 
PLUGIN_HANDLED;
                }
            }
            else
            {
                
client_printidprint_chat"%s You don't have enough money for this!"CLAN_TAG );
                return 
PLUGIN_HANDLED;
            }
        }
        case 
3:
        {
            if( 
money >= g_AmmoInfo[2][Cost] )
            {
                if( 
is_user_aliveid ) )
                {
                    if( 
user_has_weaponidCSW_DEAGLE) )
                    {
                        if( !
g_bHas1Deagle[id] )
                        {
                            
cs_set_user_moneyidmoney g_AmmoInfo[2][Cost] );
                            
cs_add_weapon_ammoidCSW_DEAGLE);
                            
g_bHas1Deagle[id] = true;
                        }
                        else
                        {
                            
client_printidprint_chat"%s You already bought this item!"CLAN_TAG );
                            return 
PLUGIN_HANDLED;
                        }
                    }
                    else
                    {
                        
client_printidprint_chat"%s You don't have a Deagle!"CLAN_TAG );
                        return 
PLUGIN_HANDLED;
                    }
                }
                else
                {
                    
client_printidprint_chat"%s You must be alive to use the shop!"CLAN_TAG );
                    return 
PLUGIN_HANDLED;
                }
            }
            else
            {
                
client_printidprint_chat"%s You don't have enough money for this!"CLAN_TAG );
                return 
PLUGIN_HANDLED;
            }
        }
        case 
4:
        {
            if( 
money >= g_AmmoInfo[3][Cost] )
            {
                if( 
is_user_aliveid ) )
                {
                    if( 
user_has_weaponidCSW_DEAGLE) )
                    {
                        if( !
g_bHas2Deagle[id] )
                        {
                            
cs_set_user_moneyidmoney g_AmmoInfo[3][Cost] );
                            
cs_add_weapon_ammoidCSW_DEAGLE);
                            
g_bHas2Deagle[id] = true;
                        }
                        else
                        {
                            
client_printidprint_chat"%s You already bought this item!"CLAN_TAG );
                            return 
PLUGIN_HANDLED;
                        }
                    }
                    else
                    {
                        
client_printidprint_chat"%s You don't have a Deagle!"CLAN_TAG );
                        return 
PLUGIN_HANDLED;
                    }
                }
                else
                {
                    
client_printidprint_chat"%s You must be alive to use the shop!"CLAN_TAG );
                    return 
PLUGIN_HANDLED;
                }
            }
            else
            {
                
client_printidprint_chat"%s You don't have enough money for this!"CLAN_TAG );
                return 
PLUGIN_HANDLED;
            }
        }
    }
    
    
menu_destroyammomenu );
    
CmdMainMenuid );
    return 
PLUGIN_HANDLED;
}

public 
CmdPowerMenuid )
{
    new 
pmenu menu_create"Power Menu""power_handler" );
    
    
menu_additempmenug_PowerInfo[0][Name], "1" );
    
menu_additempmenug_PowerInfo[1][Name], "2" );
    
menu_additempmenug_PowerInfo[2][Name], "3" );
    
menu_additempmenug_PowerInfo[3][Name], "4" );
    
menu_additempmenug_PowerInfo[4][Name], "5" );
    
menu_additempmenug_PowerInfo[5][Name], "6" );
    
    
menu_setproppmenuMPROP_EXITMEXIT_ALL );
    
menu_setproppmenuMPROP_EXITNAME"\wBack" );
    
    
menu_displayidpmenu);
}

public 
power_handleridpmenuitem )
{
    if( 
item == MENU_EXIT )
    {
        
menu_destroypmenu );
        
CmdMainMenuid );
        return 
PLUGIN_HANDLED;
    }
    
    new 
data[6], iName[64];
    new 
accesscallback;
    
menu_item_getinfopmenuitemaccessdata5iName63callback );
    
    new 
picked str_to_numdata );
    new 
money cs_get_user_moneyid );
    
    switch( 
picked )
    {
        case 
1:
        {
            if( 
money >= g_PowerInfo[0][Cost] )
            {
                if( 
is_user_aliveid ) )
                {
                    if( !
g_bHasNoFlash[id] )
                    {
                        
cs_set_user_moneyidmoney g_PowerInfo[0][Cost] );
                    
                        
g_bHasNoFlash[id] = true;
                    }
                    else
                    {
                        
client_printidprint_chat"%s You already bought this item!"CLAN_TAG );
                        return 
PLUGIN_HANDLED;
                    }
                }
                else
                {
                    
client_printidprint_chat"%s You must be alive to use the shop!"CLAN_TAG );
                    return 
PLUGIN_HANDLED;
                }
            }
            else
            {
                
client_printidprint_chat"%s You don't have enough money for this!"CLAN_TAG );
                return 
PLUGIN_HANDLED;
            }
        }
        case 
2:
        {
            if( 
money >= g_PowerInfo[1][Cost] )
            {
                if( 
is_user_aliveid ) )
                {
                    if( !
g_bHasNoFrost[id] )
                    {
                        
cs_set_user_moneyidmoney g_PowerInfo[1][Cost] );
                    
                        
add_user_immuneid );
                        
g_bHasNoFrost[id] = true;
                    }
                    else
                    {
                        
client_printidprint_chat"%s You already bought this item!"CLAN_TAG );
                        return 
PLUGIN_HANDLED;
                    }
                }
                else
                {
                    
client_printidprint_chat"%s You must be alive to use the shop!"CLAN_TAG );
                    return 
PLUGIN_HANDLED;
                }
            }
            else
            {
                
client_printidprint_chat"%s You don't have enough money for this!"CLAN_TAG );
                return 
PLUGIN_HANDLED;
            }
        }
        case 
3:
        {
            if( 
money >= g_PowerInfo[2][Cost] )
            {
                if( 
is_user_aliveid ) )
                {
                    if( !
g_bHasNoFall[id] )
                    {
                        
cs_set_user_moneyidmoney g_PowerInfo[2][Cost] );
                    
                        
g_bHasNoFall[id] = true;
                    }
                    else
                    {
                        
client_printidprint_chat"%s You already bought this item!"CLAN_TAG );
                        return 
PLUGIN_HANDLED;
                    }
                }
                else
                {
                    
client_printidprint_chat"%s You must be alive to use the shop!"CLAN_TAG );
                    return 
PLUGIN_HANDLED;
                }
            }
            else
            {
                
client_printidprint_chat"%s You don't have enough money for this!"CLAN_TAG );
                return 
PLUGIN_HANDLED;
            }
        }
        case 
4:
        {
            if( 
money >= g_PowerInfo[3][Cost] )
            {
                if( 
is_user_aliveid ) )
                {
                    if( !
g_bHasBoots[id] )
                    {
                        
cs_set_user_moneyidmoney g_PowerInfo[3][Cost] );
                    
                        
set_user_maxspeedid320.0 );
                        
g_bHasBoots[id] = true;
                        
                        
set_taskBOOTS_TIME"RemoveBoots"id );
                        
                        
g_iBootTime BOOTS_COUNTDOWN;
                        
set_task1.0"BootsCountdown"550__"a"BOOTS_COUNTDOWN );
                    }
                    else
                    {
                        
client_printidprint_chat"%s You already bought this item!"CLAN_TAG );
                        return 
PLUGIN_HANDLED;
                    }
                }
                else
                {
                    
client_printidprint_chat"%s You must be alive to use the shop!"CLAN_TAG );
                    return 
PLUGIN_HANDLED;
                }
            }
            else
            {
                
client_printidprint_chat"%s You don't have enough money for this!"CLAN_TAG );
                return 
PLUGIN_HANDLED;
            }
        }
        case 
5:
        {
            if( 
money >= g_PowerInfo[4][Cost] )
            {
                if( 
is_user_aliveid ) )
                {
                    if( !
g_bHasStealth[id] )
                    {
                        
cs_set_user_moneyidmoney g_PowerInfo[4][Cost] );
                    
                        
set_user_renderingidkRenderFxGlowShell000kRenderTransColor);
                        
g_bHasStealth[id] = true;
                    
                        
set_taskSTEALTH_TIME"RemoveStealth"id );
                        
                        
g_iStealthTime STEALTH_COUNTDOWN;
                        
set_task1.0"StealthCountdown"551__"a"STEALTH_COUNTDOWN );
                    }
                    else
                    {
                        
client_printidprint_chat"%s You already bought this item!"CLAN_TAG );
                        return 
PLUGIN_HANDLED;
                    }
                }
                else
                {
                    
client_printidprint_chat"%s You must be alive to use the shop!"CLAN_TAG );
                    return 
PLUGIN_HANDLED;
                }
            }
            else
            {
                
client_printidprint_chat"%s You don't have enough money for this!"CLAN_TAG );
                return 
PLUGIN_HANDLED;
            }
        }
        case 
6:
        {
            if( 
money >= g_PowerInfo[5][Cost] )
            {
                if( 
is_user_aliveid ) )
                {
                    if( !
g_bHasCamo[id] )
                    {
                        
cs_set_user_moneyidmoney g_PowerInfo[5][Cost] );
                    
                        new 
CsTeams:iTeam cs_get_user_teamid );
                    
                        if( 
iTeam == CS_TEAM_T )
                        {
                            
cs_set_user_modelid"urban" );
                        }
                        else if( 
iTeam == CS_TEAM_CT )
                        {
                            
cs_set_user_modelid"leet" );
                        }
                        else
                        {
                            
client_printidprint_chat"%s You must be on a team before you buy this!" );
                            return 
PLUGIN_HANDLED;
                        }
                        
                        
g_bHasCamo[id] = true;
                    
                        
set_taskCAMO_TIME"RemoveCamo"id );
                        
                        
g_iCamoTime CAMO_COUNTDOWN;
                        
set_task1.0"CamoCountdown"552__"a"CAMO_COUNTDOWN );
                    }
                    else
                    {
                        
client_printidprint_chat"%s You already bought this item!"CLAN_TAG );
                        return 
PLUGIN_HANDLED;
                    }
                }
                else
                {
                    
client_printidprint_chat"%s You must be alive to use the shop!"CLAN_TAG );
                    return 
PLUGIN_HANDLED;
                }
            }
            else
            {
                
client_printidprint_chat"%s You don't have enough money for this!"CLAN_TAG );
                return 
PLUGIN_HANDLED;
            }
        }
    }
    
    
menu_destroypmenu );
    
CmdMainMenuid );
    return 
PLUGIN_HANDLED;
}

public 
CmdXPMenuid )
{
    new 
xpmenu menu_create"XP Menu""xp_handler" );
    
    
menu_additemxpmenug_XPInfo[0][Name], "1" );
    
menu_additemxpmenug_XPInfo[1][Name], "2" );
    
menu_additemxpmenug_XPInfo[2][Name], "3" );
    
menu_additemxpmenug_XPInfo[3][Name], "4" );
    
menu_additemxpmenug_XPInfo[4][Name], "5" );
    
menu_additemxpmenug_XPInfo[5][Name], "6" );
    
    
menu_setpropxpmenuMPROP_EXITMEXIT_ALL );
    
menu_setpropxpmenuMPROP_EXITNAME"\wBack" );
    
    
menu_displayidxpmenu);
}

public 
xp_handleridxpmenuitem )
{
    if( 
item == MENU_EXIT )
    {
        
menu_destroyxpmenu );
        
CmdMainMenuid );
        return 
PLUGIN_HANDLED;
    }
    
    new 
data[6], iName[64];
    new 
accesscallback;
    
menu_item_getinfoxpmenuitemaccessdata5iName63callback );
    
    new 
picked str_to_numdata );
    new 
money cs_get_user_moneyid );
    
    switch( 
picked )
    {
        case 
1:
        {
            if( 
money >= g_XPInfo[0][Cost] )
            {
                if( 
is_user_aliveid ) )
                {
                    if( !
g_bHas25XP[id] )
                    {
                        
cs_set_user_moneyidmoney g_XPInfo[0][Cost] );
                    
                        
hnsxp_add_user_xpid25 );
                        
g_bHas25XP[id] = true;
                    }
                    else
                    {
                        
client_printidprint_chat"%s You already bought this item!"CLAN_TAG );
                        return 
PLUGIN_HANDLED;
                    }
                }
                else
                {
                    
client_printidprint_chat"%s You must be alive to use the shop!"CLAN_TAG );
                    return 
PLUGIN_HANDLED;
                }
            }
            else
            {
                
client_printidprint_chat"%s You don't have enough money for this!"CLAN_TAG );
                return 
PLUGIN_HANDLED;
            }
        }
        case 
2:
        {
            if( 
money >= g_XPInfo[1][Cost] )
            {
                if( 
is_user_aliveid ) )
                {
                    if( !
g_bHas50XP[id] )
                    {
                        
cs_set_user_moneyidmoney g_XPInfo[1][Cost] );
                    
                        
hnsxp_add_user_xpid50 );
                        
g_bHas50XP[id] = true;
                    }
                    else
                    {
                        
client_printidprint_chat"%s You already bought this item!"CLAN_TAG );
                        return 
PLUGIN_HANDLED;
                    }
                }
                else
                {
                    
client_printidprint_chat"%s You must be alive to use the shop!"CLAN_TAG );
                    return 
PLUGIN_HANDLED;
                }
            }
            else
            {
                
client_printidprint_chat"%s You don't have enough money for this!"CLAN_TAG );
                return 
PLUGIN_HANDLED;
            }
        }
        case 
3:
        {
            if( 
money >= g_XPInfo[2][Cost] )
            {
                if( 
is_user_aliveid ) )
                {
                    if( !
g_bHas75XP[id] )
                    {
                        
cs_set_user_moneyidmoney g_XPInfo[2][Cost] );
                    
                        
hnsxp_add_user_xpid75 );
                        
g_bHas75XP[id] = true;
                    }
                    else
                    {
                        
client_printidprint_chat"%s You already bought this item!"CLAN_TAG );
                        return 
PLUGIN_HANDLED;
                    }
                }
                else
                {
                    
client_printidprint_chat"%s You must be alive to use the shop!"CLAN_TAG );
                    return 
PLUGIN_HANDLED;
                }
            }
            else
            {
                
client_printidprint_chat"%s You don't have enough money for this!"CLAN_TAG );
                return 
PLUGIN_HANDLED;
            }
        }
        case 
4:
        {
            if( 
money >= g_XPInfo[3][Cost] )
            {
                if( 
is_user_aliveid ) )
                {
                    if( !
g_bHas100XP[id] )
                    {
                        
cs_set_user_moneyidmoney g_XPInfo[3][Cost] );
                    
                        
hnsxp_add_user_xpid100 );
                        
g_bHas100XP[id] = true;
                    }
                    else
                    {
                        
client_printidprint_chat"%s You already bought this item!"CLAN_TAG );
                        return 
PLUGIN_HANDLED;
                    }
                }
                else
                {
                    
client_printidprint_chat"%s You must be alive to use the shop!"CLAN_TAG );
                    return 
PLUGIN_HANDLED;
                }
            }
            else
            {
                
client_printidprint_chat"%s You don't have enough money for this!"CLAN_TAG );
                return 
PLUGIN_HANDLED;
            }
        }
        case 
5:
        {
            if( 
money >= g_XPInfo[4][Cost] )
            {
                if( 
is_user_aliveid ) )
                {
                    if( !
g_bHas125XP[id] )
                    {
                        
cs_set_user_moneyidmoney g_XPInfo[4][Cost] );
                    
                        
hnsxp_add_user_xpid125 );
                        
g_bHas125XP[id] = true;
                    }
                    else
                    {
                        
client_printidprint_chat"%s You already bought this item!"CLAN_TAG );
                        return 
PLUGIN_HANDLED;
                    }
                }
                else
                {
                    
client_printidprint_chat"%s You must be alive to use the shop!"CLAN_TAG );
                    return 
PLUGIN_HANDLED;
                }
            }
            else
            {
                
client_printidprint_chat"%s You don't have enough money for this!"CLAN_TAG );
                return 
PLUGIN_HANDLED;
            }
        }
        case 
6:
        {
            if( 
money >= g_XPInfo[5][Cost] )
            {
                if( 
is_user_aliveid ) )
                {
                    if( !
g_bHas150XP[id] )
                    {
                        
cs_set_user_moneyidmoney g_XPInfo[5][Cost] );
                    
                        
hnsxp_add_user_xpid150 );
                        
g_bHas150XP[id] = true;
                    }
                    else
                    {
                        
client_printidprint_chat"%s You already bought this item!"CLAN_TAG );
                        return 
PLUGIN_HANDLED;
                    }
                }
                else
                {
                    
client_printidprint_chat"%s You must be alive to use the shop!"CLAN_TAG );
                    return 
PLUGIN_HANDLED;
                }
            }
            else
            {
                
client_printidprint_chat"%s You don't have enough money for this!"CLAN_TAG );
                return 
PLUGIN_HANDLED;
            }
        }
    }
    
    
menu_destroyxpmenu );
    
CmdMainMenuid );
    return 
PLUGIN_HANDLED;
}

public 
RemoveBootsid )
{
    if( 
is_user_connectedid ) )
    {
        
set_user_maxspeedid250.0 );
    }
    
    
//remove_task( BOOTSID );
}

public 
RemoveStealthid )
{
    if( 
is_user_connectedid ) )
    {
        
set_user_renderingid );
    }
    
    
//remove_task( STEALTHID );
}

public 
RemoveCamoid )
{
    if( 
is_user_connectedid ) )
    {
        
cs_reset_user_modelid );
    }
    
    
//remove_task( id );
}

public 
CamoCountdown( )
{
    
set_hudmessage2552550, -1.00.8700.012.00.10.2, -);
    
ShowSyncHudMsg0g_HudSyncInfo"Camouflage Time: %i"g_iCamoTime-- );
}

public 
StealthCountdown( )
{
    
set_hudmessage2552550, -1.00.8700.012.00.10.2, -);
    
ShowSyncHudMsg0g_HudSyncInfo"Stealth Time: %i"g_iStealthTime-- );
}

public 
BootsCountdown( )
{
    
set_hudmessage2552550, -1.00.8700.012.00.10.2);
    
ShowSyncHudMsg0g_HudSyncInfo"Boots Time: %i"g_iBootTime-- );
}

/// NoFlash Blinding - Start
public bad_fix2() {
    new 
Float:gametime get_gametime();
    if(
gametime g_gametime2 2.5)
        for(new 
032i++)
            
grenade[i] = 0;
}

public 
eventFlashid ) {
    new 
Float:gametime get_gametime();
    if(
gametime != g_gametime) { 
        
g_owner get_grenade_owner();
        
g_gametime gametime;
        for(new 
033i++) 
            
g_track[i] = false;
        
g_track_enemy false;
    }    
    if(
is_user_connected(g_owner) && g_bHasNoFlash[id] ) {
        
g_track_enemy true;

        
message_begin(MSG_ONEg_msgScreenFade, {0,0,0}, id);
        
write_short(1);
        
write_short(1);
        
write_short(1);
        
write_byte(0);
        
write_byte(0);
        
write_byte(0);
        
write_byte(255);
        
message_end();
    }
}

public 
flash_delay() {
    if(
g_track_enemy == false) {
        for(new 
033i++) {
            if(
g_track[i] == true && is_user_connected(i)) {
                
message_begin(MSG_ONEg_msgScreenFade, {0,0,0}, i) ;
                
write_short(1);
                
write_short(1);
                
write_short(1);
                
write_byte(0);
                
write_byte(0);
                
write_byte(0);
                
write_byte(255);
                
message_end();
            }
        }
    }
}

public 
grenade_throw() {
    if(
g_sync_check_data == 0)
        return 
PLUGIN_CONTINUE;
    
g_sync_check_data--;
    if(
read_datanum() < 2)
        return 
PLUGIN_HANDLED_MAIN;

    if(
read_data(1) == 11 && (read_data(2) == || read_data(2) == 1))
        
add_grenade_owner(last);

    return 
PLUGIN_CONTINUE;
}

public 
fire_in_the_hole() {
    new 
name[32];
    
read_data(3name31);
    new 
temp_last get_user_index(name);
    new 
junk;
    if((
temp_last == 0) || (!is_user_connected(temp_last)))
        return 
PLUGIN_CONTINUE;
    if(
get_user_weapon(temp_last,junk,junk) == CSW_FLASHBANG) {
        
last temp_last;
        
g_sync_check_data 2
    }
    return 
PLUGIN_CONTINUE;
}

public 
fire_in_the_hole2() {
    new 
name[32];
    
read_data(4name31);
    new 
temp_last get_user_index(name);
    new 
junk;
    if((
temp_last == 0) || (!is_user_connected(temp_last)))
        return 
PLUGIN_CONTINUE;
    if(
get_user_weapon(temp_last,junk,junk) == CSW_FLASHBANG) {    
        
last temp_last;
        
g_sync_check_data 2;
    }
    return 
PLUGIN_CONTINUE;
}

add_grenade_owner(owner) {
    new 
Float:gametime get_gametime();
    
g_gametime2 gametime;
    for(new 
032i++) {
        if(
grenade[i] == 0) {
            
grenade[i] = owner;
            return;
        }
    }
}

get_grenade_owner() {
    new 
which grenade[0];
    for(new 
132i++)  
        
grenade[i-1] = grenade[i];
    
grenade[31] = 0;
    return 
which;
}

// from XxAvalanchexX "Flashbang Dynamic Light"
public fw_emitsound(entity,channel,const sample[],Float:volume,Float:attenuation,fFlags,pitch) {
    if(!
equali(sample,"weapons/flashbang-1.wav") && !equali(sample,"weapons/flashbang-2.wav"))
        return 
FMRES_IGNORED;

    new 
Float:gametime get_gametime();

    
//in case no one got flashed, the sound happens after all the flashes, same game time
    
if(gametime != g_gametime) {
        
g_owner get_grenade_owner();
        return 
FMRES_IGNORED;
    }
    return 
FMRES_IGNORED;
}
// NoFlash Blinding - End 

stock cs_add_weapon_ammoidweaponamt=)
{
    if( 
is_user_aliveid ) )
    {
        new 
bad_weapons_bitsum = ( ( << CSW_KNIFE ) | ( << CSW_HEGRENADE ) | ( << CSW_FLASHBANG ) | ( << CSW_SMOKEGRENADE ) | ( << ) );
        
        if( !( ( 
<< weapon ) & bad_weapons_bitsum ) )
        {
            new 
wname[20];
            
get_weaponnameweaponwname19 );
            new 
iWep find_ent_by_owneriWepwnameid);
            
            if( 
iWep 
            {
                
cs_set_weapon_ammoiWepcs_get_weapon_ammoiWep ) + amt );
                
                return 
iWep;
            }
        }
    }
    
    return 
0;



UchihaSkills 08-13-2013 12:28

Re: Shop Edit
 
Sorry if im wrong but i guess you must post this on Request Section

PepsiSexy 08-14-2013 21:55

Re: Shop Edit
 
Quote:

Originally Posted by UchihaSkills (Post 2012214)
Sorry if im wrong but i guess you must post this on Request Section

Ohh, i didnt knew.. Should i post again in Suggestion/Request Section?


All times are GMT -4. The time now is 15:49.

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