Raised This Month: $ Target: $400
 0% 

[HELP] CFJAIL


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
2reason2kill
Senior Member
Join Date: Feb 2011
Old 05-16-2011 , 09:53   [HELP] CFJAIL
Reply With Quote #1

PHP Code:
/*
Cookie Force Jailbreak Plugin

Description:

This is a complete jailbreak plugin, including:

- Last request 8 games and 4 rebels
- Beacon on lr
- Weapon menu for CT
- Shop
- Days menu
- much more

Cvars:

- jb_points_kill             How many points a T gets for killing a ct
- jb_shop_gunprice             How many points a gun gamble costs
- jb_shop_pillsprice         How many points Pills cost
- jb_shop_armorprice         How many points armor costs
- jb_shop_camoprice         How many points camo costs
- jb_show_players            SHows a hud with players left on top of screen
- jb_days                     Shows the days HUD
- jb_shop                     Opens the shop
- jb_points_headshot         How many points T's get for killing a ct with a headshot
- jb_shop_nadepack_price    How many points the nade pack costs
- jb_showrebels             Show rebels when they kill someone or not
- jb_blocktvoice Blocks     Terrorist from voice chat
- jb_enable_days             Enables the days menu
- jb_teleport                Enables/ disables the teleports on LR

Changelog:

1.0: Initial Release
1.1: Fixed lr bug
1.2: Added rebel system, fixed camo shop
1.3: Updated rebel system with glow and alarm
1.4: Added strip after LR win, optimalized lr
1.5: Fixed rebel weapon strip.
1.6: Fixed camo model.
1.7: Added t voice blocker by Exolent[jNr].
1.8: Fixed sounds(ac4570), index out of bounds error. 
1.9: Fixed sounds for the last time
2.0: Added several days, fixed gun toss
2.1: Fixed little typo in LR
2.2: Fixed Daysmenu items not showing up
2.3: Fixed crash on music day
2.4: Added new Lr: Choose specialday next round, teleport on some1s_jailbreak, fixed gun_blocker
2.5: Added cvar for teleport
2.6: Fixed rebeling won't stop
2.7: Fixed player out of range errors
2.8: Added Countdown, Nightcrawler day, Spartan Day, new sounds.
2.9: Fixed Deathmatch day, nightcrawler day, stopped sound on round end
3.0: Fixed Crash of shark day, added only one day/ round
3.1: Added ColorChat option.
3.2: Fixed index out of bounds error.


Credits:

Toast: For the base of the plugin
All the guys that helped me solve bugs
And everyone i forgot.


Notes:

I never though i would ever make this public, but since i stopped my jailbreak, due to few players, i'm releasing it.

The shops points are cookies, because the clan i made this for it called Cookie Force, so it was funny to make it cookies.

To disable ColorChat, comment define USE_CC on line 83

*/
#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <cstrike>
#include <hamsandwich>
#include <fakemeta>
#include <engine>
#include <nvault>

#define USE_CC

#if defined USE_CC
#include <colorchat>
#endif

///////////////
// =Defines= //
///////////////

#define VERSION "3.2"

#define IsPlayer(%1) (1<=%1<=g_max_clients)

#define REQUIRED_ADMIN_LEVEL ADMIN_KICK
#define ADMIN_VOICE ADMIN_MENU

#define OFFSET_PRIMARYWEAPON        116 

/////////////////////////////////////////////////////////


//////////////////
// =New things= //
//////////////////
#if defined USE_CC
    
new const PREFIX[] = "[ Jail-Break ]" // Prefix 
#else
    
new const PREFIX[] = "[ Jail-Break ]" // Normal prefix
#endif

new g_max_clients        //client check

//    Cvars    
new cvar_killpoints        // How many Cookies a terrorist gets for 1 ct kill
new cvar_gunprice        // How many Cookies a gun costs
new cvar_pillsprice        // How many Cookies pills costs
new cvar_armorprice        // How many Cookies armor costs
new cvar_camoprice        // How many Cookies camo costs
new cvar_nadepackprice    // How many Cookies nades cost
new cvar_headshotpoints    // How many extra points a t gets for killing a ct
new cvar_days            // Is days hud should be displayed or not
new cvar_showplayers    // Shows the players in a nice hud message
new cvar_shop            // Open or close the shop
new cvar_showrebels        // Show rebels in chat
new cvar_tvoiceblock     // Block T's from using voicechat
new cvar_daysmenu        // Enables the days menu
new cvar_teleport        // Enables/disables teleport on LR

//   Points system     
new playerpoints[33]    // Amount of Cookies a player has
new g_vault                // Open a new vault to store a players points.

//     Other Stuff
new days

new g_guards
new g_prisoners

new beacon_sprite

new lrgame[33]
enum 
{
    
LR_NONE,
    
LR_KNIFE,
    
LR_S4S,
    
LR_NADE,
    
LR_SCOUT,
    
LR_RACE,
    
LR_SPRAY,
    
LR_TOSS,
    
LR_SHOTWAR,
    
LR_SPECIAL,
    
LR_REBEL
}

new 
specialday[21]
enum
{
    
DAY_NONE,
    
DAY_MUSIC,
    
DAY_GRAV,
    
DAY_FREEDAY,
    
DAY_ZOMBIE,
    
DAY_LAVA,
    
DAY_SHARK,
    
DAY_CAGE,
    
DAY_DM,
    
DAY_NIGHT,
    
DAY_SPARTAN
}

// Sounds
new musicday_song[]     = "sound/music1.mp3"
new musicday_song2[]     = "sound/music3.mp3"
new musicday_song3[]    = "sound/misc/Cops-BadBoys.mp3"
new alarm[]             = "sound/misc/alarm.mp3"
new race_go[]             = "sound/jailbreak/race_go.mp3"
new s4ssound[]             = "sound/jailbreak/s4s.mp3"
new spartansound[]         = "sound/jailbreak/spartan_day.mp3"
new zombiesound[]         = "sound/jailbreak/zombie_day.mp3"

new timer
new name[33]

////////////////////////////////////////////////////////////////

////////////////
// =Booleans= //
////////////////

new boollr_started            // Is last request?
new boolgot_camo[33]            // Does player got camo?
new boolgravityday            // Is today a gravity day?    
new boolspray_on                // Is spray contest on?
new boolis_lr_s4s                // Is lr shot 4 shot?
new boolshot_deagle[33]        // Did he shoot his deagle?
new boolis_rebel[33]            // Is the player a rebel?
new boolcan_have_gun[33]      // Can he have a gun?
new boollr_next_special[33]    // Specialday next round
new boolgot_name false        // Got the players name on cd?
new boolcountdown_on false    // Is counting down?

new bool:g_connected[33]



///////////////////////////////////////////////////////////////

//////////////
// =Stocks= //
//////////////

stock check_user(index)
{
    if(!
is_user_connected(index) ||(is_user_bot(index)))
    {
        return 
PLUGIN_HANDLED
    
}
    return 
PLUGIN_CONTINUE
}

