Raised This Month: $ Target: $400
 0% 

Menu Not Showing to T


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
richierich88888
Junior Member
Join Date: Sep 2011
Old 09-25-2011 , 05:04   Menu Not Showing to T
Reply With Quote #1

this plugin is compiling 100% with 0 error but /shop is not working for T and also please dont remove cmd_shop ...first users have to go through cmd_shop and then shopmenu
also commands like amx_give_points is not working??? Y



PHP Code:

/*
Cookie Force Jailbreak Plugin

Description:

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_s hop_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_blocktv oice Blocks     Terrorist from voice chat
- jb_enable_days             Enables the days menu
- jb_teleport                Enables/ disables the teleports on LR



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 set_bit(%1,%2)         %1 |=  ( 1 << ( %2 & 31 ) )
#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[] = "[AMXX]^x04:" // Prefix 
#else
    
new const PREFIX[] = "[AMXX]:" // 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_camoprice        // How many Cookies camo costs
new cvar_invprice
new cvar_gunpackprice
new cvar_grenadeprice
new cvar_flashprice
new cvar_crowprice
new cvar_nadepackprice    // How many Cookies nades cost
new cvar_headshotpoints    // How many extra points a t gets for killing a ct
        // 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 g_bHasInvis    


//   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 g_guards
new g_prisoners



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


new boolgot_camo[33]            // Does player got camo?
new boolis_rebel[33]            // Is the player a rebel?
new boolcan_have_gun[33]      // Can he have a gun?
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""3")
    
cvar_grenadeprice register_cvar("jb_shop_grenadeprice""5")
    
cvar_flashprice   register_cvar("jb_shop_flashprice""15")
    
cvar_pillsprice   register_cvar("jb_shop_pillsprice""15")
    
cvar_gunprice     register_cvar("jb_shop_gunprice""25")
    
cvar_crowprice    register_cvar("jb_shop_crowprice""30")
    
cvar_invprice     register_cvar("jb_shop_invprice""45"
    
cvar_camoprice =    register_cvar("jb_shop_camoprice""50")
    
cvar_gunpackprice register_cvar("jb_shop_gunpacksprice""60")

    
cvar_showplayers register_cvar("jb_show_players""1")
    
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")
    
    
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 /rules""showrules")
    
register_clcmd("say_team /rules""showrules")
    
register_clcmd("say /shop""cmd_shop")
    
register_clcmd("say_team /shop""cmd_shop")
    
    
//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_model("models/player/gign/gign.mdl")
    
}
///////////////////////////////////////////////////
//-------------PLAYER SPAWN----------------------//
///////////////////////////////////////////////////
public Event_Playerspawn(id)
{
        
        if(
cs_get_user_team(id) == CS_TEAM_T)
        {
            if(
got_camo[id])
            {
                
cs_reset_user_model(id)
                
got_camo[id] = false
            
}
            
            if(
is_rebel[id])
                
unrebel(id)
                
            
strip_weapons(id)
            
is_rebel[id] = false
            
        
}
        
can_have_gun[id] = true
        set_user_rendering
(id)
            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))
        {
            if(!
is_rebel[victim])
            {
                
#if defined USE_CC
                    
ColorChat(0RED"%s Guard^x03 %s^x04 killed prisoner^x03 %s!"PREFIXAttackerNameVictimName)
                
#else
                    
client_print(0print_chat"%s Guard %s killed prisoner %s!"PREFIXAttackerNameVictimName)
                
#endif
            
}
        
            else
            {
                
#if defined USE_CC
                    
ColorChat(0RED"%s Guard^x03 %s^x04 killed 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(
task_exists(attacker))
        
remove_task(attacker)
        
    if(
task_exists(victim))
        
remove_task(victim)
    
    
SaveData(attacker)
    
    return 
PLUGIN_HANDLED
}  
    
////////////////////////////////////////////////////////////
//-----------------ROUND END/ ROUND START-----------------//
////////////////////////////////////////////////////////////
    
public Event_Roundstart()
{
    
    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] && 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)
}

public 
make_rebel(attackervictim)
{
    new 
attackername[33], victimname[33]
    
get_user_name(attackerattackername32)
    
get_user_name(victimvictimname32)
    
    
#if defined USE_CC
        
ColorChat(0RED"%s^x03 %s^x04 attacked^x03 %s^x04 and is now a rebel"PREFIXattackernamevictimname)
    
#else
        
client_print(0print_chat"%s %s attacked %s and is now a rebel!"PREFIXattackernamevictimname)
    
#endif
    
    
set_user_rendering(attackerkRenderFxGlowShell25500kRenderNormal16)
    
is_rebel[attacker] = true
}

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

///////////////////////////////////////////////////////////////
//--------------------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(
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_CONTINUE
}

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]^n[Your Cookies: %d]"points)
        new 
shopmenu menu_create(szText"sub_shopmenu")
        
        
formatex(szTextcharsmax(szText), "Grenade [Cookies: %d]"get_pcvar_num(cvar_grenadeprice))
        
menu_additem(shopmenuszText"1"0)

        
formatex(szTextcharsmax(szText), "Flash Bang [Cookies: %d]"get_pcvar_num(cvar_flashprice))
        
menu_additem(shopmenuszText"2"0)

        
formatex(szTextcharsmax(szText), "Health Cookies [Cookies: %d]"get_pcvar_num(cvar_pillsprice))
        
menu_additem(shopmenuszText"3" 0)

        
formatex(szTextcharsmax(szText), "Nade pack [Cookies: %d]"get_pcvar_num(cvar_nadepackprice))
        
menu_additem(shopmenuszText"4"0)
        
        
formatex(szTextcharsmax(szText), "Gun Gamble [Cookies: %d]"get_pcvar_num(cvar_gunprice))
        
menu_additem(shopmenuszText"5"0)

        
formatex(szTextcharsmax(szText), "CrowBar[1 Hit Kill] [Cookies: %d]"get_pcvar_num(cvar_crowprice))
        
menu_additem(shopmenuszText"6"0)

        
formatex(szTextcharsmax(szText), "Invisibility 20 sec [Cookies: %d]"get_pcvar_num(cvar_invprice))
        
menu_additem(shopmenuszText"7"0)

        
formatex(szTextcharsmax(szText), "Camouflage [Cookies: %d]"get_pcvar_num(cvar_camoprice))
        
menu_additem(shopmenuszText"8"0)
        
        
formatex(szTextcharsmax(szText), "Gun Pack [Cookies: %d]"get_pcvar_num(cvar_gunpackprice))
        
menu_additem(shopmenuszText"9"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_grenadeprice))
            {
                
#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_grenade(id)
            }
        }
        
        
        case 
2
        {
            if(
playerpoints[id] < get_pcvar_num(cvar_flashprice))
            {
                
#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_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 
4:
        {
            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)
            }
        }
        
        case 
5:
        {
            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 
6:
        {
            if(
playerpoints[id] < get_pcvar_num(cvar_crowprice))
            {
                
#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)
            }
        }
        case 
7:
        {
            if(
playerpoints[id] < get_pcvar_num(cvar_invprice))
            {
                
#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_invis(id)
                
            }
        
        }
        case 
8:
        {
            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)
            }
        }
        
    }
    
menu_destroy(shopmenu);
    return 
PLUGIN_HANDLED;
}



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

    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_invis(id)
{
    new 
AlphaVal 20
    set_bit
(g_bHasInvisid)
    
set_user_rendering(id,kRenderFxGlowShell,0,0,0,kRenderTransAlpha,AlphaVal)
    
    
    
#if defined USE_CC
        
ColorChat(idRED"%s You bought^x03 Invisibility for 20 sec."PREFIX)
    
#else
        
client_print(idprint_chat"%s You bought Invisibility for 20 sec."PREFIX)
    
#endif
    
    
playerpoints[id] -= get_pcvar_num(cvar_invprice)

    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;
}




////////////////////////////////////////////////////////
//-------------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)
    }
}



///////////////////////////////////////////////
//----------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

richierich88888 is offline
 



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 19:38.


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