stock strip_weapons(index)
{

    
strip_user_weapons(index)
    
set_pdata_int(indexOFFSET_PRIMARYWEAPON0)
    
give_item(index"weapon_knife")


//////////////////////////////////////////////////////////////
//---------------PLUGIN INIT--------------------------------//
//////////////////////////////////////////////////////////////

public plugin_init()
{
    
register_plugin("CF Jailbreak"VERSION"Drekes")
    
    
//cvars
    
cvar_killpoints register_cvar("jb_points_kill""2")
    
cvar_gunprice register_cvar("jb_shop_gunprice""15")
    
cvar_pillsprice register_cvar("jb_shop_pillsprice""7")
    
cvar_armorprice register_cvar("jb_shop_armorprice""7")
    
cvar_camoprice register_cvar("jb_shop_camoprice""20")
    
cvar_showplayers register_cvar("jb_show_players""1")
    
cvar_days register_cvar("jb_days""0")
    
cvar_shop register_cvar("jb_shop""1")
    
cvar_headshotpoints register_cvar("jb_points_headshot""2")
    
cvar_nadepackprice register_cvar("jb_shop_nadepack_price""10")
    
cvar_showrebels register_cvar("jb_show_rebels""1")
    
cvar_tvoiceblock register_cvar("jb_blocktvoice""1")
    
cvar_daysmenu register_cvar("jb_enable_days""0")
    
cvar_teleport register_cvar("jb_teleport""1")
    
    
register_cvar("cfjail_version"VERSIONFCVAR_SERVER|FCVAR_EXTDLL|FCVAR_UNLOGGED|FCVAR_SPONLY)

    
RegisterHam(Ham_Spawn"player""Event_Playerspawn"1)
    
RegisterHam(Ham_Weapon_PrimaryAttack"weapon_deagle""fw_primary_attack")
    
RegisterHam(Ham_TakeDamage"player""Event_TakeDamage")
    
    
register_forward(FM_Voice_SetClientListening"FwdSetVoice");

    
//Events
    
register_event("DeathMsg""Event_Deathmsg""a")
    
register_logevent("Event_Roundend"2"1=Round_End"
    
register_logevent("Event_Roundstart"2"1=Round_Start")
    
register_event("CurWeapon""Event_CurWeapon""be","1=1")

    
    
//client commands
    
register_clcmd("say /lr""lr_check")
    
register_clcmd("say !lr""lr_check")
    
register_clcmd("say /rules""showrules")
    
register_clcmd("say_team /rules""showrules")
    
register_clcmd("say /shop""cmd_shop")
    
register_clcmd("say_team /shop""cmd_shop")
    
register_clcmd("say /daysmenu""specialday_check")
    
register_concmd("say /countdown""cdmenu")
    
register_concmd("say /cd""cdmenu")
    
    
//Console (admin) Commands
    
register_concmd("amx_take_points""cmd_take_points"ADMIN_KICK"<target> <amount>")
    
register_concmd("amx_give_points""cmd_give_points"ADMIN_KICK"<target> <amount>")

    
//Other Things
    
g_max_clients get_maxplayers()
    
    
g_vault nvault_open("jbpoints")    // Open a vault for the points
    
    
set_task(1.0"players_hud"0__"b")
}

///////////////////////////////////////////////////
//--------------PRECACHE-------------------------//
///////////////////////////////////////////////////
public plugin_precache()
{
    
precache_generic(musicday_song)
    
precache_generic(musicday_song2)
    
precache_generic(musicday_song3)
    
precache_generic(alarm)
    
precache_generic(race_go)
    
precache_generic(s4ssound)
    
precache_generic(spartansound)
    
precache_generic(zombiesound)
    
    
precache_sound("fvox/one.wav")
    
precache_sound("fvox/two.wav")
    
precache_sound("fvox/three.wav")
    
precache_sound("fvox/four.wav")
    
precache_sound("fvox/five.wav")
    
precache_sound("fvox/six.wav")
    
precache_sound("fvox/seven.wav")
    
precache_sound("fvox/eight.wav")
    
precache_sound("fvox/nine.wav")
    
precache_sound("fvox/ten.wav")
    
precache_sound("fvox/eleven.wav")
    
precache_sound("fvox/twelve.wav")
    
precache_sound("fvox/thirteen.wav")
    
precache_sound("fvox/fourteen.wav")
    
precache_sound("fvox/fifteen.wav")
    
precache_sound("radio/com_go.wav")
    
    
precache_model("models/player/gign/gign.mdl")
    
    
beacon_sprite precache_model("sprites/shockwave.spr")
}
///////////////////////////////////////////////////
//-------------PLAYER SPAWN----------------------//
///////////////////////////////////////////////////
public Event_Playerspawn(id)
{
    if(!
IsPlayer(id))
        return 
PLUGIN_HANDLED
        
    
if(is_user_alive(id))
    {
        if(
cs_get_user_team(id) == CS_TEAM_CT)
        {
            
strip_weapons(id)
            
gun_check(id)
        }
        
        if(
cs_get_user_team(id) == CS_TEAM_T)
        {
            if(
got_camo[id])
            {
                
cs_reset_user_model(id)
                
got_camo[id] = false
            
}
            
            if(
lr_next_special[id])
            {
                
specialday_menu(id)
                
lr_next_special[id] = false
            
}

            if(
is_rebel[id])
                
unrebel(id)
                
            
strip_weapons(id)
            
lr_started false
            is_rebel
[id] = false
            lrgame
[id] = LR_NONE
        
}
        
can_have_gun[id] = true
        set_user_rendering
(id)
    }
    
specialday[20] = DAY_NONE
    
return PLUGIN_HANDLED
}

//////////////////////////////////////////////////////////////////
//--------------------PLAYER DEATH------------------------------//
//////////////////////////////////////////////////////////////////
public Event_Deathmsg()
{
    new 
attacker read_data(1)
    new 
victim read_data(2)
    new 
headshot read_data(3)
    
    new 
AttackerName[32]
    new 
VictimName[32]
    
    
get_user_name(attackerAttackerName31)
    
get_user_name(victimVictimName,31)
    
    if(!
IsPlayer(attacker))
        return 
PLUGIN_HANDLED
        
    
if(!IsPlayer(victim))
        return 
PLUGIN_HANDLED

    
if( cs_get_user_team(attacker) == CS_TEAM_CT && cs_get_user_team(victim) == CS_TEAM_T)
    {
        if(
get_pcvar_num(cvar_showrebels) && !lr_started)
        {
            if(!
is_rebel[victim])
            {
                
#if defined USE_CC
                    
ColorChat(0GREEN"%s^x01 Guard^x03 %s^x01 killed^x04 prisoner^x03 %s!"PREFIXAttackerNameVictimName)
                
#else
                    
client_print(0print_chat"%s Guard %s killed prisoner %s!"PREFIXAttackerNameVictimName)
                
#endif
            
}
        
            else
            {
                
#if defined USE_CC
                    
ColorChat(0GREEN"%s^x01 Guard^x03 %s^x01 killed^x04 rebel^x03 %s!"PREFIXAttackerNameVictimName)
                
#else
                    
client_print(0print_chat"%s Guard %s killed rebel %s"PREFIXAttackerNameVictimName)
                
#endif
                
unrebel(victim)
            }
        }
    }
    
    if( 
cs_get_user_team(attacker) == CS_TEAM_T && cs_get_user_team(victim) == CS_TEAM_CT)
    {
        
playerpoints[attacker] += get_pcvar_num(cvar_killpoints)
        
        if(
headshot)
            
playerpoints[attacker] += get_pcvar_num(cvar_headshotpoints);
            
        if(
lr_started)
        {
            if(
is_lr_s4s)
                
is_lr_s4s false
            
            
if(lrgame[attacker] != LR_REBEL)
                
strip_weapons(attacker)
                
            
lr_started false
            lrgame
[attacker] = LR_NONE
        
}
    }
    
    if(
spray_on)
    {
        
server_cmd("decalfrequency 20")
        
spray_on false
    
}
    
    if(
task_exists(attacker))
        
remove_task(attacker)
        
    if(
task_exists(victim))
        
remove_task(victim)
    
    
SaveData(attacker)
    
    return 
PLUGIN_HANDLED
}  
    
////////////////////////////////////////////////////////////
//-----------------ROUND END/ ROUND START-----------------//
////////////////////////////////////////////////////////////
public Event_Roundend()
{
    if(
gravityday)
    {
        
server_cmd("sv_gravity 800")
        
gravityday false
    
}

    if(
specialday[20] == DAY_DM)
        
server_cmd("mp_friendlyfire 0")
        
    
client_cmd(0"mp3 stop")
    
client_cmd(0"stopsound")
}    
public 
Event_Roundstart()
{
    if(
get_pcvar_num(cvar_days))
    {
        
days ++
    }
    if(
get_pcvar_num(cvar_showplayers))
    {
        
g_guards 0
        g_prisoners 
0
    
}
}

/////////////////////////////////////////////////////
//-----------------TAKE DAMAGE---------------------//
/////////////////////////////////////////////////////
public Event_TakeDamage(victimweaponattackerfloatdamagedamagebits)
{
    if(
IsPlayer(victim) && IsPlayer(attacker))
    {
        if(
get_pcvar_num(cvar_showrebels) && !is_rebel[attacker] && !lr_started && IsPlayer(attacker) && IsPlayer(victim))
        {
            if(
victim != attacker && attacker != 0)
            {
                if(
cs_get_user_team(attacker) == CS_TEAM_T && cs_get_user_team(victim) == CS_TEAM_CT)
                {
                    
make_rebel(attackervictim)
                }
            }
        }
    }
}
    
/////////////////////////////////////////////////////
//-----------------PLAYER DISCONNECTS--------------//
/////////////////////////////////////////////////////
public client_disconnect(id)
{
    
SaveData(id
    
g_connected[id] = false;
}

//////////////////////////////////////////////////////
//----------------CLIENT PUTINSERVER----------------//
//////////////////////////////////////////////////////
public client_putinserver(id)  
    
g_connected[id] = true;
//////////////////////////////////////////////////////
//-----------------SOMETHING ELSE-------------------//
//////////////////////////////////////////////////////
public Player_Jump(id)
{
    if( 
is_user_alive(id) && entity_get_float(idEV_FL_fuser2) > 0.0 )
    {
        
entity_set_float(idEV_FL_fuser20.0)
    }
}


//////////////////////////////////////////////////////
//-----------ON MAP CHANGE OR SERVER CRASH----------//
//////////////////////////////////////////////////////
public plugin_end()
{
    
nvault_close(g_vault)
}

//////////////////////////////////////////////////////
//---------------CT GUN MENU------------------------//
//////////////////////////////////////////////////////
public gun_check(id)
{
    if(
IsPlayer(id) && cs_get_user_team(id) == CS_TEAM_CT)
    {
        
primgun_menu(id)
    }
    return 
PLUGIN_HANDLED
}

//////////////////////////////////////////////////////
//----------------MAKE REBEL------------------------//
//////////////////////////////////////////////////////
public make_rebel(attackervictim)
{
    new 
attackername[33], victimname[33]
    
get_user_name(attackerattackername32)
    
get_user_name(victimvictimname32)
    
    
#if defined USE_CC
        
ColorChat(0GREEN"%s^x03 %s^x01 is now a^x04 rebel"PREFIXattackername)
    
#else
        
client_print(0print_chat"%s %s is now a rebel!"PREFIXattackername)
    
#endif
    
    
set_user_rendering(attackerkRenderFxGlowShell25500kRenderNormal16)
    
client_cmd(0"mp3 play ^"%s^""alarm)
    
is_rebel[attacker] = true
}

/////////////////////////////////////////////////////
//--------------UNDO REBEL-------------------------//
/////////////////////////////////////////////////////
public unrebel(id)
{
    if(
is_user_connected(id))
    {
        
set_user_rendering(idkRenderFxGlowShell255255255kRenderNormal255)
        
is_rebel[id] = false
    
}
}
/*========================PRIMARY WEAPON======================*/

public primgun_menu(id)
{    
    if(!
IsPlayer(id))
        return 
PLUGIN_HANDLED
        
    
new primgunmenu menu_create("\yChoose your weapon:""sub_primgun_menu")

    
menu_additem(primgunmenu"\wM4a1""1"0);
    
menu_additem(primgunmenu"\wAk 47""2"0);
    
menu_additem(primgunmenu"\wScout""3"0);
    
menu_additem(primgunmenu"\wAwp""4"0);
    
menu_additem(primgunmenu"\wMp5""5"0);
        
    
menu_setprop(primgunmenuMPROP_EXITMEXIT_ALL);
    
menu_display(idprimgunmenu0);
    return 
PLUGIN_HANDLED
}    

public 
sub_primgun_menu(idprimgunmenuitem)
{
    
    if (
item == MENU_EXIT)
    {
        
menu_destroy(primgunmenu);
        return 
PLUGIN_HANDLED;
    }
    
    new 
Data[7], Name[64];
    new 
AccessCallback;
    
menu_item_getinfo(primgunmenuitemAccessData,5Name63Callback);
    
    new 
Key str_to_num(Data);
    
    switch (
Key)
    {
        case 
1:
        {
            
primgun1(id)
        }
        case 
2
        {
            
primgun2(id)
        }
        case 
3:
        {
            
primgun3(id)
        }
        case 
4:
        {
            
primgun4(id)
        }
        case 
5:
        {
            
primgun5(id)
        }
    }
    
    
menu_destroy(primgunmenu);
    return 
PLUGIN_HANDLED;
}

public 
primgun1(id)
{
    
give_item(id"weapon_m4a1")
    
give_item(id"weapon_usp")
    
cs_set_user_bpammo(idCSW_USP100)
    
cs_set_user_bpammo(idCSW_M4A1200)
}

public 
primgun2(id)
{
    
give_item(id"weapon_ak47")
    
give_item(id"weapon_usp")
    
cs_set_user_bpammo(idCSW_USP100)
    
cs_set_user_bpammo(idCSW_AK47200)
}

public 
primgun3(id)
{
    
give_item(id"weapon_scout")
    
give_item(id"weapon_usp")
    
cs_set_user_bpammo(idCSW_USP100)
    
cs_set_user_bpammo(idCSW_SCOUT200)
}

public 
primgun4(id)
{
    
give_item(id"weapon_awp")
    
give_item(id"weapon_usp")
    
cs_set_user_bpammo(idCSW_USP100)
    
cs_set_user_bpammo(idCSW_AWP200)
}    

public 
primgun5(id)
{
    
give_item(id"weapon_mp5navy")
    
give_item(id"weapon_usp")
    
cs_set_user_bpammo(idCSW_USP100)
    
cs_set_user_bpammo(idCSW_MP5NAVY200)
}
///////////////////////////////////////////////////////////////
//--------------------RULES MOTD-----------------------------//
///////////////////////////////////////////////////////////////
public showrules(id)
{
    
show_motd(id"jailrules.txt""Jailbreak Rules")
}

//////////////////////////////////////////////////////////////////
//----------------POINTS SAVE AND LOAD--------------------------//
//////////////////////////////////////////////////////////////////
public SaveData(id
{  
    new 
authid[32];
    
get_user_authid(id,authid,31);

    new 
vaultkey[64], vaultdata[64];

    
//Save their points     
    
format(vaultkey,63,"jb-%s-points",authid);     
    
format(vaultdata,63,"%d",playerpoints[id]);     
    
set_vaultdata(vaultkey,vaultdata);  
}

public 
LoadData(id
{
    new 
authid[32]; 
    
get_user_authid(id,authid,31); 

    new 
vaultkey[64], vaultdata[64]; 
    
//Load their points
    
format(vaultkey,63,"jb-%s-points",authid); 
    
get_vaultdata(vaultkey,vaultdata,63); 
    
playerpoints[id] = str_to_num(vaultdata); 
}

//////////////////////////////////////////////////////////////
//----------------THE SHOP----------------------------------//
//////////////////////////////////////////////////////////////
public cmd_shop(id)
{
    if(!
get_pcvar_num(cvar_shop))
    {
        
#if defined USE_CC
            
ColorChat(idRED"%s We are currently working on the shop, it will be opened soon."PREFIX)
        
#else
            
client_print(idprint_chat"%s We are currently working on the shop, it will be opened soon."PREFIX)
        
#endif
        
        
return PLUGIN_HANDLED
    
}
    if(
cs_get_user_team(id) != CS_TEAM_T)
    {
        
#if defined USE_CC
            
ColorChat(idRED"%s Only^x03 prisoners^x04 can use the shop"PREFIX)
        
#else
            
client_print(idprint_chat"%s Only prisoners can use the shop!"PREFIX)
        
#endif
        
        
return PLUGIN_HANDLED;
    }
    
    if(
lr_started)
    {
        
#if defined USE_CC
            
ColorChat(idRED"%s You can use the shop while last request is activated"PREFIX)
        
#else
            
client_print(idprint_chat"%s You can't use the shop while last request is activated!"PREFIX)
        
#endif
        
        
return PLUGIN_CONTINUE
    
}
    
    if(
is_rebel[id])
    {
        
#if defined USE_CC
            
ColorChat(idRED"%s Rebelse can't use the shop"PREFIX)
        
#else
            
client_print(idprint_chat"%s Rebels can't use the shop!"PREFIX)
        
#endif
        
        
return PLUGIN_HANDLED
    
}
    
    if(!
is_user_alive(id))
    {
        
#if defined USE_CC
            
ColorChat(idRED"%s You must be^x03 alive^x04 to use the shop"PREFIX)
        
#else
            
client_print(idprint_chat"%s You must be alive to use the shop!"PREFIX)
        
#endif
        
        
return PLUGIN_HANDLED
    
}
    
    else if(
cs_get_user_team(id) == CS_TEAM_T)
    {
        
shopmenu(id)
    }
    return 
PLUGIN_HANDLED
}

public 
shopmenu(id)
{
    if(
is_user_alive(id) && cs_get_user_team(id) == CS_TEAM_T)
    {
        new 
szText[555 char]
        new 
points playerpoints[id]
    
        
formatex(szTextcharsmax(szText), "Jailbreak Shop^nYour Cookies: %d"points)
        new 
shopmenu menu_create(szText"sub_shopmenu")
        
        
formatex(szTextcharsmax(szText), "Gun Gamble: %d Cookies"get_pcvar_num(cvar_gunprice))
        
menu_additem(shopmenuszText"1"0)
        
        
formatex(szTextcharsmax(szText), "Health Cookies %d Cookies"get_pcvar_num(cvar_pillsprice))
        
menu_additem(shopmenuszText"2" 0)
        
        
formatex(szTextcharsmax(szText), "Armor: %d Cookies"get_pcvar_num(cvar_armorprice))
        
menu_additem(shopmenuszText"3"0)

        
formatex(szTextcharsmax(szText), "Camouflage: %d Cookies"get_pcvar_num(cvar_camoprice))
        
menu_additem(shopmenuszText"4"0)
        
        
formatex(szTextcharsmax(szText), "Nade pack: %d Cookies"get_pcvar_num(cvar_nadepackprice))
        
menu_additem(shopmenuszText"5"0)
        
        
menu_setprop(shopmenuMPROP_EXIT MEXIT_ALL);
        
menu_display(idshopmenu0);
    }
    return 
PLUGIN_HANDLED
}

public 
sub_shopmenu(idshopmenuitem)  
{
    if (
item == MENU_EXIT)
    {
        
menu_destroy(shopmenu);
        return 
PLUGIN_HANDLED;
    }
    
    new 
Data[7], Name[64];
    new 
AccessCallback;
    
menu_item_getinfo(shopmenuitemAccessData,5Name63Callback);
    
    new 
Key str_to_num(Data);
    
    switch (
Key)
    {
        case 
1:
        {
            if(
playerpoints[id] < get_pcvar_num(cvar_gunprice))
            {
                
#if defined USE_CC
                    
ColorChat(idRED"%s You don't have enough^x03 Cookies^x04 to buy that item"PREFIX)
                
#else
                    
client_print(idprint_chat"%s You don't got enough Cookies to buy that item"PREFIX)
                
#endif
            
                
return PLUGIN_HANDLED
            
}
            
            else
            {
                
gun_gamble(id)
            }
        }
        
        case 
2
        {
            if(
playerpoints[id] < get_pcvar_num(cvar_pillsprice))
            {
                
#if defined USE_CC
                    
ColorChat(idRED"%s You don't have enough^x03 Cookies^x04 to buy that item"PREFIX)
                
#else
                    
client_print(idprint_chat"%s You don't got enough Cookies to buy that item"PREFIX)
                
#endif
                
                
return PLUGIN_HANDLED
            
}
            
            else
            {
                
give_pills(id)
            }
        }
        
        case 
3:
        {
            if(
playerpoints[id] < get_pcvar_num(cvar_armorprice))
            {
                
#if defined USE_CC
                    
ColorChat(idRED"%s You don't have enough^x03 Cookies^x04 to buy that item"PREFIX)
                
#else
                    
client_print(idprint_chat"%s You don't got enough Cookies to buy that item"PREFIX)
                
#endif            

                
return PLUGIN_HANDLED
            
}
            
            else
            {
                
give_armor(id)
            }
        }
        
        case 
4:
        {
            if(
playerpoints[id] < get_pcvar_num(cvar_camoprice))
            {
                
#if defined USE_CC
                    
ColorChat(idRED"%s You don't have enough^x03 Cookies^x04 to buy that item"PREFIX)
                
#else
                    
client_print(idprint_chat"%s You don't got enough Cookies to buy that item"PREFIX)
                
#endif            

                
return PLUGIN_HANDLED
            
}
            
            else
            {
                
give_camo(id)
            }
        }
        
        case 
5:
        {
            if(
playerpoints[id] < get_pcvar_num(cvar_nadepackprice))
            {
                
#if defined USE_CC
                    
ColorChat(idRED"%s You don't have enough^x03 Cookies^x04 to buy that item"PREFIX)
                
#else
                    
client_print(idprint_chat"%s You don't got enough Cookies to buy that item"PREFIX)
                
#endif            

                
return PLUGIN_HANDLED
            
}
            
            else
            {
                
give_nadepack(id)
            }
        }
    }
    
menu_destroy(shopmenu);
    return 
PLUGIN_HANDLED;
}
        
public 
gun_gamble(id)
{
    if(
random_num(13) == 1)
    {
        
#if defined USE_CC
            
ColorChat(idRED"%s You gambled for a pistol and^x03 you got it!"PREFIX)
        
#else
            
client_print(idprint_chat"%s You gambled for a pistol and you got it!"PREFIX)
        
#endif
        
        
give_item(id"weapon_deagle");
    }
    
    else
    {
        
user_kill(id)
        
        
#if defined USE_CC
            
ColorChat(idRED"%s You gambled for a pistol and^x03 died"PREFIX)
        
#else
            
client_print(idprint_chat"%s You gambled for a pistol and died."PREFIX)
        
#endif
    
}    
    
    
playerpoints[id] -= get_pcvar_num(cvar_gunprice)
    
    return 
PLUGIN_HANDLED
}
        
public 
give_pills(id)
{
    new 
health get_user_health(id) + 50

    set_user_health
(idhealth)
    
    
#if defined USE_CC
        
ColorChat(idRED"%s You bought^x03 pills."PREFIX)
    
#else
        
client_print(idprint_chat"%s You bought pills."PREFIX)
    
#endif
    
    
playerpoints[id] -= get_pcvar_num(cvar_pillsprice)
    
    return 
PLUGIN_HANDLED
}
        
public 
give_armor(id)
{
    new 
armor get_user_armor(id) + 50
    
    set_user_armor
(idarmor)
    
    
#if defined USE_CC
        
ColorChat(idRED"%s You bought^x03 armor."PREFIX)
    
#else
        
client_print(idprint_chat"%s You bought armor."PREFIX)
    
#endif
    
    
playerpoints[id] -= get_pcvar_num(cvar_armorprice

    return 
PLUGIN_HANDLED
}

public 
give_camo(id)
{
    
cs_set_user_model(id"gign")
    
got_camo[id] = true
    
    
#if defined USE_CC
        
ColorChat(idRED"%s You bought^x03 camo."PREFIX)
    
#else
        
client_print(idprint_chat"%s You bought camo."PREFIX)
    
#endif
    
    
playerpoints[id] -= get_pcvar_num(cvar_camoprice)

    return 
PLUGIN_HANDLED
}

public 
give_nadepack(id)
{
    
give_item(id"weapon_flashbang")
    
give_item(id"weapon_hegrenade")
    
give_item(id"weapon_smokegrenade")    
    
    
#if defined USE_CC
        
ColorChat(idRED"%s You bought^x03 a nade pack"PREFIX)
    
#else
        
client_print(idprint_chat"%s you bought a nade pack"PREFIX)
    
#endif
    
    
playerpoints[id] -= get_pcvar_num(cvar_nadepackprice)

    return 
PLUGIN_HANDLED
}

////////////////////////////////////////////////////////////////////
//--------------------GIVE/TAKE POINTS----------------------------//
////////////////////////////////////////////////////////////////////
public cmd_give_points(id,level,cid)
{
    if(!
cmd_access(id,level,cid,3))
        return 
PLUGIN_HANDLED;
 
    new 
target[32], amount[21], reason[21];
 
    
read_argv(1target31 );
    
read_argv(2amount20 );
    
read_argv3reason20 );
 
    new 
player cmd_targetidtarget);
 
    if( ! 
player 
        return 
PLUGIN_HANDLED;
 
    new 
admin_name[32], player_name[32];
    
get_user_name(idadmin_name31);
    
get_user_name(playerplayer_name31);
 
    new 
pointnum str_to_num(amount);
 
    
playerpoints[player] += pointnum;
 
    switch(
get_cvar_num ("amx_show_activity"))
    {
        case 
1client_print0print_chat"%s ADMIN: gave %i points for %s.",PREFIXpointnumplayer_name );
        case 
2client_print0print_chat"%s ADMIN %s: gave %i points for %s.",PREFIXadmin_namepointnumplayer_name );
    }
    
    
client_print(playerprint_chat"%s You received %i points.(Total: %d)",PREFIXpointnumplayerpoints[player]);
 
    
SaveDataid )
 
    return 
PLUGIN_CONTINUE;
}
 
public 
cmd_take_points(id,level,cid)
{
    if(!
cmd_access (idlevelcid3))
        return 
PLUGIN_HANDLED;
 
    new 
target[32], amount[21], reason[21];
 
    
read_argv1target31 );
    
read_argv2amount20 );
    
read_argv3reason20 );
 
    new 
player cmd_targetidtarget);
 
    if(!
player 
        return 
PLUGIN_HANDLED;
 
    new 
admin_name[32], player_name[32];
    
get_user_nameidadmin_name31 );
    
get_user_nameplayerplayer_name31 );
 
    new 
pointnum str_to_numamount );
 
    
playerpoints[player] -= pointnum;
    
    switch(
get_cvar_num("amx_show_activity"))
    {
        case 
1client_print0print_chat"%s ADMIN: took %i points from %s.",PREFIX,  pointnumplayer_name );
        case 
2client_print0print_chat"%s ADMIN %s: took %i points from %s.",PREFIXadmin_namepointnumplayer_name );
    }
    
    
client_printplayerprint_chat"You lost %i points. (Total: %d)"pointnumplayerpoints[player] );
 
    
SaveDataid )
 
    return 
PLUGIN_CONTINUE;
}

/////////////////////////////////////////////////////////////
//--------------------COUNTDOWN STUFF----------------------//
/////////////////////////////////////////////////////////////
public cdmenu(id)
{
    if(
get_user_team(id) != 2)
    {
        
#if defined USE_CC
            
ColorChat(idGREEN"%s^x01 Only^x04 Counter-terrorists^x01 can start a^x04 countdown"PREFIX)
        
#else
            
client_print(idprint_chat"%s Only Counter-terrorist can start a countdown"PREFIX)
        
#endif
        
        
return PLUGIN_HANDLED
    
}
    
    if(
countdown_on)
    {
        
#if defined USE_CC
                 
ColorChat (idGREEN"%s^x01 There is already a^x04 countdown on"PREFIX)
        
#else
            
client_print(idprint_chat"%s There is already a countdown on"PREFIX)
        
#endif
        
        
return PLUGIN_HANDLED
    
}
    
    new 
menu menu_create("\yCountDown Menu""menu_handler")
    
    
menu_additem(menu"\w5 Seconds""1"0)
    
menu_additem(menu"\w10 Seconds""2"0)
    
menu_additem(menu"\w15 Seconds""3"0)
    
    
menu_setprop(menuMPROP_EXITMEXIT_ALL)
    
menu_display(idmenu0)
    
    return 
PLUGIN_HANDLED
}

public 
menu_handler(idmenuitem)
{
    if(
item == MENU_EXIT)
    {
        
menu_destroy(menu)
        return 
PLUGIN_HANDLED
    
}
    
    new 
Data[7], Name[64]
    new 
AccessCallback
    menu_item_getinfo
(menuitemAccessData,5Name63Callback)
    
    new 
Key str_to_num(Data)
    
    switch(
Key)
    {
        case 
1:
        {
            
timer 5
        
}
        
        case 
2:
        {
            
timer 10
        
}
            
        case 
3:
        {
            
timer 15
        
}
    }
    
countdown_on true
    got_name 
false
    countdown
(id)
    
menu_destroy(menu)
    return 
PLUGIN_HANDLED
}

public 
countdown(id)
{
    if(!
got_name)
        
get_user_name(idname32)
        
    switch(
timer)
    {
        case 
0:
        {
            
set_hudmessage(255255255, -1.0, -1.006.03.0)
            
show_hudmessage(0"Go go go")
            
client_cmd(0"spk ^"sound/radio/com_go.wav^"")
            
countdown_on false
        
}
        
        case 
1:
        {
            
client_cmd(0"spk ^"fvox/one.wav^"")
            
set_task(1.0"countdown"0)
        }
        
        case 
2:
        {
            
client_cmd(0"spk ^"fvox/two.wav^"")
            
set_task(1.0"countdown"0)
        }
            
        case 
3:
        {
            
client_cmd(0"spk ^"fvox/three.wav^"")
            
set_task(1.0"countdown"0)
        }
        
        case 
4:
        {
            
client_cmd(0"spk ^"fvox/four.wav^"")
            
set_task(1.0"countdown"0)
        }
        
        case 
5:
        {
            
client_cmd(0"spk ^"fvox/five.wav^"")
            
set_task(1.0"countdown"0)
        }
        
        case 
6:
        {
            
client_cmd(0"spk ^"fvox/six.wav^"")
            
set_task(1.0"countdown"0)
        }
        case 
7:
        {
            
client_cmd(0"spk ^"fvox/seven.wav^"")
            
set_task(1.0"countdown"0)
        }
        
        case 
8:
        {
            
client_cmd(0"spk ^"fvox/eight.wav^"")
            
set_task(1.0"countdown"0)
        }
            
        case 
9:
        {
            
client_cmd(0"spk ^"fvox/nine.wav^"")
            
set_task(1.0"countdown"0)
        }
            
        case 
10:
        {
            
client_cmd(0"spk ^"fvox/ten.wav^"")        
            
set_task(1.0"countdown"0)
        }
        
        case 
11:
        {
            
client_cmd(0"spk ^"fvox/eleven.wav^"")
            
set_task(1.0"countdown"0)
        }
        
        case 
12:
        {
            
client_cmd(0"spk ^"fvox/twelve.wav^"")
            
set_task(1.0"countdown"0)
        }
            
        case 
13:
        {
            
client_cmd(0"spk ^"fvox/thirteen.wav^"")
            
set_task(1.0"countdown"0)
        }
            
        case 
14:
        {
            
client_cmd(0"spk ^"fvox/fourteen.wav^"")
            
set_task(1.0"countdown"0)
        }
        
        case 
15:
        {
            
client_cmd(0"spk ^"fvox/fifteen.wav^"")
            
set_task(1.0"countdown"0)
        }
    }
    
    if(
timer != 0)
    {
        
set_hudmessage(255255255, -1.0, -1.006.03.0)
        
show_hudmessage(0"%s started countdown: %i"nametimer)
        
timer--
    }
    
got_name true
}

/////////////////////////////////////////////////////////////
//-----------------THE DAYS MENU---------------------------//
/////////////////////////////////////////////////////////////
public specialday_check(id)
{
    if(!
get_pcvar_num(cvar_daysmenu))
    {
        
#if defined USE_CC
            
ColorChat(idGREEN"%s^x04 Days^x01 are^x04 disabled"PREFIX)
        
#else
            
client_print(idprint_chat"%s Days are disabled"PREFIX)
        
#endif
        
        
return PLUGIN_HANDLED
    
}
    
    if(
get_user_team(id) != 2)
    {
        
#if defined USE_CC
            
ColorChat(idRED"%s Only^x03 CT's^x04 can start a^x03 special day"PREFIX)
        
#else
            
client_print(idprint_chat"%s Only CT's can start a special day"PREFIX)
        
#endif
        
        
return PLUGIN_HANDLED
    
}
    
    if(!
is_user_alive(id))
    {    
        
#if defined USE_CC
            
ColorChat(idRED"%s You have to be^x03 alive^x04 to start a^x03 special day"PREFIX)
        
#else
            
client_print(idprint_chat"%s You have to be alive to start a special day"PREFIX)
        
#endif
        
        
return PLUGIN_HANDLED
    
}
    
    if(
specialday[20] != DAY_NONE)
    {
        
#if defined USE_CC
            
ColorChat(idRED"%s There is already a day chosen"PREFIX)
        
#else
            
client_print(idprint_chat"%s There is already a day chosen"PREFIX)
        
#endif
        
        
return PLUGIN_HANDLED
    
}
    
    
specialday_menu(id)
    return 
PLUGIN_HANDLED
}

public 
specialday_menu(id)
{
    new 
specialdaymenu menu_create("\ySpecial Days:""specialday_submenu")
    
    
menu_additem(specialdaymenu"\wMusic Day""1"0);
    
menu_additem(specialdaymenu"\wGravity Day""2"0);
    
menu_additem(specialdaymenu"\wFreeday""3"0);
    
menu_additem(specialdaymenu"\wZombie Day""4"0);
    
menu_additem(specialdaymenu"\wLava Day""5"0);
    
menu_additem(specialdaymenu"\wShark Day""6"0);
    
menu_additem(specialdaymenu"\wCage Day""7"0);
    
menu_additem(specialdaymenu"\wDeathMatch Day""8"0);
    
menu_additem(specialdaymenu"\wNight Crawler Day""9"0)
    
menu_additem(specialdaymenu"\wSpartan Day""10"0)
        
    
menu_setprop(specialdaymenuMPROP_EXITMEXIT_ALL);
    
menu_display(idspecialdaymenu0);
}

public 
specialday_submenu(idspecialdaymenuitem)
{
    
    if (
item == MENU_EXIT)
    {
        
menu_destroy(specialdaymenu);
        return 
PLUGIN_HANDLED;
    }
    
    new 
Data[7], Name[64];
    new 
AccessCallback;
    
menu_item_getinfo(specialdaymenuitemAccessData,5Name63Callback);
    
    new 
Key str_to_num(Data);
    
    switch (
Key)
    {
        case 
1:
            
specialday[20] = DAY_MUSIC
        
        
case 2:
            
specialday[20] = DAY_GRAV
        
        
case 3:
            
specialday[20] = DAY_FREEDAY
        
        
case 4:
            
specialday[20] = DAY_ZOMBIE
        
        
case 5:
            
specialday[20] = DAY_LAVA
        
        
case 6:
            
specialday[20] = DAY_SHARK
        
        
case 7:
            
specialday[20] = DAY_CAGE
        
        
case 8:
            
specialday[20] = DAY_DM
        
        
case 9:
            
specialday[20] = DAY_NIGHT
        
        
case 10:
            
specialday[20] = DAY_SPARTAN
            
    
}    
    
    if(
IsPlayer(id) && is_user_alive(id))
        
do_specialday(id)
        
    
menu_destroy(specialdaymenu);
    return 
PLUGIN_HANDLED
}

public 
do_specialday(id)
{
    for(new 
0g_max_clientsi++)
    {
        switch(
specialday[20])
        {
            case 
DAY_MUSIC:
            {
                new 
musicmenu menu_create("\yMusic Choice""musicday_submenu")
    
                
menu_additem(musicmenu"\wPlay Music""1"0)
                
menu_additem(musicmenu"\wStop Music""2"0)
    
                
menu_setprop(musicmenu,MPROP_EXITMEXIT_ALL)
                
menu_display(idmusicmenu0)
            }
            
            case 
DAY_GRAV:
            {
                
server_cmd("sv_gravity 200")
            
                
#if defined USE_CC
                    
ColorChat(0RED"%s Today is^x03 Gravity day"PREFIX)
                
#else
                    
client_print(0print_chat"%s Today is Gravity day"PREFIX)
                
#endif
                
                
gravityday true
            
}
            
            case 
DAY_FREEDAY:
            {
                if(
IsPlayer(id) && is_user_alive(id))
                {
                    if(
cs_get_user_team(i) == CS_TEAM_T)
                        
set_user_rendering(ikRenderFxGlowShell25500kRenderNormal16)
                }
                
                
#if defined USE_CC
                    
ColorChat(0RED"%s Today is^x03 Freeday"PREFIX)
                
#else
                    
client_print(0print_chat"%s Today is Freeday"PREFIX)
                
#endif
            
}
            
            case 
DAY_ZOMBIE:
            {
                if(
IsPlayer(i) && is_user_alive(i))
                {    
                    switch(
cs_get_user_team(i))
                    {
                        case 
CS_TEAM_T:
                        {
                            
set_user_health(i150)
                            
                            
give_item(i"weapon_ak47")
                            
give_item(i"weapon_m4a1")
                            
                            
cs_set_user_bpammo(iCSW_AK4790)
                            
cs_set_user_bpammo(iCSW_M4A190)
                        }
                        
                        case 
CS_TEAM_CT:
                        {
                            if(
is_user_alive(i))
                            {
                                
set_user_health(i500)
                                
can_have_gun[i] = false
                            
}
                        }
                    }
                }
                
                
client_cmd(0"mp3 play ^"%s^""zombiesound)
                
                
#if defined USE_CC
                    
ColorChat(0RED"%s Today is^x03 Zombie Day"PREFIX)
                
#else
                    
client_print(0print_chat"%s Today is Zombie day"PREFIX)
                
#endif                
            
}
            
            case 
DAY_LAVA:
            {
                
#if defined USE_CC
                    
ColorChat(0RED"%s Today is^x03 Lava Day,^x03 Stand on a^x03 spray at all times"PREFIX)
                
#else
                    
client_print(0print_chat"%s Today is Lava day, Stand on a spray at all times"PREFIX)
                
#endif
            
}
            
            case 
DAY_SHARK:
            {
                if(
IsPlayer(i) && is_user_alive(i))
                {
                    switch(
cs_get_user_team(i))
                    {
                        case 
CS_TEAM_T:
                        {
                            
set_user_health(i200)
                            
                            
give_item(i"weapon_ak47")
                            
give_item(i"weapon_m4a1")
                            
                            
cs_set_user_bpammo(iCSW_AK4790)
                            
cs_set_user_bpammo(iCSW_M4A190)
                        }
                        
                        case 
CS_TEAM_CT:
                        {
                            if(
is_user_alive(i))
                            {
                                
set_user_noclip(i1)
                                
set_user_health(i300)
                            }
                        }
                    }
                    
                    
#if defined USE_CC
                        
ColorChat(0RED"%s Today is^x03 Shark Day"PREFIX)
                    
#else    
                        
client_print(0print_chat"%s Today is Shark day"PREFIX)
                    
#endif
                
}
            }
                
            case 
DAY_CAGE:
            {
                
#if defined USE_CC
                    
ColorChat(0RED"%s Today is cage day"PREFIX)
                
#else
                    
client_print(0print_chat"%s Today is a cage day"PREFIX)
                
#endif
            
}
            
            case 
DAY_DM:
            {
                
server_cmd("mp_friendlyfire 1")
                
                
#if defined USE_CC
                    
ColorChat(0RED"%s Today is^x03 Deathmatch Day,^x04 Last survivor chooses lr"PREFIX)
                
#else
                    
client_print(0print_chat"%s Today is Deathmatch Day, Last survivor chooses lr"PREFIX)
                
#endif
            
}
            
            case 
DAY_NIGHT:
            {
                if(
IsPlayer(i) && is_user_alive(i))
                {    
                    switch(
cs_get_user_team(i))
                    {
                        case 
CS_TEAM_T:    
                        {
                            
give_item(i"weapon_m4a1")
                            
give_item(i"weapon_deagle")
                            
                            
cs_set_user_bpammo(iCSW_M4A190)
                            
cs_set_user_bpammo(iCSW_DEAGLE35)
                        }
                        
                        case 
CS_TEAM_CT:
                        {
                            
strip_weapons(i)
                            
                            
set_user_rendering(ikRenderFxGlowShell000kRenderTransAlpha0)
                            
can_have_gun[i] = false
                        
}
                    }
                }
                
                
#if defined USE_CC
                    
ColorChat(0RED"%s Today is a^x03 NightCrawler Day"PREFIX)
                
#else
                    
client_print(0print_chat"%s Today is a NightCrawler Day"PREFIX)
                
#endif
            
}
            
            case 
DAY_SPARTAN:
            {
                if(
IsPlayer(i) && is_user_alive(i))
                {
                    switch(
cs_get_user_team(i))
                    {
                        case 
CS_TEAM_T:
                        {
                            
give_item(i"weapon_shield")
                            
give_item(i"weapon_deagle")
                            
                            
cs_set_user_bpammo(iCSW_DEAGLE35)
                        }
                        
                        case 
CS_TEAM_CT:
                        {
                            
give_item(i"weapon_deagle")
                            
give_item(i"weapon_m4a1")
                            
                            
cs_set_user_bpammo(iCSW_DEAGLE35)
                            
cs_set_user_bpammo(iCSW_M4A190)
                        }
                    }
                }
                
                
#if defined USE_CC
                    
ColorChat(0RED"%s Today is^x03 Spartan Day"PREFIX)
                
#else
                    
client_print(0print_chat"%s Today is Spartan Day"PREFIX)
                
#endif
            
}
        }
    }
}

public 
musicday_submenu(idmusicmenuitem)
{
    if(
item == MENU_EXIT)
    {
        
menu_destroy(musicmenu)
        return 
PLUGIN_HANDLED
    
}
    
    new 
Data[7], Name[64]
    new 
AccessCallback
    menu_item_getinfo
(musicmenuitemAccessData5Name63Callback)
    
    new 
key str_to_num(Data)
    
    switch(
key)
    {
        case 
1:
        {
            switch(
random_num(13))
            {
                case 
1:
                {
                    
client_cmd(0"mp3 play ^"%s^""musicday_song)
                }
                
                case 
2:
                {
                    
client_cmd(0"mp3 play ^"%s^""musicday_song2)
                }
                case 
3:
                {
                    
client_cmd(0"mp3 play ^"%s^""musicday_song3)
                }
            }
        }
        
        case 
2:
        {
            
client_cmd(0"mp3 stop")
        }
    }
    
menu_display(idmusicmenu0)
    return 
PLUGIN_CONTINUE
}
////////////////////////////////////////////////////////
//-------------SHOW THE REMAINING PLAYERS-------------//
////////////////////////////////////////////////////////
public players_hud()
{
    if(
get_pcvar_num(cvar_showplayers))
    {    
        
g_prisoners 0;
        
g_guards 0;
            
        for(new 
0g_max_clientsi++)
        {
            new 
id i;
        
            if(
is_user_alive(id) && cs_get_user_team(id) == CS_TEAM_CT)
            {
                
g_guards++;
            }
            else if(
is_user_alive(id) && cs_get_user_team(id) == CS_TEAM_T)
            {    
                
g_prisoners++;
            }    
        }
        
set_hudmessage(02550, -1.00.01)
        
show_hudmessage(0,"Prisoners: %i^nGuards: %i"g_prisonersg_guards)
    }
}
/*=====================================================================
            LAST REQUEST MAIN MENU
=====================================================================*/

public lr_check(id)
{
    if (
get_user_team(id) != 1)
    {
        return 
PLUGIN_HANDLED
    
}
    
    if(!
is_user_alive(id))
    {
        return 
PLUGIN_HANDLED
    
}
    if(
lr_started)
    {
        return 
PLUGIN_HANDLED
    
}
    
    new 
ctCounttrCount
    
new players[32] = 0
    
new pnum
    get_players
(playerspnum"a");
    for (new 
0g_max_clientsi++)
    {
        if (!
is_user_alive(i))
        {
            continue;
        }
        
        switch (
cs_get_user_team(i))
        {
            case 
CS_TEAM_CT:
            {
                
ctCount++;
            }
            
            case 
CS_TEAM_T:
            {
                
trCount++;
            }
        }
    }
    
    if (
trCount 1)
    {
        
#if defined USE_CC
            
ColorChat(idGREEN"%s^x01 There are to many^x04 prisoners^x01 left."PREFIX)
        
#else
            
client_print(idprint_chat"%s There are to many prisoners left."PREFIX)
        
#endif
        
        
return PLUGIN_HANDLED;
    }
    
    if (
ctCount == 0)
    {
        
#if defined USE_CC
            
ColorChat(idGREEN"%s^x01 There is no^x04 CT"PREFIX)
        
#else
            
client_print(idprint_chat"%s There is no CT"PREFIX)
        
#endif
        
        
return PLUGIN_HANDLED;
    }
    if(
cs_get_user_team(id) == CS_TEAM_T)    
    {    
        
lr_menu(id)
    }
    return 
PLUGIN_HANDLED
}

public 
lr_menu(id)
{
    new 
lrmenu menu_create("\yLast Request:""sub_lr_menu")
        
    
menu_additem(lrmenu"\wGames""1"0);
    
menu_additem(lrmenu"\wRebel options""2"0);
    
    
menu_setprop(lrmenuMPROP_EXITMEXIT_ALL);
    
menu_display(idlrmenu0);

    return 
PLUGIN_HANDLED;
}    

public 
sub_lr_menu(idlrmenuitem)
{
    
    if (
item == MENU_EXIT)
    {
        
menu_destroy(lrmenu);
        return 
PLUGIN_HANDLED;
    }
    
    new 
Data[7], Name[64];
    new 
AccessCallback;
    
menu_item_getinfo(lrmenuitemAccessData,5Name63Callback);
    
    new 
Key str_to_num(Data);
    
    switch (
Key)
    {
        case 
1:
        {
            
gameslrmenu(id)
        }
        case 
2
        {
            
rebelmenu(id)
        }
    }
    
    
menu_destroy(lrmenu);
    
    return 
PLUGIN_HANDLED;
}
        

/*==================================================================
                LR GAMES MENU
==================================================================*/

public gameslrmenu(id)
{    
    {
        new 
gamelrmenu menu_create("\yLr Games:""sub_gameslr_menu")
    
        
menu_additem(gamelrmenu"\wKnife Fight""1"0);
        
menu_additem(gamelrmenu"\wShot 4 Shot""2"0);
        
menu_additem(gamelrmenu"\wGrenade Duel""3"0);
        
menu_additem(gamelrmenu"\wScout Duel""4"0);
        
menu_additem(gamelrmenu"\wRace""5"0);
        
menu_additem(gamelrmenu"\wSpray Contest""6"0);
        
menu_additem(gamelrmenu"\wGun Toss""7"0);
        
menu_additem(gamelrmenu"\wShotty War""8"0);
        
menu_additem(gamelrmenu"\wSpecialday next round""9"0);
        
        
menu_setprop(gamelrmenuMPROP_EXITMEXIT_ALL);
        
menu_display(idgamelrmenu0);
    }
    return 
PLUGIN_HANDLED
}

public 
sub_gameslr_menu(idgamelrmenuitem)
{
    
    if (
item == MENU_EXIT)
    {
        
menu_destroy(gamelrmenu);
        return 
PLUGIN_HANDLED;
    }
    
    new 
Data[7], Name[64];
    new 
AccessCallback;
    
menu_item_getinfo(gamelrmenuitemAccessData,5Name63Callback);
    
    new 
Key str_to_num(Data);
    
    switch (
Key)
    {
        case 
1:
            
lrgame[id] = LR_KNIFE
        
        
case 2
            
lrgame[id] = LR_S4S
        
        
case 3
            
lrgame[id] = LR_NADE
        
        
case 4
            
lrgame[id] = LR_SCOUT
        
        
case 5
            
lrgame[id] = LR_RACE
        
        
case 6
            
lrgame[id] = LR_SPRAY
        
        
case 7:
            
lrgame[id] = LR_TOSS
    
        
case 8:
            
lrgame[id] = LR_SHOTWAR
            
        
case 9:
            
lrgame[id] = LR_SPECIAL
    
}
    
menu_destroy(gamelrmenu)
    
playermenu(id)
    
    return 
PLUGIN_HANDLED;
}

/*=====================PLAYERMENU===========================*/
public playermenu(id)
{
    
    new 
menu menu_create("\yChoose your opponent:""submenu");
    
    new 
players[32], pnumtempid;
    new 
szName[32], szTempid[10];
    
    
get_players(playerspnum"a");
    for(new 
ipnumi++)
    {
        
tempid players[i]
        
        if (
cs_get_user_team(tempid) != CS_TEAM_CT)
        {
            continue;
        }
        
        
get_user_name(tempidszName31);
        
num_to_str(tempidszTempid9);
        
menu_additem(menuszNameszTempid0);
    }
    
    
menu_display(idmenu);
    return 
PLUGIN_HANDLED;
}

public 
submenu(idmenuitem)
{
    if( 
item == MENU_EXIT )
    {
        
menu_destroy(menu);
        return 
PLUGIN_HANDLED;
    }
    
    new 
data[6], iName[64];
    new 
accesscallback;
    
menu_item_getinfo(menuitemaccessdata,5iName63callback);
    
    new 
tempid str_to_num(data);
    
    new 
mapname[33]
    
get_mapname(mapname32)
    
    new 
ct_origin[3], te_origin[3]
    
    switch(
lrgame[id])
    {
        case 
LR_KNIFE:
        {    
            
strip_user_weapons(tempid);
            
give_item(tempid"weapon_knife");
            
            
strip_user_weapons(id);
            
set_user_health(id100);
            
give_item(id"weapon_knife");
            
            new 
szName[32], szName2[32];
            
get_user_name(idszName31);
            
get_user_name(tempidszName231);
            
            
#if defined USE_CC
                     
ColorChat(idGREEN"%s^x03 %s VS^x03 %s^x04 Knife Fight"PREFIXszNameszName2)
            
#else     
            
            
client_print(idprint_chat"%s %s VS %s Knife Fight"PREFIXszNameszName2);
            
            
#endif
            
            
if( is_user_alive(tempid) )
                
set_user_health(tempid100);
            
            if(
get_pcvar_num(cvar_teleport) && equali(mapname,"some1s_jailbreak"))
            {
                
ct_origin[0] = -759ct_origin[1] = 1047ct_origin[2] = 100
                te_origin
[0] = -585te_origin[1] = 867te_origin[2] = 100
                set_user_origin
(id,te_origin)
                
set_user_origin(tempid,ct_origin)

            }
            
set_task(0.1"beacon"id)
            
set_task(0.1"beacon"tempid)
        }

        case 
LR_S4S:
        {
            
strip_user_weapons(tempid)
            new 
iWep give_item(tempid"weapon_deagle")
            
cs_set_weapon_ammo(iWep0)
            
cs_set_user_bpammo(tempidCSW_DEAGLE,0)
            
            
strip_user_weapons(id)
            
set_user_health(id100)
            new 
iWep2 give_item(id"weapon_deagle")    
            
cs_set_weapon_ammo(iWep21
            
cs_set_user_bpammo(idCSW_DEAGLE0)
            
            new 
szName[32], szName2[32]
            
get_user_name(idszName31)
            
get_user_name(tempidszName231)
            
            
#if defined USE_CC
                     
ColorChat(idGREEN"%s^x03 %s^x01 VS^x03 %s^x04 Shot^x01 For^x04 Shot"PREFIXszNameszName2)
            
#else     
            
            
client_print(idprint_chat"%s %s VS %s Shot for Shot"PREFIXszNameszName2
            
            
#endif
            
            
if( is_user_alive(tempid))
                
set_user_health(tempid100);
                
            if(
get_pcvar_num(cvar_teleport) && equali(mapname"some1s_jailbreak"))
            {
                
ct_origin[0] = -1352ct_origin[1] = 271ct_origin[2] = 38
                te_origin
[0] = -1338te_origin[1] = -782te_origin[2] = 38

                set_user_origin
(id,te_origin)
                
set_user_origin(tempid,ct_origin)
            }
            
            
set_task(0.1"beacon"id)
            
set_task(0.1"beacon"tempid)
            
            
client_cmd(0"mp3 play ^"%s^""s4ssound)
            
is_lr_s4s true
        
}

        case 
LR_NADE:
        {
            
strip_user_weapons(tempid);
            
give_item(tempid"weapon_knife")
            
give_item(tempid"weapon_hegrenade");
            
cs_set_user_bpammo(tempid,CSW_HEGRENADE,50)
            
            
strip_user_weapons(id)
            
set_user_health(id100)
            
give_item(id"weapon_knife")
            
give_item(id"weapon_hegrenade")
            
cs_set_user_bpammo(id,CSW_HEGRENADE,50)
            
            
            new 
szName[32], szName2[32]
            
get_user_name(idszName31);
            
get_user_name(tempidszName231);
            
            
#if defined USE_CC
                               
ColorChat(idGREEN,"%s^x03 %s^x01 VS^x03 %s^x04 Grenade Duel"PREFIXszNameszName);
                 
#else

            
client_print(idprint_chat,"%s %s VS %s Grenade Duel"PREFIXszNameszName2); 
            
            
#endif
            
            
if( is_user_alive(tempid) )
                
set_user_health(tempid100);
            
            if(
get_pcvar_num(cvar_teleport) && equali(mapname,"some1s_jailbreak"))
            {
                
ct_origin[0] = -1756ct_origin[1] = -2526ct_origin[2] = 36
                te_origin
[0] = -3020te_origin[1] = -2529te_origin[2] = 36
                set_user_origin
(id,te_origin)
                
set_user_origin(tempid,ct_origin)
            }
                
            
set_task(0.1"beacon"id)
            
set_task(0.1"beacon"tempid)
            
        }

        case 
LR_SCOUT:
        {
            
strip_user_weapons(tempid);
            
give_item(tempid"weapon_scout");
            
give_item(tempid"weapon_knife")
            
cs_set_user_bpammo(tempid,CSW_SCOUT,10)
            
            
strip_user_weapons(id)
            
set_user_health(id100)
            
give_item(id"weapon_knife")
            
give_item(id"weapon_scout")
            
cs_set_user_bpammo(id,CSW_SCOUT,10)
            
            new 
szName[32], szName2[32]
            
get_user_name(idszName31);
            
get_user_name(tempidszName231);
            
            
#if defined USE_CC
                     
ColorChat(idGREEN,"%s^x03 %s^x01 VS^x03 %s^x04 Scout Duel"PREFIXszNameszName2)
            
#else
            
            
client_print(idprint_chat"%s %s VS %s Scout Duel"PREFIXszNameszName2)    
            
            if( 
is_user_alive(tempid) )
                
set_user_health(tempid100);
                
        
            if(
get_pcvar_num(cvar_teleport) && equali(mapname,"some1s_jailbreak"))
            {
                
ct_origin[0] = -2898ct_origin[1] = -2040ct_origin[2] = 37
                te_origin
[0] = -2908te_origin[1] = 905te_origin[2] = 37
                set_user_origin
(id,te_origin)
                
set_user_origin(tempid,ct_origin)
            }
            
set_task(0.1"beacon"id)
            
set_task(0.1"beacon"tempid)
            
        }
                
        case 
LR_RACE:
        {
            
strip_user_weapons(tempid);
            
give_item(tempid"weapon_knife");
            
            
strip_user_weapons(id);
            
set_user_health(id100);
            
give_item(id"weapon_knife");
            
            new 
szName[32], szName2[32];
            
get_user_name(idszName31);
            
get_user_name(tempidszName231);
            
            
#if defined USE_CC
                     
ColorChat(idGREEN,"%s^x03 %s^x01 VS^x03 %s^x04 Race",
            
#else     
                 
            
client_print(idprint_chat"%s %s VS %s^n Race"PREFIXszNameszName2);
            
            
#endif
            
            
if( is_user_alive(tempid) )
                
set_user_health(tempid100);
                
            
set_task(0.1"beacon"id)
            
set_task(0.1"beacon"tempid)
            
            
client_cmd(0"mp3 play ^"%s^""race_go)
        }
        
        case 
LR_SPRAY:
        {
            
strip_user_weapons(tempid);
            
give_item(tempid"weapon_knife");
            
            
strip_user_weapons(id);
            
set_user_health(id100);
            
give_item(id"weapon_knife");    

            new 
szName[32], szName2[32];
            
get_user_name(idszName31);
            
get_user_name(tempidszName231);
            
            
#if defined USE_CC
            
            
ColorChat(idGREEN,"%s^x03 %s^x01 VS^x03 %s^x04 Spray Contest"PREFIXszNameszName2)
            
        
            
            
client_print(idchat_print,"%s %s VS %s Spray Contest"PREFIXszNameszName2);

        
            
            
server_cmd("decalfrequency 0")
            
spray_on true
            
if( is_user_alive(tempid) )
                
set_user_health(tempid100);
                
            
set_task(0.1"beacon"id)
            
set_task(0.1"beacon"tempid)
            
        }

        case 
LR_TOSS:
        {
            
strip_user_weapons(tempid);
            new 
weapon give_item(tempid"weapon_deagle")
            
give_item(tempid"weapon_knife")
            
cs_set_weapon_ammo(weapon0)
            
cs_set_user_bpammo(tempid,CSW_DEAGLE0)
            
            
strip_user_weapons(id);
            new 
weapon2 give_item(id"weapon_deagle")
            
give_item(id"weapon_knife")
            
cs_set_weapon_ammo(weapon20)
            
cs_set_user_bpammo(id,CSW_DEAGLE0)
            
            new 
szName[32], szName2[32]
            
get_user_name(idszName31);
            
get_user_name(tempidszName231);
            
            
#if defined USE_CC
            
            
ColorChat(idGREEN,"%s^x03 %s^x01 VS^x03 %s^x04 Gun Toss"PREFIXszNameszName2
            
            
#else
            
            
client_print(Idprint_chat"%s %s VS %s Gun Toss"PREFIXszNameszName2)
            
            
#endif
            
            
if( is_user_alive(tempid) )
                
set_user_health(tempid100);
                
            
set_task(0.1"beacon"id)
            
set_task(0.1"beacon"tempid)
        }

        case 
LR_SHOTWAR:
        {
            
strip_user_weapons(tempid);
            
give_item(tempid"weapon_m3");
            
give_item(tempid"weapon_knife")
            
cs_set_user_bpammo(tempid,CSW_M3,100)
            
            
strip_user_weapons(id)
            
set_user_health(id255)
            
give_item(id"weapon_m3")
            
give_item(id"weapon_knife")
            
cs_set_user_bpammo(id,CSW_M3,10)    
            
            new 
szName[32], szName2[32]
            
get_user_name(idszName31);
            
get_user_name(tempidszName231);
            
            
#if Defined USE_CC
            
            
ColorChat(IdGREEN,"%s^03 %s^x01 VS^x03 %s^x04 Shotty War"PREFIXszNameszName2)
            
            
#else
            
            
client_print(idprint_chat"%s %s VS %s Shotty War"PREFIXszNameszName2)    
            
            
#endif
            
            
if( is_user_alive(tempid) )
                
set_user_health(tempid255);
                
            
set_task(0.1"beacon"id)
            
set_task(0.1"beacon"tempid)
        }
        
        case 
LR_SPECIAL:
        {
            new 
szName[32]
            
get_user_name(idszName31)
            
            
#if defined
            
ColorChat(idGREEN,"%s^x03 %s^x01 wan to choose a^x04 Special Day^x01 next round"PREFIXszName)
            
            
#else
            
            
client_print(idprint_chat"%s %s want to choose a Special Day next round"PREFIXszName)
            
            
#endif
            
            
lr_next_special[id] = true
        
}
    }
    
menu_destroy(menu)
    
lr_started true
    
return PLUGIN_HANDLED
}
/*================================================================
            LR REBELMENU
================================================================*/
public rebelmenu(id)
{    
    {
        new 
rebelingmenu menu_create("\yRebel Options:""sub_rebelmenu")
        
        
menu_additem(rebelingmenu"\wRambo""1"0);
        
menu_additem(rebelingmenu"\wDeagle Dude""2"0);
        
menu_additem(rebelingmenu"\wCrazy guy""3"0);
        
menu_additem(rebelingmenu"\wUber Glocker""4"0);
        
        
menu_setprop(rebelingmenuMPROP_EXITMEXIT_ALL);
        
menu_display(idrebelingmenu0);
    }
    
    return 
PLUGIN_HANDLED;
}

public 
sub_rebelmenu(idrebelingmenuitem)
{
    
    if (
item == MENU_EXIT)
    {
        
menu_destroy(rebelingmenu);
        return 
PLUGIN_HANDLED;
    }
    
    new 
Data[7], Name[64];
    new 
AccessCallback;
    
menu_item_getinfo(rebelingmenuitemAccessData,5Name63Callback);
    
    new 
Key str_to_num(Data);
    
    switch (
Key)
    {
        case 
1:
        {
            
strip_user_weapons(id)
            
set_user_health(id250)
            
give_item(id"weapon_knife")
            
give_itemid"weapon_m249" );
            
cs_set_user_bpammo(id,CSW_M249,300)

            
set_hudmessage(random_num(1,255), random_num(1,255), random_num(1,255), -1.0, -1.006.012.0)
            
show_hudmessage(0"= RAMBO IS HERE =")
            
lr_started true
        
}
        
        case 
2
        {
            
strip_user_weapons(id)
            
set_user_health(id500)
            
give_item(id"weapon_knife")
            
give_itemid"weapon_deagle")
            
cs_set_user_bpammo(id,CSW_DEAGLE,35)
            
            
set_hudmessage(random_num(1,255), random_num(1,255), random_num(1,255), -1.0, -1.006.012.0)
            
show_hudmessage(0"= DEAGLE DUDE IS HERE =")
            
lr_started true
        
}
        
        case 
3
        {    
            
strip_user_weapons(id)
            
set_user_health(id1)
            
give_itemid"weapon_ak47")
            
give_item(id"weapon_knife")
            
cs_set_user_bpammo(id,CSW_AK47,200)
            
set_user_rendering(idkRenderFxGlowShell000kRenderTransAlpha15)
            
            
set_hudmessage(random_num(1,255), random_num(1,255), random_num(1,255), -1.0, -1.006.012.0)
            
show_hudmessage(0"= CRAZY GUY IS HERE =")
            
lr_started true
        
}
        
        case 
4
        {
            
strip_user_weapons(id)
            
set_user_health(id500)
            
give_itemid"weapon_glock18")
            
give_item(id"weapon_knife")
            
cs_set_user_bpammo(id,CSW_GLOCK18,200)
            
set_user_rendering(idkRenderFxGlowShell25500kRenderTransAlpha255)
            
            
set_hudmessage(random_num(1,255), random_num(1,255), random_num(1,255), -1.0, -1.006.012.0)
            
show_hudmessage(0"= UBER GLOCKER IS HERE =")
            
lr_started true
        
}
    }
    
    
menu_destroy(rebelingmenu);
    
lrgame[id] = LR_REBEL
    
return PLUGIN_HANDLED;
}
    
/*========================SHOT 4 SHOT BULLET==========================*/
public fw_primary_attack(ent)
{
    if(!
is_lr_s4s)
        return 
HAM_IGNORED
    
    
//Get owner of entity
    
    
new id pev(ent,pev_owner)
    
    
//if he's not alive
    
if(!is_user_alive(id))
    {
        return 
HAM_IGNORED
    
}
    
    
//If player is in lr and can shoot deagle
    
if(lr_started)
    {
        
//Search enemy
        
new players[32], pnumtempid
        get_players
(playerspnum"a")
        for(new 
ipnumi++)
        {
            
tempid players[i]
            
//if he's in lr and can't shoot deagle and is alive
            
            
if(is_user_alive(tempid) && (id !=tempid))
            {
                
gun_switch(idtempid)
            }
        }
        return 
HAM_HANDLED
    
}
    return 
HAM_IGNORED
}  

public 
gun_switch(idtempid)
{
    if(!
is_lr_s4s || !is_user_alive(id))
    {
        return 
PLUGIN_HANDLED
    
}
    
    if(
lr_started)
    {
            
        if(
is_user_alive(tempid) && (id !=tempid) && !shot_deagle[id])
        {
            
strip_user_weapons(tempid)
            new 
deagle give_item(tempid"weapon_deagle")
            
cs_set_weapon_ammo(deagle1)
            
cs_set_user_bpammo(tempidCSW_DEAGLE0)
            
            
shot_deagle[id] = true
            shot_deagle
[tempid] = false
        
}
    }
    return 
PLUGIN_HANDLED
}  

///////////////////////////////////////////////
//----------BEACON---------------------------//
///////////////////////////////////////////////

public beacon(id)
{
    if(
/*!is_user_connected(id) || */!is_user_alive(id))
        return 
PLUGIN_HANDLED
        
    
if(cs_get_user_team(id) == CS_TEAM_CT)
    {
        static 
origin[3]
        
get_user_origin(idorigin)
        
message_begin(MSG_BROADCASTSVC_TEMPENTITY)
        
write_byte(TE_BEAMCYLINDER)    // TE id
        
write_coord(origin[0])         // x
        
write_coord(origin[1])        // y
        
write_coord(origin[2]-20)    // z
        
write_coord(origin[0])        // x axis
        
write_coord(origin[1])        // y axis
        
write_coord(origin[2]+200)    // z axis
        
write_short(beacon_sprite)    // sprite
        
write_byte(0)            // startframe   
        
write_byte(1)            // framerate   
        
write_byte(6)            // life
        
write_byte(2)              // width
        
write_byte(1)               // noise    
        
write_byte(0)              // red  
        
write_byte(0)               // green 
        
write_byte(250)         // blue
        
write_byte(200)            // brightness
        
write_byte(0)            // speed
        
message_end()
    }
    
    else if(
cs_get_user_team(id) == CS_TEAM_T)
    {
        static 
origin[3]
        
get_user_origin(idorigin)
        
message_begin(MSG_BROADCASTSVC_TEMPENTITY)
        
write_byte(TE_BEAMCYLINDER)    // TE id
        
write_coord(origin[0])         // x
        
write_coord(origin[1])        // y
        
write_coord(origin[2]-20)    // z
        
write_coord(origin[0])        // x axis
        
write_coord(origin[1])        // y axis
        
write_coord(origin[2]+200)    // z axis
        
write_short(beacon_sprite)    // sprite
        
write_byte(0)            // startframe   
        
write_byte(1)            // framerate   
        
write_byte(6)            // life
        
write_byte(2)              // width
        
write_byte(1)               // noise    
        
write_byte(250)            // red  
        
write_byte(0)               // green 
        
write_byte(0)             // blue
        
write_byte(200)            // brightness
        
write_byte(0)            // speed
        
message_end()
    }
    
set_task(1.0"beacon"id)

    return 
PLUGIN_HANDLED
}

///////////////////////////////////////////////
//----------T GAG BY Exolent[jNr]------------//
///////////////////////////////////////////////
public FwdSetVoice(receiversenderbool:listen)
{
    if(!
get_pcvar_num(cvar_tvoiceblock))
        return 
PLUGIN_HANDLED
        
    
if( !(<= receiver <= g_max_clients)
    || !
g_connected[receiver]
    || !(
<= sender <= g_max_clients)
    || !
g_connected[sender] ) return FMRES_IGNORED;
    
    new 
CsTeams:team cs_get_user_team(sender);
    if( (
team == CS_TEAM_T || team == CS_TEAM_CT && !is_user_alive(sender)) && !access(senderADMIN_VOICE) )
    {
        
engfunc(EngFunc_SetClientListeningreceiversender0);
        return 
FMRES_SUPERCEDE;
    }
    
    return 
FMRES_IGNORED;
}  

//////////////////////////////////////////////
//------------WEAPON BLOCKER----------------//
//////////////////////////////////////////////
public Event_CurWeapon(id
{     
    new 
weaponID read_data(2

    if(
can_have_gun[id])
        return 
PLUGIN_CONTINUE
        
    
if(weaponID != CSW_KNIFE)
        
client_cmd(id"weapon_knife")
    
    return 
PLUGIN_CONTINUE
}

#endif


i get 3 error plz help

Error: Undefined symbol "rebelmenu" on line 1822
Error: Expected token: "#endif", but found "-end of file-" on line 2534
Error: Expected token: "}", but found "-end of file-" on line 2534

3 Errors.
Could not locate output file C:\Documents and Settings\Reason\Skrivbord\Jailbreak04.amx (compile failed).
plz help
2reason2kill is offline
matsi
Thinkosaur
Join Date: Sep 2006
Old 05-16-2011 , 11:08   Re: [HELP] CFJAIL
Reply With Quote #2

Quote:
Originally Posted by 2reason2kill View Post
PHP Code:
/*
Cookie Force Jailbreak Plugin

Description:

This is a complete jailbreak plugin, including:

- Last request 8 games and 4 rebels
- Beacon on lr
- Weapon menu for CT
- Shop
- Days menu
- much more

Cvars:

- jb_points_kill             How many points a T gets for killing a ct
- jb_shop_gunprice             How many points a gun gamble costs
- jb_shop_pillsprice         How many points Pills cost
- jb_shop_armorprice         How many points armor costs
- jb_shop_camoprice         How many points camo costs
- jb_show_players            SHows a hud with players left on top of screen
- jb_days                     Shows the days HUD
- jb_shop                     Opens the shop
- jb_points_headshot         How many points T's get for killing a ct with a headshot
- jb_shop_nadepack_price    How many points the nade pack costs
- jb_showrebels             Show rebels when they kill someone or not
- jb_blocktvoice Blocks     Terrorist from voice chat
- jb_enable_days             Enables the days menu
- jb_teleport                Enables/ disables the teleports on LR

Changelog:

1.0: Initial Release
1.1: Fixed lr bug
1.2: Added rebel system, fixed camo shop
1.3: Updated rebel system with glow and alarm
1.4: Added strip after LR win, optimalized lr
1.5: Fixed rebel weapon strip.
1.6: Fixed camo model.
1.7: Added t voice blocker by Exolent[jNr].
1.8: Fixed sounds(ac4570), index out of bounds error. 
1.9: Fixed sounds for the last time
2.0: Added several days, fixed gun toss
2.1: Fixed little typo in LR
2.2: Fixed Daysmenu items not showing up
2.3: Fixed crash on music day
2.4: Added new Lr: Choose specialday next round, teleport on some1s_jailbreak, fixed gun_blocker
2.5: Added cvar for teleport
2.6: Fixed rebeling won't stop
2.7: Fixed player out of range errors
2.8: Added Countdown, Nightcrawler day, Spartan Day, new sounds.
2.9: Fixed Deathmatch day, nightcrawler day, stopped sound on round end
3.0: Fixed Crash of shark day, added only one day/ round
3.1: Added ColorChat option.
3.2: Fixed index out of bounds error.


Credits:

Toast: For the base of the plugin
All the guys that helped me solve bugs
And everyone i forgot.


Notes:

I never though i would ever make this public, but since i stopped my jailbreak, due to few players, i'm releasing it.

The shops points are cookies, because the clan i made this for it called Cookie Force, so it was funny to make it cookies.

To disable ColorChat, comment define USE_CC on line 83

*/
#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <cstrike>
#include <hamsandwich>
#include <fakemeta>
#include <engine>
#include <nvault>

#define USE_CC

#if defined USE_CC
#include <colorchat>
#endif

///////////////
// =Defines= //
///////////////

#define VERSION "3.2"

#define IsPlayer(%1) (1<=%1<=g_max_clients)

#define REQUIRED_ADMIN_LEVEL ADMIN_KICK
#define ADMIN_VOICE ADMIN_MENU

#define OFFSET_PRIMARYWEAPON        116 

/////////////////////////////////////////////////////////


//////////////////
// =New things= //
//////////////////
#if defined USE_CC
    
new const PREFIX[] = "[ Jail-Break ]" // Prefix 
#else
    
new const PREFIX[] = "[ Jail-Break ]" // Normal prefix
#endif

new g_max_clients        //client check

//    Cvars    
new cvar_killpoints        // How many Cookies a terrorist gets for 1 ct kill
new cvar_gunprice        // How many Cookies a gun costs
new cvar_pillsprice        // How many Cookies pills costs
new cvar_armorprice        // How many Cookies armor costs
new cvar_camoprice        // How many Cookies camo costs
new cvar_nadepackprice    // How many Cookies nades cost
new cvar_headshotpoints    // How many extra points a t gets for killing a ct
new cvar_days            // Is days hud should be displayed or not
new cvar_showplayers    // Shows the players in a nice hud message
new cvar_shop            // Open or close the shop
new cvar_showrebels        // Show rebels in chat
new cvar_tvoiceblock     // Block T's from using voicechat
new cvar_daysmenu        // Enables the days menu
new cvar_teleport        // Enables/disables teleport on LR

//   Points system     
new playerpoints[33]    // Amount of Cookies a player has
new g_vault                // Open a new vault to store a players points.

//     Other Stuff
new days

new g_guards
new g_prisoners

new beacon_sprite

new lrgame[33]
enum 
{
    
LR_NONE,
    
LR_KNIFE,
    
LR_S4S,
    
LR_NADE,
    
LR_SCOUT,
    
LR_RACE,
    
LR_SPRAY,
    
LR_TOSS,
    
LR_SHOTWAR,
    
LR_SPECIAL,
    
LR_REBEL
}

new 
specialday[21]
enum
{
    
DAY_NONE,
    
DAY_MUSIC,
    
DAY_GRAV,
    
DAY_FREEDAY,
    
DAY_ZOMBIE,
    
DAY_LAVA,
    
DAY_SHARK,
    
DAY_CAGE,
    
DAY_DM,
    
DAY_NIGHT,
    
DAY_SPARTAN
}

// Sounds
new musicday_song[]     = "sound/music1.mp3"
new musicday_song2[]     = "sound/music3.mp3"
new musicday_song3[]    = "sound/misc/Cops-BadBoys.mp3"
new alarm[]             = "sound/misc/alarm.mp3"
new race_go[]             = "sound/jailbreak/race_go.mp3"
new s4ssound[]             = "sound/jailbreak/s4s.mp3"
new spartansound[]         = "sound/jailbreak/spartan_day.mp3"
new zombiesound[]         = "sound/jailbreak/zombie_day.mp3"

new timer
new name[33]

////////////////////////////////////////////////////////////////

////////////////
// =Booleans= //
////////////////

new boollr_started            // Is last request?
new boolgot_camo[33]            // Does player got camo?
new boolgravityday            // Is today a gravity day?    
new boolspray_on                // Is spray contest on?
new boolis_lr_s4s                // Is lr shot 4 shot?
new boolshot_deagle[33]        // Did he shoot his deagle?
new boolis_rebel[33]            // Is the player a rebel?
new boolcan_have_gun[33]      // Can he have a gun?
new boollr_next_special[33]    // Specialday next round
new boolgot_name false        // Got the players name on cd?
new boolcountdown_on false    // Is counting down?

new bool:g_connected[33]



///////////////////////////////////////////////////////////////

//////////////
// =Stocks= //
//////////////

stock check_user(index)
{
    if(!
is_user_connected(index) ||(is_user_bot(index)))
    {
        return 
PLUGIN_HANDLED
    
}
    return 
PLUGIN_CONTINUE
}

stock strip_weapons(index)
{

    
strip_user_weapons(index)
    
set_pdata_int(indexOFFSET_PRIMARYWEAPON0)
    
give_item(index"weapon_knife")


//////////////////////////////////////////////////////////////
//---------------PLUGIN INIT--------------------------------//
//////////////////////////////////////////////////////////////

public plugin_init()
{
    
register_plugin("CF Jailbreak"VERSION"Drekes")
    
    
//cvars
    
cvar_killpoints register_cvar("jb_points_kill""2")
    
cvar_gunprice register_cvar("jb_shop_gunprice""15")
    
cvar_pillsprice register_cvar("jb_shop_pillsprice""7")
    
cvar_armorprice register_cvar("jb_shop_armorprice""7")
    
cvar_camoprice register_cvar("jb_shop_camoprice""20")
    
cvar_showplayers register_cvar("jb_show_players""1")
    
cvar_days register_cvar("jb_days""0")
    
cvar_shop register_cvar("jb_shop""1")
    
cvar_headshotpoints register_cvar("jb_points_headshot""2")
    
cvar_nadepackprice register_cvar("jb_shop_nadepack_price""10")
    
cvar_showrebels register_cvar("jb_show_rebels""1")
    
cvar_tvoiceblock register_cvar("jb_blocktvoice""1")
    
cvar_daysmenu register_cvar("jb_enable_days""0")
    
cvar_teleport register_cvar("jb_teleport""1")
    
    
register_cvar("cfjail_version"VERSIONFCVAR_SERVER|FCVAR_EXTDLL|FCVAR_UNLOGGED|FCVAR_SPONLY)

    
RegisterHam(Ham_Spawn"player""Event_Playerspawn"1)
    
RegisterHam(Ham_Weapon_PrimaryAttack"weapon_deagle""fw_primary_attack")
    
RegisterHam(Ham_TakeDamage"player""Event_TakeDamage")
    
    
register_forward(FM_Voice_SetClientListening"FwdSetVoice");

    
//Events
    
register_event("DeathMsg""Event_Deathmsg""a")
    
register_logevent("Event_Roundend"2"1=Round_End"
    
register_logevent("Event_Roundstart"2"1=Round_Start")
    
register_event("CurWeapon""Event_CurWeapon""be","1=1")

    
    
//client commands
    
register_clcmd("say /lr""lr_check")
    
register_clcmd("say !lr""lr_check")
    
register_clcmd("say /rules""showrules")
    
register_clcmd("say_team /rules""showrules")
    
register_clcmd("say /shop""cmd_shop")
    
register_clcmd("say_team /shop""cmd_shop")
    
register_clcmd("say /daysmenu""specialday_check")
    
register_concmd("say /countdown""cdmenu")
    
register_concmd("say /cd""cdmenu")
    
    
//Console (admin) Commands
    
register_concmd("amx_take_points""cmd_take_points"ADMIN_KICK"<target> <amount>")
    
register_concmd("amx_give_points""cmd_give_points"ADMIN_KICK"<target> <amount>")

    
//Other Things
    
g_max_clients get_maxplayers()
    
    
g_vault nvault_open("jbpoints")    // Open a vault for the points
    
    
set_task(1.0"players_hud"0__"b")
}

///////////////////////////////////////////////////
//--------------PRECACHE-------------------------//
///////////////////////////////////////////////////
public plugin_precache()
{
    
precache_generic(musicday_song)
    
precache_generic(musicday_song2)
    
precache_generic(musicday_song3)
    
precache_generic(alarm)
    
precache_generic(race_go)
    
precache_generic(s4ssound)
    
precache_generic(spartansound)
    
precache_generic(zombiesound)
    
    
precache_sound("fvox/one.wav")
    
precache_sound("fvox/two.wav")
    
precache_sound("fvox/three.wav")
    
precache_sound("fvox/four.wav")
    
precache_sound("fvox/five.wav")
    
precache_sound("fvox/six.wav")
    
precache_sound("fvox/seven.wav")
    
precache_sound("fvox/eight.wav")
    
precache_sound("fvox/nine.wav")
    
precache_sound("fvox/ten.wav")
    
precache_sound("fvox/eleven.wav")
    
precache_sound("fvox/twelve.wav")
    
precache_sound("fvox/thirteen.wav")
    
precache_sound("fvox/fourteen.wav")
    
precache_sound("fvox/fifteen.wav")
    
precache_sound("radio/com_go.wav")
    
    
precache_model("models/player/gign/gign.mdl")
    
    
beacon_sprite precache_model("sprites/shockwave.spr")
}
///////////////////////////////////////////////////
//-------------PLAYER SPAWN----------------------//
///////////////////////////////////////////////////
public Event_Playerspawn(id)
{
    if(!
IsPlayer(id))
        return 
PLUGIN_HANDLED
        
    
if(is_user_alive(id))
    {
        if(
cs_get_user_team(id) == CS_TEAM_CT)
        {
            
strip_weapons(id)
            
gun_check(id)
        }
        
        if(
cs_get_user_team(id) == CS_TEAM_T)
        {
            if(
got_camo[id])
            {
                
cs_reset_user_model(id)
                
got_camo[id] = false
            
}
            
            if(
lr_next_special[id])
            {
                
specialday_menu(id)
                
lr_next_special[id] = false
            
}

            if(
is_rebel[id])
                
unrebel(id)
                
            
strip_weapons(id)
            
lr_started false
            is_rebel
[id] = false
            lrgame
[id] = LR_NONE
        
}
        
can_have_gun[id] = true
        set_user_rendering
(id)
    }
    
specialday[20] = DAY_NONE
    
return PLUGIN_HANDLED
}

//////////////////////////////////////////////////////////////////
//--------------------PLAYER DEATH------------------------------//
//////////////////////////////////////////////////////////////////
public Event_Deathmsg()
{
    new 
attacker read_data(1)
    new 
victim read_data(2)
    new 
headshot read_data(3)
    
    new 
AttackerName[32]
    new 
VictimName[32]
    
    
get_user_name(attackerAttackerName31)
    
get_user_name(victimVictimName,31)
    
    if(!
IsPlayer(attacker))
        return 
PLUGIN_HANDLED
        
    
if(!IsPlayer(victim))
        return 
PLUGIN_HANDLED

    
if( cs_get_user_team(attacker) == CS_TEAM_CT && cs_get_user_team(victim) == CS_TEAM_T)
    {
        if(
get_pcvar_num(cvar_showrebels) && !lr_started)
        {
            if(!
is_rebel[victim])
            {
                
#if defined USE_CC
                    
ColorChat(0GREEN"%s^x01 Guard^x03 %s^x01 killed^x04 prisoner^x03 %s!"PREFIXAttackerNameVictimName)
                
#else
                    
client_print(0print_chat"%s Guard %s killed prisoner %s!"PREFIXAttackerNameVictimName)
                
#endif
            
}
        
            else
            {
                
#if defined USE_CC
                    
ColorChat(0GREEN"%s^x01 Guard^x03 %s^x01 killed^x04 rebel^x03 %s!"PREFIXAttackerNameVictimName)
                
#else
                    
client_print(0print_chat"%s Guard %s killed rebel %s"PREFIXAttackerNameVictimName)
                
#endif
                
unrebel(victim)
            }
        }
    }
    
    if( 
cs_get_user_team(attacker) == CS_TEAM_T && cs_get_user_team(victim) == CS_TEAM_CT)
    {
        
playerpoints[attacker] += get_pcvar_num(cvar_killpoints)
        
        if(
headshot)
            
playerpoints[attacker] += get_pcvar_num(cvar_headshotpoints);
            
        if(
lr_started)
        {
            if(
is_lr_s4s)
                
is_lr_s4s false
            
            
if(lrgame[attacker] != LR_REBEL)
                
strip_weapons(attacker)
                
            
lr_started false
            lrgame
[attacker] = LR_NONE
        
}
    }
    
    if(
spray_on)
    {
        
server_cmd("decalfrequency 20")
        
spray_on false
    
}
    
    if(
task_exists(attacker))
        
remove_task(attacker)
        
    if(
task_exists(victim))
        
remove_task(victim)
    
    
SaveData(attacker)
    
    return 
PLUGIN_HANDLED
}  
    
////////////////////////////////////////////////////////////
//-----------------ROUND END/ ROUND START-----------------//
////////////////////////////////////////////////////////////
public Event_Roundend()
{
    if(
gravityday)
    {
        
server_cmd("sv_gravity 800")
        
gravityday false
    
}

    if(
specialday[20] == DAY_DM)
        
server_cmd("mp_friendlyfire 0")
        
    
client_cmd(0"mp3 stop")
    
client_cmd(0"stopsound")
}    
public 
Event_Roundstart()
{
    if(
get_pcvar_num(cvar_days))
    {
        
days ++
    }
    if(
get_pcvar_num(cvar_showplayers))
    {
        
g_guards 0
        g_prisoners 
0
    
}
}

/////////////////////////////////////////////////////
//-----------------TAKE DAMAGE---------------------//
/////////////////////////////////////////////////////
public Event_TakeDamage(victimweaponattackerfloatdamagedamagebits)
{
    if(
IsPlayer(victim) && IsPlayer(attacker))
    {
        if(
get_pcvar_num(cvar_showrebels) && !is_rebel[attacker] && !lr_started && IsPlayer(attacker) && IsPlayer(victim))
        {
            if(
victim != attacker && attacker != 0)
            {
                if(
cs_get_user_team(attacker) == CS_TEAM_T && cs_get_user_team(victim) == CS_TEAM_CT)
                {
                    
make_rebel(attackervictim)
                }
            }
        }
    }
}
    
/////////////////////////////////////////////////////
//-----------------PLAYER DISCONNECTS--------------//
/////////////////////////////////////////////////////
public client_disconnect(id)
{
    
SaveData(id
    
g_connected[id] = false;
}

//////////////////////////////////////////////////////
//----------------CLIENT PUTINSERVER----------------//
//////////////////////////////////////////////////////
public client_putinserver(id)  
    
g_connected[id] = true;
//////////////////////////////////////////////////////
//-----------------SOMETHING ELSE-------------------//
//////////////////////////////////////////////////////
public Player_Jump(id)
{
    if( 
is_user_alive(id) && entity_get_float(idEV_FL_fuser2) > 0.0 )
    {
        
entity_set_float(idEV_FL_fuser20.0)
    }
}


//////////////////////////////////////////////////////
//-----------ON MAP CHANGE OR SERVER CRASH----------//
//////////////////////////////////////////////////////
public plugin_end()
{
    
nvault_close(g_vault)
}

//////////////////////////////////////////////////////
//---------------CT GUN MENU------------------------//
//////////////////////////////////////////////////////
public gun_check(id)
{
    if(
IsPlayer(id) && cs_get_user_team(id) == CS_TEAM_CT)
    {
        
primgun_menu(id)
    }
    return 
PLUGIN_HANDLED
}

//////////////////////////////////////////////////////
//----------------MAKE REBEL------------------------//
//////////////////////////////////////////////////////
public make_rebel(attackervictim)
{
    new 
attackername[33], victimname[33]
    
get_user_name(attackerattackername32)
    
get_user_name(victimvictimname32)
    
    
#if defined USE_CC
        
ColorChat(0GREEN"%s^x03 %s^x01 is now a^x04 rebel"PREFIXattackername)
    
#else
        
client_print(0print_chat"%s %s is now a rebel!"PREFIXattackername)
    
#endif
    
    
set_user_rendering(attackerkRenderFxGlowShell25500kRenderNormal16)
    
client_cmd(0"mp3 play ^"%s^""alarm)
    
is_rebel[attacker] = true
}

/////////////////////////////////////////////////////
//--------------UNDO REBEL-------------------------//
/////////////////////////////////////////////////////
public unrebel(id)
{
    if(
is_user_connected(id))
    {
        
set_user_rendering(idkRenderFxGlowShell255255255kRenderNormal255)
        
is_rebel[id] = false
    
}
}
/*========================PRIMARY WEAPON======================*/

public primgun_menu(id)
{    
    if(!
IsPlayer(id))
        return 
PLUGIN_HANDLED
        
    
new primgunmenu menu_create("\yChoose your weapon:""sub_primgun_menu")

    
menu_additem(primgunmenu"\wM4a1""1"0);
    
menu_additem(primgunmenu"\wAk 47""2"0);
    
menu_additem(primgunmenu"\wScout""3"0);
    
menu_additem(primgunmenu"\wAwp""4"0);
    
menu_additem(primgunmenu"\wMp5""5"0);
        
    
menu_setprop(primgunmenuMPROP_EXITMEXIT_ALL);
    
menu_display(idprimgunmenu0);
    return 
PLUGIN_HANDLED
}    

public 
sub_primgun_menu(idprimgunmenuitem)
{
    
    if (
item == MENU_EXIT)
    {
        
menu_destroy(primgunmenu);
        return 
PLUGIN_HANDLED;
    }
    
    new 
Data[7], Name[64];
    new 
AccessCallback;
    
menu_item_getinfo(primgunmenuitemAccessData,5Name63Callback);
    
    new 
Key str_to_num(Data);
    
    switch (
Key)
    {
        case 
1:
        {
            
primgun1(id)
        }
        case 
2
        {
            
primgun2(id)
        }
        case 
3:
        {
            
primgun3(id)
        }
        case 
4:
        {
            
primgun4(id)
        }
        case 
5:
        {
            
primgun5(id)
        }
    }
    
    
menu_destroy(primgunmenu);
    return 
PLUGIN_HANDLED;
}

public 
primgun1(id)
{
    
give_item(id"weapon_m4a1")
    
give_item(id"weapon_usp")
    
cs_set_user_bpammo(idCSW_USP100)
    
cs_set_user_bpammo(idCSW_M4A1200)
}

public 
primgun2(id)
{
    
give_item(id"weapon_ak47")
    
give_item(id"weapon_usp")
    
cs_set_user_bpammo(idCSW_USP100)
    
cs_set_user_bpammo(idCSW_AK47200)
}

public 
primgun3(id)
{
    
give_item(id"weapon_scout")
    
give_item(id"weapon_usp")
    
cs_set_user_bpammo(idCSW_USP100)
    
cs_set_user_bpammo(idCSW_SCOUT200)
}

public 
primgun4(id)
{
    
give_item(id"weapon_awp")
    
give_item(id"weapon_usp")
    
cs_set_user_bpammo(idCSW_USP100)
    
cs_set_user_bpammo(idCSW_AWP200)
}    

public 
primgun5(id)
{
    
give_item(id"weapon_mp5navy")
    
give_item(id"weapon_usp")
    
cs_set_user_bpammo(idCSW_USP100)
    
cs_set_user_bpammo(idCSW_MP5NAVY200)
}
///////////////////////////////////////////////////////////////
//--------------------RULES MOTD-----------------------------//
///////////////////////////////////////////////////////////////
public showrules(id)
{
    
show_motd(id"jailrules.txt""Jailbreak Rules")
}

//////////////////////////////////////////////////////////////////
//----------------POINTS SAVE AND LOAD--------------------------//
//////////////////////////////////////////////////////////////////
public SaveData(id
{  
    new 
authid[32];
    
get_user_authid(id,authid,31);

    new 
vaultkey[64], vaultdata[64];

    
//Save their points     
    
format(vaultkey,63,"jb-%s-points",authid);     
    
format(vaultdata,63,"%d",playerpoints[id]);     
    
set_vaultdata(vaultkey,vaultdata);  
}

public 
LoadData(id
{
    new 
authid[32]; 
    
get_user_authid(id,authid,31); 

    new 
vaultkey[64], vaultdata[64]; 
    
//Load their points
    
format(vaultkey,63,"jb-%s-points",authid); 
    
get_vaultdata(vaultkey,vaultdata,63); 
    
playerpoints[id] = str_to_num(vaultdata); 
}

//////////////////////////////////////////////////////////////
//----------------THE SHOP----------------------------------//
//////////////////////////////////////////////////////////////
public cmd_shop(id)
{
    if(!
get_pcvar_num(cvar_shop))
    {
        
#if defined USE_CC
            
ColorChat(idRED"%s We are currently working on the shop, it will be opened soon."PREFIX)
        
#else
            
client_print(idprint_chat"%s We are currently working on the shop, it will be opened soon."PREFIX)
        
#endif
        
        
return PLUGIN_HANDLED
    
}
    if(
cs_get_user_team(id) != CS_TEAM_T)
    {
        
#if defined USE_CC
            
ColorChat(idRED"%s Only^x03 prisoners^x04 can use the shop"PREFIX)
        
#else
            
client_print(idprint_chat"%s Only prisoners can use the shop!"PREFIX)
        
#endif
        
        
return PLUGIN_HANDLED;
    }
    
    if(
lr_started)
    {
        
#if defined USE_CC
            
ColorChat(idRED"%s You can use the shop while last request is activated"PREFIX)
        
#else
            
client_print(idprint_chat"%s You can't use the shop while last request is activated!"PREFIX)
        
#endif
        
        
return PLUGIN_CONTINUE
    
}
    
    if(
is_rebel[id])
    {
        
#if defined USE_CC
            
ColorChat(idRED"%s Rebelse can't use the shop"PREFIX)
        
#else
            
client_print(idprint_chat"%s Rebels can't use the shop!"PREFIX)
        
#endif
        
        
return PLUGIN_HANDLED
    
}
    
    if(!
is_user_alive(id))
    {
        
#if defined USE_CC
            
ColorChat(idRED"%s You must be^x03 alive^x04 to use the shop"PREFIX)
        
#else
            
client_print(idprint_chat"%s You must be alive to use the shop!"PREFIX)
        
#endif
        
        
return PLUGIN_HANDLED
    
}
    
    else if(
cs_get_user_team(id) == CS_TEAM_T)
    {
        
shopmenu(id)
    }
    return 
PLUGIN_HANDLED
}

public 
shopmenu(id)
{
    if(
is_user_alive(id) && cs_get_user_team(id) == CS_TEAM_T)
    {
        new 
szText[555 char]
        new 
points playerpoints[id]
    
        
formatex(szTextcharsmax(szText), "Jailbreak Shop^nYour Cookies: %d"points)
        new 
shopmenu menu_create(szText"sub_shopmenu")
        
        
formatex(szTextcharsmax(szText), "Gun Gamble: %d Cookies"get_pcvar_num(cvar_gunprice))
        
menu_additem(shopmenuszText"1"0)
        
        
formatex(szTextcharsmax(szText), "Health Cookies %d Cookies"get_pcvar_num(cvar_pillsprice))
        
menu_additem(shopmenuszText"2" 0)
        
        
formatex(szTextcharsmax(szText), "Armor: %d Cookies"get_pcvar_num(cvar_armorprice))
        
menu_additem(shopmenuszText"3"0)

        
formatex(szTextcharsmax(szText), "Camouflage: %d Cookies"get_pcvar_num(cvar_camoprice))
        
menu_additem(shopmenuszText"4"0)
        
        
formatex(szTextcharsmax(szText), "Nade pack: %d Cookies"get_pcvar_num(cvar_nadepackprice))
        
menu_additem(shopmenuszText"5"0)
        
        
menu_setprop(shopmenuMPROP_EXIT MEXIT_ALL);
        
menu_display(idshopmenu0);
    }
    return 
PLUGIN_HANDLED
}

public 
sub_shopmenu(idshopmenuitem)  
{
    if (
item == MENU_EXIT)
    {
        
menu_destroy(shopmenu);
        return 
PLUGIN_HANDLED;
    }
    
    new 
Data[7], Name[64];
    new 
AccessCallback;
    
menu_item_getinfo(shopmenuitemAccessData,5Name63Callback);
    
    new 
Key str_to_num(Data);
    
    switch (
Key)
    {
        case 
1:
        {
            if(
playerpoints[id] < get_pcvar_num(cvar_gunprice))
            {
                
#if defined USE_CC
                    
ColorChat(idRED"%s You don't have enough^x03 Cookies^x04 to buy that item"PREFIX)
                
#else
                    
client_print(idprint_chat"%s You don't got enough Cookies to buy that item"PREFIX)
                
#endif
            
                
return PLUGIN_HANDLED
            
}
            
            else
            {
                
gun_gamble(id)
            }
        }
        
        case 
2
        {
            if(
playerpoints[id] < get_pcvar_num(cvar_pillsprice))
            {
                
#if defined USE_CC
                    
ColorChat(idRED"%s You don't have enough^x03 Cookies^x04 to buy that item"PREFIX)
                
#else
                    
client_print(idprint_chat"%s You don't got enough Cookies to buy that item"PREFIX)
                
#endif
                
                
return PLUGIN_HANDLED
            
}
            
            else
            {
                
give_pills(id)
            }
        }
        
        case 
3:
        {
            if(
playerpoints[id] < get_pcvar_num(cvar_armorprice))
            {
                
#if defined USE_CC
                    
ColorChat(idRED"%s You don't have enough^x03 Cookies^x04 to buy that item"PREFIX)
                
#else
                    
client_print(idprint_chat"%s You don't got enough Cookies to buy that item"PREFIX)
                
#endif            

                
return PLUGIN_HANDLED
            
}
            
            else
            {
                
give_armor(id)
            }
        }
        
        case 
4:
        {
            if(
playerpoints[id] < get_pcvar_num(cvar_camoprice))
            {
                
#if defined USE_CC
                    
ColorChat(idRED"%s You don't have enough^x03 Cookies^x04 to buy that item"PREFIX)
                
#else
                    
client_print(idprint_chat"%s You don't got enough Cookies to buy that item"PREFIX)
                
#endif            

                
return PLUGIN_HANDLED
            
}
            
            else
            {
                
give_camo(id)
            }
        }
        
        case 
5:
        {
            if(
playerpoints[id] < get_pcvar_num(cvar_nadepackprice))
            {
                
#if defined USE_CC
                    
ColorChat(idRED"%s You don't have enough^x03 Cookies^x04 to buy that item"PREFIX)
                
#else
                    
client_print(idprint_chat"%s You don't got enough Cookies to buy that item"PREFIX)
                
#endif            

                
return PLUGIN_HANDLED
            
}
            
            else
            {
                
give_nadepack(id)
            }
        }
    }
    
menu_destroy(shopmenu);
    return 
PLUGIN_HANDLED;
}
        
public 
gun_gamble(id)
{
    if(
random_num(13) == 1)
    {
        
#if defined USE_CC
            
ColorChat(idRED"%s You gambled for a pistol and^x03 you got it!"PREFIX)
        
#else
            
client_print(idprint_chat"%s You gambled for a pistol and you got it!"PREFIX)
        
#endif
        
        
give_item(id"weapon_deagle");
    }
    
    else
    {
        
user_kill(id)
        
        
#if defined USE_CC
            
ColorChat(idRED"%s You gambled for a pistol and^x03 died"PREFIX)
        
#else
            
client_print(idprint_chat"%s You gambled for a pistol and died."PREFIX)
        
#endif
    
}    
    
    
playerpoints[id] -= get_pcvar_num(cvar_gunprice)
    
    return 
PLUGIN_HANDLED
}
        
public 
give_pills(id)
{
    new 
health get_user_health(id) + 50

    set_user_health
(idhealth)
    
    
#if defined USE_CC
        
ColorChat(idRED"%s You bought^x03 pills."PREFIX)
    
#else
        
client_print(idprint_chat"%s You bought pills."PREFIX)
    
#endif
    
    
playerpoints[id] -= get_pcvar_num(cvar_pillsprice)
    
    return 
PLUGIN_HANDLED
}
        
public 
give_armor(id)
{
    new 
armor get_user_armor(id) + 50
    
    set_user_armor
(idarmor)
    
    
#if defined USE_CC
        
ColorChat(idRED"%s You bought^x03 armor."PREFIX)
    
#else
        
client_print(idprint_chat"%s You bought armor."PREFIX)
    
#endif
    
    
playerpoints[id] -= get_pcvar_num(cvar_armorprice

    return 
PLUGIN_HANDLED
}

public 
give_camo(id)
{
    
cs_set_user_model(id"gign")
    
got_camo[id] = true
    
    
#if defined USE_CC
        
ColorChat(idRED"%s You bought^x03 camo."PREFIX)
    
#else
        
client_print(idprint_chat"%s You bought camo."PREFIX)
    
#endif
    
    
playerpoints[id] -= get_pcvar_num(cvar_camoprice)

    return 
PLUGIN_HANDLED
}

public 
give_nadepack(id)
{
    
give_item(id"weapon_flashbang")
    
give_item(id"weapon_hegrenade")
    
give_item(id"weapon_smokegrenade")    
    
    
#if defined USE_CC
        
ColorChat(idRED"%s You bought^x03 a nade pack"PREFIX)
    
#else
        
client_print(idprint_chat"%s you bought a nade pack"PREFIX)
    
#endif
    
    
playerpoints[id] -= get_pcvar_num(cvar_nadepackprice)

    return 
PLUGIN_HANDLED
}

////////////////////////////////////////////////////////////////////
//--------------------GIVE/TAKE POINTS----------------------------//
////////////////////////////////////////////////////////////////////
public cmd_give_points(id,level,cid)
{
    if(!
cmd_access(id,level,cid,3))
        return 
PLUGIN_HANDLED;
 
    new 
target[32], amount[21], reason[21];
 
    
read_argv(1target31 );
    
read_argv(2amount20 );
    
read_argv3reason20 );
 
    new 
player cmd_targetidtarget);
 
    if( ! 
player 
        return 
PLUGIN_HANDLED;
 
    new 
admin_name[32], player_name[32];
    
get_user_name(idadmin_name31);
    
get_user_name(playerplayer_name31);
 
    new 
pointnum str_to_num(amount);
 
    
playerpoints[player] += pointnum;
 
    switch(
get_cvar_num ("amx_show_activity"))
    {
        case 
1client_print0print_chat"%s ADMIN: gave %i points for %s.",PREFIXpointnumplayer_name );
        case 
2client_print0print_chat"%s ADMIN %s: gave %i points for %s.",PREFIXadmin_namepointnumplayer_name );
    }
    
    
client_print(playerprint_chat"%s You received %i points.(Total: %d)",PREFIXpointnumplayerpoints[player]);
 
    
SaveDataid )
 
    return 
PLUGIN_CONTINUE;
}
 
public 
cmd_take_points(id,level,cid)
{
    if(!
cmd_access (idlevelcid3))
        return 
PLUGIN_HANDLED;
 
    new 
target[32], amount[21], reason[21];
 
    
read_argv1target31 );
    
read_argv2amount20 );
    
read_argv3reason20 );
 
    new 
player cmd_targetidtarget);
 
    if(!
player 
        return 
PLUGIN_HANDLED;
 
    new 
admin_name[32], player_name[32];
    
get_user_nameidadmin_name31 );
    
get_user_nameplayerplayer_name31 );
 
    new 
pointnum str_to_numamount );
 
    
playerpoints[player] -= pointnum;
    
    switch(
get_cvar_num("amx_show_activity"))
    {
        case 
1client_print0print_chat"%s ADMIN: took %i points from %s.",PREFIX,  pointnumplayer_name );
        case 
2client_print0print_chat"%s ADMIN %s: took %i points from %s.",PREFIXadmin_namepointnumplayer_name );
    }
    
    
client_printplayerprint_chat"You lost %i points. (Total: %d)"pointnumplayerpoints[player] );
 
    
SaveDataid )
 
    return 
PLUGIN_CONTINUE;
}

/////////////////////////////////////////////////////////////
//--------------------COUNTDOWN STUFF----------------------//
/////////////////////////////////////////////////////////////
public cdmenu(id)
{
    if(
get_user_team(id) != 2)
    {
        
#if defined USE_CC
            
ColorChat(idGREEN"%s^x01 Only^x04 Counter-terrorists^x01 can start a^x04 countdown"PREFIX)
        
#else
            
client_print(idprint_chat"%s Only Counter-terrorist can start a countdown"PREFIX)
        
#endif
        
        
return PLUGIN_HANDLED
    
}
    
    if(
countdown_on)
    {
        
#if defined USE_CC
                 
ColorChat (idGREEN"%s^x01 There is already a^x04 countdown on"PREFIX)
        
#else
            
client_print(idprint_chat"%s There is already a countdown on"PREFIX)
        
#endif
        
        
return PLUGIN_HANDLED
    
}
    
    new 
menu menu_create("\yCountDown Menu""menu_handler")
    
    
menu_additem(menu"\w5 Seconds""1"0)
    
menu_additem(menu"\w10 Seconds""2"0)
    
menu_additem(menu"\w15 Seconds""3"0)
    
    
menu_setprop(menuMPROP_EXITMEXIT_ALL)
    
menu_display(idmenu0)
    
    return 
PLUGIN_HANDLED
}

public 
menu_handler(idmenuitem)
{
    if(
item == MENU_EXIT)
    {
        
menu_destroy(menu)
        return 
PLUGIN_HANDLED
    
}
    
    new 
Data[7], Name[64]
    new 
AccessCallback
    menu_item_getinfo
(menuitemAccessData,5Name63Callback)
    
    new 
Key str_to_num(Data)
    
    switch(
Key)
    {
        case 
1:
        {
            
timer 5
        
}
        
        case 
2:
        {
            
timer 10
        
}
            
        case 
3:
        {
            
timer 15
        
}
    }
    
countdown_on true
    got_name 
false
    countdown
(id)
    
menu_destroy(menu)
    return 
PLUGIN_HANDLED
}

public 
countdown(id)
{
    if(!
got_name)
        
get_user_name(idname32)
        
    switch(
timer)
    {
        case 
0:
        {
            
set_hudmessage(255255255, -1.0, -1.006.03.0)
            
show_hudmessage(0"Go go go")
            
client_cmd(0"spk ^"sound/radio/com_go.wav^"")
            
countdown_on false
        
}
        
        case 
1:
        {
            
client_cmd(0"spk ^"fvox/one.wav^"")
            
set_task(1.0"countdown"0)
        }
        
        case 
2:
        {
            
client_cmd(0"spk ^"fvox/two.wav^"")
            
set_task(1.0"countdown"0)
        }
            
        case 
3:
        {
            
client_cmd(0"spk ^"fvox/three.wav^"")
            
set_task(1.0"countdown"0)
        }
        
        case 
4:
        {
            
client_cmd(0"spk ^"fvox/four.wav^"")
            
set_task(1.0"countdown"0)
        }
        
        case 
5:
        {
            
client_cmd(0"spk ^"fvox/five.wav^"")
            
set_task(1.0"countdown"0)
        }
        
        case 
6:
        {
            
client_cmd(0"spk ^"fvox/six.wav^"")
            
set_task(1.0"countdown"0)
        }
        case 
7:
        {
            
client_cmd(0"spk ^"fvox/seven.wav^"")
            
set_task(1.0"countdown"0)
        }
        
        case 
8:
        {
            
client_cmd(0"spk ^"fvox/eight.wav^"")
            
set_task(1.0"countdown"0)
        }
            
        case 
9:
        {
            
client_cmd(0"spk ^"fvox/nine.wav^"")
            
set_task(1.0"countdown"0)
        }
            
        case 
10:
        {
            
client_cmd(0"spk ^"fvox/ten.wav^"")        
            
set_task(1.0"countdown"0)
        }
        
        case 
11:
        {
            
client_cmd(0"spk ^"fvox/eleven.wav^"")
            
set_task(1.0"countdown"0)
        }
        
        case 
12:
        {
            
client_cmd(0"spk ^"fvox/twelve.wav^"")
            
set_task(1.0"countdown"0)
        }
            
        case 
13:
        {
            
client_cmd(0"spk ^"fvox/thirteen.wav^"")
            
set_task(1.0"countdown"0)
        }
            
        case 
14:
        {
            
client_cmd(0"spk ^"fvox/fourteen.wav^"")
            
set_task(1.0"countdown"0)
        }
        
        case 
15:
        {
            
client_cmd(0"spk ^"fvox/fifteen.wav^"")
            
set_task(1.0"countdown"0)
        }
    }
    
    if(
timer != 0)
    {
        
set_hudmessage(255255255, -1.0, -1.006.03.0)
        
show_hudmessage(0"%s started countdown: %i"nametimer)
        
timer--
    }
    
got_name true
}

/////////////////////////////////////////////////////////////
//-----------------THE DAYS MENU---------------------------//
/////////////////////////////////////////////////////////////
public specialday_check(id)
{
    if(!
get_pcvar_num(cvar_daysmenu))
    {
        
#if defined USE_CC
            
ColorChat(idGREEN"%s^x04 Days^x01 are^x04 disabled"PREFIX)
        
#else
            
client_print(idprint_chat"%s Days are disabled"PREFIX)
        
#endif
        
        
return PLUGIN_HANDLED
    
}
    
    if(
get_user_team(id) != 2)
    {
        
#if defined USE_CC
            
ColorChat(idRED"%s Only^x03 CT's^x04 can start a^x03 special day"PREFIX)
        
#else
            
client_print(idprint_chat"%s Only CT's can start a special day"PREFIX)
        
#endif
        
        
return PLUGIN_HANDLED
    
}
    
    if(!
is_user_alive(id))
    {    
        
#if defined USE_CC
            
ColorChat(idRED"%s You have to be^x03 alive^x04 to start a^x03 special day"PREFIX)
        
#else
            
client_print(idprint_chat"%s You have to be alive to start a special day"PREFIX)
        
#endif
        
        
return PLUGIN_HANDLED
    
}
    
    if(
specialday[20] != DAY_NONE)
    {
        
#if defined USE_CC
            
ColorChat(idRED"%s There is already a day chosen"PREFIX)
        
#else
            
client_print(idprint_chat"%s There is already a day chosen"PREFIX)
        
#endif
        
        
return PLUGIN_HANDLED
    
}
    
    
specialday_menu(id)
    return 
PLUGIN_HANDLED
}

public 
specialday_menu(id)
{
    new 
specialdaymenu menu_create("\ySpecial Days:""specialday_submenu")
    
    
menu_additem(specialdaymenu"\wMusic Day""1"0);
    
menu_additem(specialdaymenu"\wGravity Day""2"0);
    
menu_additem(specialdaymenu"\wFreeday""3"0);
    
menu_additem(specialdaymenu"\wZombie Day""4"0);
    
menu_additem(specialdaymenu"\wLava Day""5"0);
    
menu_additem(specialdaymenu"\wShark Day""6"0);
    
menu_additem(specialdaymenu"\wCage Day""7"0);
    
menu_additem(specialdaymenu"\wDeathMatch Day""8"0);
    
menu_additem(specialdaymenu"\wNight Crawler Day""9"0)
    
menu_additem(specialdaymenu"\wSpartan Day""10"0)
        
    
menu_setprop(specialdaymenuMPROP_EXITMEXIT_ALL);
    
menu_display(idspecialdaymenu0);
}

public 
specialday_submenu(idspecialdaymenuitem)
{
    
    if (
item == MENU_EXIT)
    {
        
menu_destroy(specialdaymenu);
        return 
PLUGIN_HANDLED;
    }
    
    new 
Data[7], Name[64];
    new 
AccessCallback;
    
menu_item_getinfo(specialdaymenuitemAccessData,5Name63Callback);
    
    new 
Key str_to_num(Data);
    
    switch (
Key)
    {
        case 
1:
            
specialday[20] = DAY_MUSIC
        
        
case 2:
            
specialday[20] = DAY_GRAV
        
        
case 3:
            
specialday[20] = DAY_FREEDAY
        
        
case 4:
            
specialday[20] = DAY_ZOMBIE
        
        
case 5:
            
specialday[20] = DAY_LAVA
        
        
case 6:
            
specialday[20] = DAY_SHARK
        
        
case 7:
            
specialday[20] = DAY_CAGE
        
        
case 8:
            
specialday[20] = DAY_DM
        
        
case 9:
            
specialday[20] = DAY_NIGHT
        
        
case 10:
            
specialday[20] = DAY_SPARTAN
            
    
}    
    
    if(
IsPlayer(id) && is_user_alive(id))
        
do_specialday(id)
        
    
menu_destroy(specialdaymenu);
    return 
PLUGIN_HANDLED
}

public 
do_specialday(id)
{
    for(new 
0g_max_clientsi++)
    {
        switch(
specialday[20])
        {
            case 
DAY_MUSIC:
            {
                new 
musicmenu menu_create("\yMusic Choice""musicday_submenu")
    
                
menu_additem(musicmenu"\wPlay Music""1"0)
                
menu_additem(musicmenu"\wStop Music""2"0)
    
                
menu_setprop(musicmenu,MPROP_EXITMEXIT_ALL)
                
menu_display(idmusicmenu0)
            }
            
            case 
DAY_GRAV:
            {
                
server_cmd("sv_gravity 200")
            
                
#if defined USE_CC
                    
ColorChat(0RED"%s Today is^x03 Gravity day"PREFIX)
                
#else
                    
client_print(0print_chat"%s Today is Gravity day"PREFIX)
                
#endif
                
                
gravityday true
            
}
            
            case 
DAY_FREEDAY:
            {
                if(
IsPlayer(id) && is_user_alive(id))
                {
                    if(
cs_get_user_team(i) == CS_TEAM_T)
                        
set_user_rendering(ikRenderFxGlowShell25500kRenderNormal16)
                }
                
                
#if defined USE_CC
                    
ColorChat(0RED"%s Today is^x03 Freeday"PREFIX)
                
#else
                    
client_print(0print_chat"%s Today is Freeday"PREFIX)
                
#endif
            
}
            
            case 
DAY_ZOMBIE:
            {
                if(
IsPlayer(i) && is_user_alive(i))
                {    
                    switch(
cs_get_user_team(i))
                    {
                        case 
CS_TEAM_T:
                        {
                            
set_user_health(i150)
                            
                            
give_item(i"weapon_ak47")
                            
give_item(i"weapon_m4a1")
                            
                            
cs_set_user_bpammo(iCSW_AK4790)
                            
cs_set_user_bpammo(iCSW_M4A190)
                        }
                        
                        case 
CS_TEAM_CT:
                        {
                            if(
is_user_alive(i))
                            {
                                
set_user_health(i500)
                                
can_have_gun[i] = false
                            
}
                        }
                    }
                }
                
                
client_cmd(0"mp3 play ^"%s^""zombiesound)
                
                
#if defined USE_CC
                    
ColorChat(0RED"%s Today is^x03 Zombie Day"PREFIX)
                
#else
                    
client_print(0print_chat"%s Today is Zombie day"PREFIX)
                
#endif                
            
}
            
            case 
DAY_LAVA:
            {
                
#if defined USE_CC
                    
ColorChat(0RED"%s Today is^x03 Lava Day,^x03 Stand on a^x03 spray at all times"PREFIX)
                
#else
                    
client_print(0print_chat"%s Today is Lava day, Stand on a spray at all times"PREFIX)
                
#endif
            
}
            
            case 
DAY_SHARK:
            {
                if(
IsPlayer(i) && is_user_alive(i))
                {
                    switch(
cs_get_user_team(i))
                    {
                        case 
CS_TEAM_T:
                        {
                            
set_user_health(i200)
                            
                            
give_item(i"weapon_ak47")
                            
give_item(i"weapon_m4a1")
                            
                            
cs_set_user_bpammo(iCSW_AK4790)
                            
cs_set_user_bpammo(iCSW_M4A190)
                        }
                        
                        case 
CS_TEAM_CT:
                        {
                            if(
is_user_alive(i))
                            {
                                
set_user_noclip(i1)
                                
set_user_health(i300)
                            }
                        }
                    }
                    
                    
#if defined USE_CC
                        
ColorChat(0RED"%s Today is^x03 Shark Day"PREFIX)
                    
#else    
                        
client_print(0print_chat"%s Today is Shark day"PREFIX)
                    
#endif
                
}
            }
                
            case 
DAY_CAGE:
            {
                
#if defined USE_CC
                    
ColorChat(0RED"%s Today is cage day"PREFIX)
                
#else
                    
client_print(0print_chat"%s Today is a cage day"PREFIX)
                
#endif
            
}
            
            case 
DAY_DM:
            {
                
server_cmd("mp_friendlyfire 1")
                
                
#if defined USE_CC
                    
ColorChat(0RED"%s Today is^x03 Deathmatch Day,^x04 Last survivor chooses lr"PREFIX)
                
#else
                    
client_print(0print_chat"%s Today is Deathmatch Day, Last survivor chooses lr"PREFIX)
                
#endif
            
}
            
            case 
DAY_NIGHT:
            {
                if(
IsPlayer(i) && is_user_alive(i))
                {    
                    switch(
cs_get_user_team(i))
                    {
                        case 
CS_TEAM_T:    
                        {
                            
give_item(i"weapon_m4a1")
                            
give_item(i"weapon_deagle")
                            
                            
cs_set_user_bpammo(iCSW_M4A190)
                            
cs_set_user_bpammo(iCSW_DEAGLE35)
                        }
                        
                        case 
CS_TEAM_CT:
                        {
                            
strip_weapons(i)
                            
                            
set_user_rendering(ikRenderFxGlowShell000kRenderTransAlpha0)
                            
can_have_gun[i] = false
                        
}
                    }
                }
                
                
#if defined USE_CC
                    
ColorChat(0RED"%s Today is a^x03 NightCrawler Day"PREFIX)
                
#else
                    
client_print(0print_chat"%s Today is a NightCrawler Day"PREFIX)
                
#endif
            
}
            
            case 
DAY_SPARTAN:
            {
                if(
IsPlayer(i) && is_user_alive(i))
                {
                    switch(
cs_get_user_team(i))
                    {
                        case 
CS_TEAM_T:
                        {
                            
give_item(i"weapon_shield")
                            
give_item(i"weapon_deagle")
                            
                            
cs_set_user_bpammo(iCSW_DEAGLE35)
                        }
                        
                        case 
CS_TEAM_CT:
                        {
                            
give_item(i"weapon_deagle")
                            
give_item(i"weapon_m4a1")
                            
                            
cs_set_user_bpammo(iCSW_DEAGLE35)
                            
cs_set_user_bpammo(iCSW_M4A190)
                        }
                    }
                }
                
                
#if defined USE_CC
                    
ColorChat(0RED"%s Today is^x03 Spartan Day"PREFIX)
                
#else
                    
client_print(0print_chat"%s Today is Spartan Day"PREFIX)
                
#endif
            
}
        }
    }
}

public 
musicday_submenu(idmusicmenuitem)
{
    if(
item == MENU_EXIT)
    {
        
menu_destroy(musicmenu)
        return 
PLUGIN_HANDLED
    
}
    
    new 
Data[7], Name[64]
    new 
AccessCallback
    menu_item_getinfo
(musicmenuitemAccessData5Name63Callback)
    
    new 
key str_to_num(Data)
    
    switch(
key)
    {
        case 
1:
        {
            switch(
random_num(13))
            {
                case 
1:
                {
                    
client_cmd(0"mp3 play ^"%s^""musicday_song)
                }
                
                case 
2:
                {
                    
client_cmd(0"mp3 play ^"%s^""musicday_song2)
                }
                case 
3:
                {
                    
client_cmd(0"mp3 play ^"%s^""musicday_song3)
                }
            }
        }
        
        case 
2:
        {
            
client_cmd(0"mp3 stop")
        }
    }
    
menu_display(idmusicmenu0)
    return 
PLUGIN_CONTINUE
}
////////////////////////////////////////////////////////
//-------------SHOW THE REMAINING PLAYERS-------------//
////////////////////////////////////////////////////////
public players_hud()
{
    if(
get_pcvar_num(cvar_showplayers))
    {    
        
g_prisoners 0;
        
g_guards 0;
            
        for(new 
0g_max_clientsi++)
        {
            new 
id i;
        
            if(
is_user_alive(id) && cs_get_user_team(id) == CS_TEAM_CT)
            {
                
g_guards++;
            }
            else if(
is_user_alive(id) && cs_get_user_team(id) == CS_TEAM_T)
            {    
                
g_prisoners++;
            }    
        }
        
set_hudmessage(02550, -1.00.01)
        
show_hudmessage(0,"Prisoners: %i^nGuards: %i"g_prisonersg_guards)
    }
}
/*=====================================================================
            LAST REQUEST MAIN MENU
=====================================================================*/

public lr_check(id)
{
    if (
get_user_team(id) != 1)
    {
        return 
PLUGIN_HANDLED
    
}
    
    if(!
is_user_alive(id))
    {
        return 
PLUGIN_HANDLED
    
}
    if(
lr_started)
    {
        return 
PLUGIN_HANDLED
    
}
    
    new 
ctCounttrCount
    
new players[32] = 0
    
new pnum
    get_players
(playerspnum"a");
    for (new 
0g_max_clientsi++)
    {
        if (!
is_user_alive(i))
        {
            continue;
        }
        
        switch (
cs_get_user_team(i))
        {
            case 
CS_TEAM_CT:
            {
                
ctCount++;
            }
            
            case 
CS_TEAM_T:
            {
                
trCount++;
            }
        }
    }
    
    if (
trCount 1)
    {
        
#if defined USE_CC
            
ColorChat(idGREEN"%s^x01 There are to many^x04 prisoners^x01 left."PREFIX)
        
#else
            
client_print(idprint_chat"%s There are to many prisoners left."PREFIX)
        
#endif
        
        
return PLUGIN_HANDLED;
    }
    
    if (
ctCount == 0)
    {
        
#if defined USE_CC
            
ColorChat(idGREEN"%s^x01 There is no^x04 CT"PREFIX)
        
#else
            
client_print(idprint_chat"%s There is no CT"PREFIX)
        
#endif
        
        
return PLUGIN_HANDLED;
    }
    if(
cs_get_user_team(id) == CS_TEAM_T)    
    {    
        
lr_menu(id)
    }
    return 
PLUGIN_HANDLED
}

public 
lr_menu(id)
{
    new 
lrmenu menu_create("\yLast Request:""sub_lr_menu")
        
    
menu_additem(lrmenu"\wGames""1"0);
    
menu_additem(lrmenu"\wRebel options""2"0);
    
    
menu_setprop(lrmenuMPROP_EXITMEXIT_ALL);
    
menu_display(idlrmenu0);

    return 
PLUGIN_HANDLED;
}    

public 
sub_lr_menu(idlrmenuitem)
{
    
    if (
item == MENU_EXIT)
    {
        
menu_destroy(lrmenu);
        return 
PLUGIN_HANDLED;
    }
    
    new 
Data[7], Name[64];
    new 
AccessCallback;
    
menu_item_getinfo(lrmenuitemAccessData,5Name63Callback);
    
    new 
Key str_to_num(Data);
    
    switch (
Key)
    {
        case 
1:
        {
            
gameslrmenu(id)
        }
        case 
2
        {
            
rebelmenu(id)
        }
    }
    
    
menu_destroy(lrmenu);
    
    return 
PLUGIN_HANDLED;
}
        

/*==================================================================
                LR GAMES MENU
==================================================================*/

public gameslrmenu(id)
{    
    {
        new 
gamelrmenu menu_create("\yLr Games:""sub_gameslr_menu")
    
        
menu_additem(gamelrmenu"\wKnife Fight""1"0);
        
menu_additem(gamelrmenu"\wShot 4 Shot""2"0);
        
menu_additem(gamelrmenu"\wGrenade Duel""3"0);
        
menu_additem(gamelrmenu"\wScout Duel""4"0);
        
menu_additem(gamelrmenu"\wRace""5"0);
        
menu_additem(gamelrmenu"\wSpray Contest""6"0);
        
menu_additem(gamelrmenu"\wGun Toss""7"0);
        
menu_additem(gamelrmenu"\wShotty War""8"0);
        
menu_additem(gamelrmenu"\wSpecialday next round""9"0);
        
        
menu_setprop(gamelrmenuMPROP_EXITMEXIT_ALL);
        
menu_display(idgamelrmenu0);
    }
    return 
PLUGIN_HANDLED
}

public 
sub_gameslr_menu(idgamelrmenuitem)
{
    
    if (
item == MENU_EXIT)
    {
        
menu_destroy(gamelrmenu);
        return 
PLUGIN_HANDLED;
    }
    
    new 
Data[7], Name[64];
    new 
AccessCallback;
    
menu_item_getinfo(gamelrmenuitemAccessData,5Name63Callback);
    
    new 
Key str_to_num(Data);
    
    switch (
Key)
    {
        case 
1:
            
lrgame[id] = LR_KNIFE
        
        
case 2
            
lrgame[id] = LR_S4S
        
        
case 3
            
lrgame[id] = LR_NADE
        
        
case 4
            
lrgame[id] = LR_SCOUT
        
        
case 5
            
lrgame[id] = LR_RACE
        
        
case 6
            
lrgame[id] = LR_SPRAY
        
        
case 7:
            
lrgame[id] = LR_TOSS
    
        
case 8:
            
lrgame[id] = LR_SHOTWAR
            
        
case 9:
            
lrgame[id] = LR_SPECIAL
    
}
    
menu_destroy(gamelrmenu)
    
playermenu(id)
    
    return 
PLUGIN_HANDLED;
}

/*=====================PLAYERMENU===========================*/
public playermenu(id)
{
    
    new 
menu menu_create("\yChoose your opponent:""submenu");
    
    new 
players[32], pnumtempid;
    new 
szName[32], szTempid[10];
    
    
get_players(playerspnum"a");
    for(new 
ipnumi++)
    {
        
tempid players[i]
        
        if (
cs_get_user_team(tempid) != CS_TEAM_CT)
        {
            continue;
        }
        
        
get_user_name(tempidszName31);
        
num_to_str(tempidszTempid9);
        
menu_additem(menuszNameszTempid0);
    }
    
    
menu_display(idmenu);
    return 
PLUGIN_HANDLED;
}

public 
submenu(idmenuitem)
{
    if( 
item == MENU_EXIT )
    {
        
menu_destroy(menu);
        return 
PLUGIN_HANDLED;
    }
    
    new 
data[6], iName[64];
    new 
accesscallback;
    
menu_item_getinfo(menuitemaccessdata,5iName63callback);
    
    new 
tempid str_to_num(data);
    
    new 
mapname[33]
    
get_mapname(mapname32)
    
    new 
ct_origin[3], te_origin[3]
    
    switch(
lrgame[id])
    {
        case 
LR_KNIFE:
        {    
            
strip_user_weapons(tempid);
            
give_item(tempid"weapon_knife");
            
            
strip_user_weapons(id);
            
set_user_health(id100);
            
give_item(id"weapon_knife");
            
            new 
szName[32], szName2[32];
            
get_user_name(idszName31);
            
get_user_name(tempidszName231);
            
            
#if defined USE_CC
                     
ColorChat(idGREEN"%s^x03 %s VS^x03 %s^x04 Knife Fight"PREFIXszNameszName2)
            
#else     
            
            
client_print(idprint_chat"%s %s VS %s Knife Fight"PREFIXszNameszName2);
            
            
#endif
            
            
if( is_user_alive(tempid) )
                
set_user_health(tempid100);
            
            if(
get_pcvar_num(cvar_teleport) && equali(mapname,"some1s_jailbreak"))
            {
                
ct_origin[0] = -759ct_origin[1] = 1047ct_origin[2] = 100
                te_origin
[0] = -585te_origin[1] = 867te_origin[2] = 100
                set_user_origin
(id,te_origin)
                
set_user_origin(tempid,ct_origin)

            }
            
set_task(0.1"beacon"id)
            
set_task(0.1"beacon"tempid)
        }

        case 
LR_S4S:
        {
            
strip_user_weapons(tempid)
            new 
iWep give_item(tempid"weapon_deagle")
            
cs_set_weapon_ammo(iWep0)
            
cs_set_user_bpammo(tempidCSW_DEAGLE,0)
            
            
strip_user_weapons(id)
            
set_user_health(id100)
            new 
iWep2 give_item(id"weapon_deagle")    
            
cs_set_weapon_ammo(iWep21
            
cs_set_user_bpammo(idCSW_DEAGLE0)
            
            new 
szName[32], szName2[32]
            
get_user_name(idszName31)
            
get_user_name(tempidszName231)
            
            
#if defined USE_CC
                     
ColorChat(idGREEN"%s^x03 %s^x01 VS^x03 %s^x04 Shot^x01 For^x04 Shot"PREFIXszNameszName2)
            
#else     
            
            
client_print(idprint_chat"%s %s VS %s Shot for Shot"PREFIXszNameszName2
            
            
#endif
            
            
if( is_user_alive(tempid))
                
set_user_health(tempid100);
                
            if(
get_pcvar_num(cvar_teleport) && equali(mapname"some1s_jailbreak"))
            {
                
ct_origin[0] = -1352ct_origin[1] = 271ct_origin[2] = 38
                te_origin
[0] = -1338te_origin[1] = -782te_origin[2] = 38

                set_user_origin
(id,te_origin)
                
set_user_origin(tempid,ct_origin)
            }
            
            
set_task(0.1"beacon"id)
            
set_task(0.1"beacon"tempid)
            
            
client_cmd(0"mp3 play ^"%s^""s4ssound)
            
is_lr_s4s true
        
}

        case 
LR_NADE:
        {
            
strip_user_weapons(tempid);
            
give_item(tempid"weapon_knife")
            
give_item(tempid"weapon_hegrenade");
            
cs_set_user_bpammo(tempid,CSW_HEGRENADE,50)
            
            
strip_user_weapons(id)
            
set_user_health(id100)
            
give_item(id"weapon_knife")
            
give_item(id"weapon_hegrenade")
            
cs_set_user_bpammo(id,CSW_HEGRENADE,50)
            
            
            new 
szName[32], szName2[32]
            
get_user_name(idszName31);
            
get_user_name(tempidszName231);
            
            
#if defined USE_CC
                               
ColorChat(idGREEN,"%s^x03 %s^x01 VS^x03 %s^x04 Grenade Duel"PREFIXszNameszName);
                 
#else

            
client_print(idprint_chat,"%s %s VS %s Grenade Duel"PREFIXszNameszName2); 
            
            
#endif
            
            
if( is_user_alive(tempid) )
                
set_user_health(tempid100);
            
            if(
get_pcvar_num(cvar_teleport) && equali(mapname,"some1s_jailbreak"))
            {
                
ct_origin[0] = -1756ct_origin[1] = -2526ct_origin[2] = 36
                te_origin
[0] = -3020te_origin[1] = -2529te_origin[2] = 36
                set_user_origin
(id,te_origin)
                
set_user_origin(tempid,ct_origin)
            }
                
            
set_task(0.1"beacon"id)
            
set_task(0.1"beacon"tempid)
            
        }

        case 
LR_SCOUT:
        {
            
strip_user_weapons(tempid);
            
give_item(tempid"weapon_scout");
            
give_item(tempid"weapon_knife")
            
cs_set_user_bpammo(tempid,CSW_SCOUT,10)
            
            
strip_user_weapons(id)
            
set_user_health(id100)
            
give_item(id"weapon_knife")
            
give_item(id"weapon_scout")
            
cs_set_user_bpammo(id,CSW_SCOUT,10)
            
            new 
szName[32], szName2[32]
            
get_user_name(idszName31);
            
get_user_name(tempidszName231);
            
            
#if defined USE_CC
                     
ColorChat(idGREEN,"%s^x03 %s^x01 VS^x03 %s^x04 Scout Duel"PREFIXszNameszName2)
            
#else
            
            
client_print(idprint_chat"%s %s VS %s Scout Duel"PREFIXszNameszName2)    
            
            if( 
is_user_alive(tempid) )
                
set_user_health(tempid100);
                
        
            if(
get_pcvar_num(cvar_teleport) && equali(mapname,"some1s_jailbreak"))
            {
                
ct_origin[0] = -2898ct_origin[1] = -2040ct_origin[2] = 37
                te_origin
[0] = -2908te_origin[1] = 905te_origin[2] = 37
                set_user_origin
(id,te_origin)
                
set_user_origin(tempid,ct_origin)
            }
            
set_task(0.1"beacon"id)
            
set_task(0.1"beacon"tempid)
            
        }
                
        case 
LR_RACE:
        {
            
strip_user_weapons(tempid);
            
give_item(tempid"weapon_knife");
            
            
strip_user_weapons(id);
            
set_user_health(id100);
            
give_item(id"weapon_knife");
            
            new 
szName[32], szName2[32];
            
get_user_name(idszName31);
            
get_user_name(tempidszName231);
            
            
#if defined USE_CC
                     
ColorChat(idGREEN,"%s^x03 %s^x01 VS^x03 %s^x04 Race",
            
#else     
                 
            
client_print(idprint_chat"%s %s VS %s^n Race"PREFIXszNameszName2);
            
            
#endif
            
            
if( is_user_alive(tempid) )
                
set_user_health(tempid100);
                
            
set_task(0.1"beacon"id)
            
set_task(0.1"beacon"tempid)
            
            
client_cmd(0"mp3 play ^"%s^""race_go)
        }
        
        case 
LR_SPRAY:
        {
            
strip_user_weapons(tempid);
            
give_item(tempid"weapon_knife");
            
            
strip_user_weapons(id);
            
set_user_health(id100);
            
give_item(id"weapon_knife");    

            new 
szName[32], szName2[32];
            
get_user_name(idszName31);
            
get_user_name(tempidszName231);
            
            
#if defined USE_CC
            
            
ColorChat(idGREEN,"%s^x03 %s^x01 VS^x03 %s^x04 Spray Contest"PREFIXszNameszName2)
            
        
            
            
client_print(idchat_print,"%s %s VS %s Spray Contest"PREFIXszNameszName2);

        
            
            
server_cmd("decalfrequency 0")
            
spray_on true
            
if( is_user_alive(tempid) )
                
set_user_health(tempid100);
                
            
set_task(0.1"beacon"id)
            
set_task(0.1"beacon"tempid)
            
        }

        case 
LR_TOSS:
        {
            
strip_user_weapons(tempid);
            new 
weapon give_item(tempid"weapon_deagle")
            
give_item(tempid"weapon_knife")
            
cs_set_weapon_ammo(weapon0)
            
cs_set_user_bpammo(tempid,CSW_DEAGLE0)
            
            
strip_user_weapons(id);
            new 
weapon2 give_item(id"weapon_deagle")
            
give_item(id"weapon_knife")
            
cs_set_weapon_ammo(weapon20)
            
cs_set_user_bpammo(id,CSW_DEAGLE0)
            
            new 
szName[32], szName2[32]
            
get_user_name(idszName31);
            
get_user_name(tempidszName231);
            
            
#if defined USE_CC
            
            
ColorChat(idGREEN,"%s^x03 %s^x01 VS^x03 %s^x04 Gun Toss"PREFIXszNameszName2
            
            
#else
            
            
client_print(Idprint_chat"%s %s VS %s Gun Toss"PREFIXszNameszName2)
            
            
#endif
            
            
if( is_user_alive(tempid) )
                
set_user_health(tempid100);
                
            
set_task(0.1"beacon"id)
            
set_task(0.1"beacon"tempid)
        }

        case 
LR_SHOTWAR:
        {
            
strip_user_weapons(tempid);
            
give_item(tempid"weapon_m3");
            
give_item(tempid"weapon_knife")
            
cs_set_user_bpammo(tempid,CSW_M3,100)
            
            
strip_user_weapons(id)
            
set_user_health(id255)
            
give_item(id"weapon_m3")
            
give_item(id"weapon_knife")
            
cs_set_user_bpammo(id,CSW_M3,10)    
            
            new 
szName[32], szName2[32]
            
get_user_name(idszName31);
            
get_user_name(tempidszName231);
            
            
#if Defined USE_CC
            
            
ColorChat(IdGREEN,"%s^03 %s^x01 VS^x03 %s^x04 Shotty War"PREFIXszNameszName2)
            
            
#else
            
            
client_print(idprint_chat"%s %s VS %s Shotty War"PREFIXszNameszName2)    
            
            
#endif
            
            
if( is_user_alive(tempid) )
                
set_user_health(tempid255);
                
            
set_task(0.1"beacon"id)
            
set_task(0.1"beacon"tempid)
        }
        
        case 
LR_SPECIAL:
        {
            new 
szName[32]
            
get_user_name(idszName31)
            
            
#if defined
            
ColorChat(idGREEN,"%s^x03 %s^x01 wan to choose a^x04 Special Day^x01 next round"PREFIXszName)
            
            
#else
            
            
client_print(idprint_chat"%s %s want to choose a Special Day next round"PREFIXszName)
            
            
#endif
            
            
lr_next_special[id] = true
        
}
    }
    
menu_destroy(menu)
    
lr_started true
    
return PLUGIN_HANDLED
}
/*================================================================
            LR REBELMENU
================================================================*/
public rebelmenu(id)
{    
    {
        new 
rebelingmenu menu_create("\yRebel Options:""sub_rebelmenu")
        
        
menu_additem(rebelingmenu"\wRambo""1"0);
        
menu_additem(rebelingmenu"\wDeagle Dude""2"0);
        
menu_additem(rebelingmenu"\wCrazy guy""3"0);
        
menu_additem(rebelingmenu"\wUber Glocker""4"0);
        
        
menu_setprop(rebelingmenuMPROP_EXITMEXIT_ALL);
        
menu_display(idrebelingmenu0);
    }
    
    return 
PLUGIN_HANDLED;
}

public 
sub_rebelmenu(idrebelingmenuitem)
{
    
    if (
item == MENU_EXIT)
    {
        
menu_destroy(rebelingmenu);
        return 
PLUGIN_HANDLED;
    }
    
    new 
Data[7], Name[64];
    new 
AccessCallback;
    
menu_item_getinfo(rebelingmenuitemAccessData,5Name63Callback);
    
    new 
Key str_to_num(Data);
    
    switch (
Key)
    {
        case 
1:
        {
            
strip_user_weapons(id)
            
set_user_health(id250)
            
give_item(id"weapon_knife")
            
give_itemid"weapon_m249" );
            
cs_set_user_bpammo(id,CSW_M249,300)

            
set_hudmessage(random_num(1,255), random_num(1,255), random_num(1,255), -1.0, -1.006.012.0)
            
show_hudmessage(0"= RAMBO IS HERE =")
            
lr_started true
        
}
        
        case 
2
        {
            
strip_user_weapons(id)
            
set_user_health(id500)
            
give_item(id"weapon_knife")
            
give_itemid"weapon_deagle")
            
cs_set_user_bpammo(id,CSW_DEAGLE,35)
            
            
set_hudmessage(random_num(1,255), random_num(1,255), random_num(1,255), -1.0, -1.006.012.0)
            
show_hudmessage(0"= DEAGLE DUDE IS HERE =")
            
lr_started true
        
}
        
        case 
3
        {    
            
strip_user_weapons(id)
            
set_user_health(id1)
            
give_itemid"weapon_ak47")
            
give_item(id"weapon_knife")
            
cs_set_user_bpammo(id,CSW_AK47,200)
            
set_user_rendering(idkRenderFxGlowShell000kRenderTransAlpha15)
            
            
set_hudmessage(random_num(1,255), random_num(1,255), random_num(1,255), -1.0, -1.006.012.0)
            
show_hudmessage(0"= CRAZY GUY IS HERE =")
            
lr_started true
        
}
        
        case 
4
        {
            
strip_user_weapons(id)
            
set_user_health(id500)
            
give_itemid"weapon_glock18")
            
give_item(id"weapon_knife")
            
cs_set_user_bpammo(id,CSW_GLOCK18,200)
            
set_user_rendering(idkRenderFxGlowShell25500kRenderTransAlpha255)
            
            
set_hudmessage(random_num(1,255), random_num(1,255), random_num(1,255), -1.0, -1.006.012.0)
            
show_hudmessage(0"= UBER GLOCKER IS HERE =")
            
lr_started true
        
}
    }
    
    
menu_destroy(rebelingmenu);
    
lrgame[id] = LR_REBEL
    
return PLUGIN_HANDLED;
}
    
/*========================SHOT 4 SHOT BULLET==========================*/
public fw_primary_attack(ent)
{
    if(!
is_lr_s4s)
        return 
HAM_IGNORED
    
    
//Get owner of entity
    
    
new id pev(ent,pev_owner)
    
    
//if he's not alive
    
if(!is_user_alive(id))
    {
        return 
HAM_IGNORED
    
}
    
    
//If player is in lr and can shoot deagle
    
if(lr_started)
    {
        
//Search enemy
        
new players[32], pnumtempid
        get_players
(playerspnum"a")
        for(new 
ipnumi++)
        {
            
tempid players[i]
            
//if he's in lr and can't shoot deagle and is alive
            
            
if(is_user_alive(tempid) && (id !=tempid))
            {
                
gun_switch(idtempid)
            }
        }
        return 
HAM_HANDLED
    
}
    return 
HAM_IGNORED
}  

public 
gun_switch(idtempid)
{
    if(!
is_lr_s4s || !is_user_alive(id))
    {
        return 
PLUGIN_HANDLED
    
}
    
    if(
lr_started)
    {
            
        if(
is_user_alive(tempid) && (id !=tempid) && !shot_deagle[id])
        {
            
strip_user_weapons(tempid)
            new 
deagle give_item(tempid"weapon_deagle")
            
cs_set_weapon_ammo(deagle1)
            
cs_set_user_bpammo(tempidCSW_DEAGLE0)
            
            
shot_deagle[id] = true
            shot_deagle
[tempid] = false
        
}
    }
    return 
PLUGIN_HANDLED
}  

///////////////////////////////////////////////
//----------BEACON---------------------------//
///////////////////////////////////////////////

public beacon(id)
{
    if(
/*!is_user_connected(id) || */!is_user_alive(id))
        return 
PLUGIN_HANDLED
        
    
if(cs_get_user_team(id) == CS_TEAM_CT)
    {
        static 
origin[3]
        
get_user_origin(idorigin)
        
message_begin(MSG_BROADCASTSVC_TEMPENTITY)
        
write_byte(TE_BEAMCYLINDER)    // TE id
        
write_coord(origin[0])         // x
        
write_coord(origin[1])        // y
        
write_coord(origin[2]-20)    // z
        
write_coord(origin[0])        // x axis
        
write_coord(origin[1])        // y axis
        
write_coord(origin[2]+200)    // z axis
        
write_short(beacon_sprite)    // sprite
        
write_byte(0)            // startframe   
        
write_byte(1)            // framerate   
        
write_byte(6)            // life
        
write_byte(2)              // width
        
write_byte(1)               // noise    
        
write_byte(0)              // red  
        
write_byte(0)               // green 
        
write_byte(250)         // blue
        
write_byte(200)            // brightness
        
write_byte(0)            // speed
        
message_end()
    }
    
    else if(
cs_get_user_team(id) == CS_TEAM_T)
    {
        static 
origin[3]
        
get_user_origin(idorigin)
        
message_begin(MSG_BROADCASTSVC_TEMPENTITY)
        
write_byte(TE_BEAMCYLINDER)    // TE id
        
write_coord(origin[0])         // x
        
write_coord(origin[1])        // y
        
write_coord(origin[2]-20)    // z
        
write_coord(origin[0])        // x axis
        
write_coord(origin[1])        // y axis
        
write_coord(origin[2]+200)    // z axis
        
write_short(beacon_sprite)    // sprite
        
write_byte(0)            // startframe   
        
write_byte(1)            // framerate   
        
write_byte(6)            // life
        
write_byte(2)              // width
        
write_byte(1)               // noise    
        
write_byte(250)            // red  
        
write_byte(0)               // green 
        
write_byte(0)             // blue
        
write_byte(200)            // brightness
        
write_byte(0)            // speed
        
message_end()
    }
    
set_task(1.0"beacon"id)

    return 
PLUGIN_HANDLED
}

///////////////////////////////////////////////
//----------T GAG BY Exolent[jNr]------------//
///////////////////////////////////////////////
public FwdSetVoice(receiversenderbool:listen)
{
    if(!
get_pcvar_num(cvar_tvoiceblock))
        return 
PLUGIN_HANDLED
        
    
if( !(<= receiver <= g_max_clients)
    || !
g_connected[receiver]
    || !(
<= sender <= g_max_clients)
    || !
g_connected[sender] ) return FMRES_IGNORED;
    
    new 
CsTeams:team cs_get_user_team(sender);
    if( (
team == CS_TEAM_T || team == CS_TEAM_CT && !is_user_alive(sender)) && !access(senderADMIN_VOICE) )
    {
        
engfunc(EngFunc_SetClientListeningreceiversender0);
        return 
FMRES_SUPERCEDE;
    }
    
    return 
FMRES_IGNORED;
}  

//////////////////////////////////////////////
//------------WEAPON BLOCKER----------------//
//////////////////////////////////////////////
public Event_CurWeapon(id
{     
    new 
weaponID read_data(2

    if(
can_have_gun[id])
        return 
PLUGIN_CONTINUE
        
    
if(weaponID != CSW_KNIFE)
        
client_cmd(id"weapon_knife")
    
    return 
PLUGIN_CONTINUE
}

#endif


i get 3 error plz help

Error: Undefined symbol "rebelmenu" on line 1822
Error: Expected token: "#endif", but found "-end of file-" on line 2534
Error: Expected token: "}", but found "-end of file-" on line 2534

3 Errors.
Could not locate output file C:\Documents and Settings\Reason\Skrivbord\Jailbreak04.amx (compile failed).
plz help
Removfe these from the end:
#endif

}
matsi is offline
2reason2kill
Senior Member
Join Date: Feb 2011
Old 05-16-2011 , 13:36   Re: [HELP] CFJAIL
Reply With Quote #3

Quote:
Originally Posted by matsi View Post
Removfe these from the end:
#endif

}
okay i will see
2reason2kill 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 04:23.


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