View Single Post
Natsheh
Veteran Member
Join Date: Sep 2012
Old 02-21-2018 , 06:38   Re: New message started when msg '66' has not been sent yet
Reply With Quote #11

Try this i just removed strip_user_weapons for Loser ( doesn't make any sense when the victim is dead to strip his weapons )

PHP Code:
/*
*
*        Jailbreak Last Request
*            
*        H3avY Ra1n (AKA nikhilgupta345)
*
*        Description
*        -----------
*
*            This is a Last Request plugin for jailbreak mod, where 
*            the last terrorists can type /lr and is presented with a 
*            menu, which has numerous options to choose from that interact 
*            with the Counter-Terrorists.
*
*        Last Request Options
*        --------------------
*
*            Knife Battle     - Fight with knives 1v1
*            Shot for Shot    - Take turns shooting a deagle
*            Deagle Toss        - See who can throw the deagle the farthest
*            Shotgun Battle    - Fight with shotguns 1v1
*            Scout Battle    - Fight with scouts 1v1
*            Grenade Toss    - See who can throw the grenade the farthest
*            Race            - Race across a certain part of the map
*            Spray Contest    - See who can spray closest to the top or bottom border
*            of a wall. Prisoner decides.
*
*
*        Client Commands
*        ---------------
*    
*            say/say_team    /lr             - Opens Last Request Menu
*                            !lr
*                            /lastrequest
*                            !lastrequest
*
*
*        Installation
*        ------------
*
*            - Compile this plugin locally
*            - Place jb_lastrequest.amxx in addons/amxmodx/plugins/ folder
*            - Open addons/amxmodx/configs/plugins.ini
*            - Add the line 'jb_lastrequest.amxx' at the bottom
*            - Restart server or change map
*            
*
*        Changelog
*        ---------
*        
*            February 15, 2011     - v1.0 -     Initial Release
*            February 24, 2011    - v1.0.1 -     Removed teleporting back to cell
*            March 05, 2011        - v1.1 -    Changed way of allowing a Last Request
*            March 26, 2011        - v1.2 -     Added Multi-Lingual support.
*            August 10, 2011        - v2.0 -    Completely rewrote plugin
*
*        
*        Credits
*        -------
*        
*            Pastout        -    Used his thread as a layout for mine
*
*        
*        Plugin Thread: http://forums.alliedmods.net/showthread.php?p=1416279
*
*/

// Includes
////////////

#include < amxmodx >
#include < cstrike >
#include < fun >
#include < fakemeta >
#include < fakemeta_util >
#include < hamsandwich >

// Enums
/////////

enum
{
    
LR_NONE=-1,
    
LR_S4S,
    
LR_SPRAY,
    
LR_RACE,
    
LR_GUNTOSS,
    
LR_KNIFE,
    
LR_NADETOSS,
    
LR_SCOUT,
    
LR_SHOTGUN,
    
    
MAX_GAMES
};

enum
{
    
GREY 0,
    
RED,
    
BLUE,
    
NORMAL
};

enum
{
    
ALIVE
    
DEAD
    
ALL    
};

enum
{
    
LR_PRISONER,
    
LR_GUARD
};

enum ( += 100 )
{
    
TASK_BEACON,
    
TASK_ENDLR
};

// Consts
//////////

new const g_szPrefix[ ] = "!g[Jailbreak]!n";

new const 
g_szBeaconSound[ ] = "buttons/blip1.wav";
new const 
g_szBeaconSprite[ ] = "sprites/white.spr";

new const 
g_szGameNamesMAX_GAMES ][ ] = 
{
    
"Shot 4 Shot",
    
"Spray Contest",
    
"Race",
    
"Gun Toss",
    
"Knife Battle",
    
"Grenade Toss",
    
"Scout Battle",
    
"Shotgun Battle"
};

new const 
g_szDescriptionMAX_GAMES ][ ] = 
{
    
"Take turns shooting a deagle.",
    
"Both players spray on a wall, highest or lowest.",
    
"Both players race across a part of the map.",
    
"See who can throw the deagle the farthest.",
    
"Battle it out with knives.",
    
"See who can throw the grenade the farthest from a point in the map.",
    
"Battle it out with scouts.",
    
"Battle it out with shotguns."
};

new const 
g_szTeamName[ ][ ] = 
{
    
"",
    
"TERRORIST",
    
"CT",
    
"SPECTATOR"
};

new const 
g_szPlugin[ ] = "Jailbreak Last Request";
new const 
g_szVersion[ ] = "2.0";
new const 
g_szAuthor[ ] = "H3avY Ra1n";

// Integers
////////////

new g_iCurrentGame LR_NONE;
new 
g_iLastRequest];
new 
g_iCurrentPage33 ];
new 
g_iChosenGame33 ];

new 
g_iSprite;

new 
g_iMaxPlayers;

// Booleans
///////////

new bool:g_bAlive33 ];
new 
bool:g_bConnected33 ];

new 
bool:g_bLastRequestAllowed;

// Messages
////////////

new g_msgTeamInfo;
new 
g_msgSayText;

public 
plugin_precache()
{
    
precache_soundg_szBeaconSound );
    
    
g_iSprite precache_modelg_szBeaconSprite );
}

public 
plugin_init()
{
    
register_pluging_szPluging_szVersiong_szAuthor );
    
    
register_clcmd"say /lr",                     "Cmd_LastRequest" );
    
register_clcmd"say !lr",                     "Cmd_LastRequest" );
    
register_clcmd"say /lastrequest",         "Cmd_LastRequest" );
    
register_clcmd"say !lastrequest",         "Cmd_LastRequest" );
    
    
register_clcmd"say_team /lr",             "Cmd_LastRequest" );
    
register_clcmd"say_team !lr",             "Cmd_LastRequest" );
    
register_clcmd"say_team /lastrequest",     "Cmd_LastRequest" );
    
register_clcmd"say_team !lastrequest",     "Cmd_LastRequest" );
    
    
register_event"HLTV",     "Event_RoundStart""a""1=0""2=0" );
    
    
register_logevent"Logevent_RoundStart"2"1=Round_Start" );
    
    
RegisterHamHam_Spawn,                 "player",             "Ham_PlayerSpawn_Post",     );
    
RegisterHamHam_Weapon_PrimaryAttack,     "weapon_deagle",     "Ham_DeagleFire_Post",         );
    
RegisterHamHam_Killed,                "player",            "Ham_PlayerKilled_Post",    );
    
RegisterHamHam_TakeDamage,            "player",            "Ham_TakeDamage_Pre",        );
    
    
register_forwardFM_Think"Forward_EntityThink_Pre");
    
    
register_messageget_user_msgid"TextMsg" ), "Message_TextMsg" );
    
    
g_msgTeamInfo     get_user_msgid"TeamInfo" );
    
g_msgSayText     get_user_msgid"SayText" );
    
    
g_iMaxPlayers     get_maxplayers();
    
    
set_task2.0"StartBeacon", .flags="b" );
    
    
set_task300.0"Task_Advertise", .flags="b" );
}

public 
client_putinserverid )
{
    
g_iCurrentPageid ] = 0;
    
    
g_bConnectedid ] = true;
}

public 
client_disconnectedid )
{
    
g_bConnectedid ] = false;
    
    if( 
g_bAliveid ] )
        
g_bAliveid ] = false;
        
    if( 
id == g_iLastRequestLR_PRISONER ] || id == g_iLastRequestLR_GUARD ] )
    {
        
EndLastRequestid == g_iLastRequestLR_PRISONER ] ? g_iLastRequestLR_GUARD ] : g_iLastRequestLR_PRISONER ], id );
    }
    
    
remove_taskid TASK_ENDLR );
}

public 
Ham_PlayerSpawn_Postid )
{
    if( !
is_user_aliveid ) )
        return 
HAM_IGNORED;
        
    
g_bAliveid ] = true;
    
    return 
HAM_IGNORED;
}

public 
Ham_PlayerKilled_PostiVictimiKilleriShouldGib )
{    
    
g_bAliveiVictim ] = false;
    
    if( 
iVictim == g_iLastRequestLR_PRISONER ] )
    {
        
EndLastRequestg_iLastRequestLR_GUARD ], iVictim );
    }
    
    else if( 
iVictim == g_iLastRequestLR_GUARD ] )
    {
        
EndLastRequestg_iLastRequestLR_PRISONER ], iVictim );
    }
    
    if( !
g_bLastRequestAllowed && cs_get_user_teamiVictim ) == CS_TEAM_T )
    {
        if( 
get_playercountCS_TEAM_TALIVE ) == )
        {
            
ColorChat0NORMAL"%s !gLast Request!n sega e pozvolen. Napishete!g /lr!n za da otvorite menu-to."g_szPrefix );
            
g_bLastRequestAllowed true;
        }
    }
}

public 
Ham_DeagleFire_PostiEnt )
{
    if( 
g_iCurrentGame != LR_S4S )
    {
        return;
    }
    
    new 
id peviEntpev_owner );
    new 
iOpponentEnt;
    
    if( 
cs_get_weapon_ammoiEnt ) == )
    {
        if( 
id == g_iLastRequestLR_PRISONER ] )
        {
            
iOpponentEnt fm_find_ent_by_owner( -1"weapon_deagle"g_iLastRequestLR_GUARD ] );
            
            if( 
pev_validiOpponentEnt ) )
                
cs_set_weapon_ammoiOpponentEnt);
        }
        
        else if( 
id == g_iLastRequestLR_GUARD ] )
        {
            
iOpponentEnt fm_find_ent_by_owner( -1"weapon_deagle"g_iLastRequestLR_PRISONER ] );
            
            if( 
pev_validiOpponentEnt ) )
                
cs_set_weapon_ammoiOpponentEnt);
        }
    }
}

public 
Ham_TakeDamage_PreiVictimiInflictoriAttackerFloat:flDamageiBits )
{
    if( !( 
<= iAttacker <= g_iMaxPlayers ) )
        return 
HAM_IGNORED;
    
    new 
bool:g_bVictimLR iVictim == g_iLastRequestLR_PRISONER ] || iVictim == g_iLastRequestLR_GUARD ];
    new 
bool:g_bAttackerLR iAttacker == g_iLastRequestLR_PRISONER ] || iAttacker == g_iLastRequestLR_GUARD ];
    
    if( 
g_bVictimLR && !g_bAttackerLR )
    {
        return 
HAM_SUPERCEDE;
    }
    
    else if( !
g_bVictimLR && g_bAttackerLR )
    {
        return 
HAM_SUPERCEDE;
    }
    
    return 
HAM_IGNORED;
}

public 
Event_RoundStart()
{
    
g_bLastRequestAllowed false;
    
g_iCurrentGame LR_NONE;
}



public 
Logevent_RoundStart()
{
    if( !
g_bLastRequestAllowed && get_playercountCS_TEAM_TALIVE ) == )
    {
        
g_bLastRequestAllowed true;
        
ColorChat0NORMAL"%s !gLast Request!n is now allowed. Type!g /lr"g_szPrefix );
    }
}

public 
Forward_EntityThink_PreiEnt )
{
    if( !
pev_validiEnt ) || g_iCurrentGame != LR_NADETOSS )
        return 
FMRES_IGNORED;
    
    new 
id peviEntpev_owner );
    
    if( 
id != g_iLastRequestLR_PRISONER ] && id != g_iLastRequestLR_GUARD ] )
        return 
FMRES_IGNORED;
        
    new 
szModel32 ];
    
    
peviEntpev_modelszModelcharsmaxszModel ) );
    
    if( 
equalszModel"models/w_smokegrenade.mdl" ) )
    {
        
set_peviEntpev_renderfxkRenderFxGlowShell );
        
set_peviEntpev_renderamt125.0 );
        
set_peviEntpev_rendermodekRenderTransAlpha );
        
        
set_peviEntpev_rendercolorid == g_iLastRequestLR_GUARD ] ? { 0.00.0255.0 } : { 255.00.00.0 } );
        
        return 
FMRES_SUPERCEDE;
    }    
    
    return 
FMRES_IGNORED;
}    



public 
Message_TextMsg()
{
    if( 
g_iCurrentGame == LR_NONE )
    {
        return 
PLUGIN_CONTINUE;
    }
    
    static 
szText25 ];
    
get_msg_arg_string2szTextcharsmaxszText ) );
    
    if( 
equalszText"#Round_Draw" ) || equalszText"#Game_will_restart_in" ) || equalszText"#Game_Commencing" ) )
    {
        
g_iCurrentGame LR_NONE;
        
        
strip_user_weaponsg_iLastRequestLR_PRISONER ] );
        
strip_user_weaponsg_iLastRequestLR_GUARD ] );
        
        
GiveWeaponsg_iLastRequestLR_GUARD ] );
        
        
g_iLastRequestLR_PRISONER ] = 0;
        
g_iLastRequestLR_GUARD ] = 0;
    }
    
    return 
PLUGIN_CONTINUE;
}

public 
Cmd_LastRequestid )
{
    if( !
g_bAliveid ] )
    {
        
ColorChatidNORMAL"%s You must be !talive!n to have a !gLast Request!n."g_szPrefix );
        return 
PLUGIN_HANDLED;
    }
    
    else if( 
cs_get_user_teamid ) != CS_TEAM_T )
    {
        
ColorChatidNORMAL"%s You must be a !tprisoner!n to have a !gLast Request!n."g_szPrefix );
        return 
PLUGIN_HANDLED;
    }
    
    else if( !
g_bLastRequestAllowed )
    {
        
ColorChatidNORMAL"%s There are too many !tprisoners!n remaining to have a !gLast Request!n."g_szPrefix );
        return 
PLUGIN_HANDLED;
    }
    
    else if( 
g_iCurrentGame != LR_NONE )
    {
        
ColorChatidNORMAL"%s There's a !gLast Request!n already in progress!"g_szPrefix );
        return 
PLUGIN_HANDLED;
    }
    
    else 
LastRequestMenuid );
    
    return 
PLUGIN_HANDLED;
}

public 
LastRequestMenuid )
{
    new 
hMenu menu_create"\yChoose a Game:""LastRequestMenu_Handler" );
    
    new 
szInfo];
    
    for( new 
0MAX_GAMESi++ )
    {
        
num_to_striszInfocharsmaxszInfo ) );
        
        
menu_additemhMenug_szGameNames], szInfo );
    }
    
    
menu_setprophMenuMPROP_NEXTNAME"Next Page" );
    
menu_setprophMenuMPROP_BACKNAME"Previous Page" );
    
    
menu_displayidhMenu);
}

public 
LastRequestMenu_HandleridhMenuiItem )
{
    if( 
iItem == MENU_EXIT )
    {
        
menu_destroyhMenu );
        return 
PLUGIN_HANDLED;
    }
    
    new 
szData];
    new 
iAccesshCallback;
    
menu_item_getinfohMenuiItemiAccessszDatacharsmaxszData ), __hCallback );
    
    
g_iChosenGameid ] = str_to_numszData );
    
    if( 
g_iCurrentGame != LR_NONE )
    {
        
menu_destroyhMenu );
        
g_iChosenGameid ] = LR_NONE;
        
ColorChatidNORMAL"%s There's already a !gLast Request!n in progress."g_szPrefix );
        return 
PLUGIN_HANDLED;
    }
    
    
ShowPlayerMenuid );
    
    
menu_destroyhMenu );
    return 
PLUGIN_HANDLED;
}
    
    
public 
ShowPlayerMenuid )
{
    new 
hMenu menu_create"\yChoose an Opponent:""PlayerMenu_Handler" );
    
    new 
szPlayerName32 ], szInfo];
    
    for( new 
1g_iMaxPlayersi++ )
    {
        if( !
g_bAlive] || cs_get_user_team) != CS_TEAM_CT )
            continue;
        
        
get_user_nameiszPlayerNamecharsmaxszPlayerName ) );
        
        
num_to_striszInfocharsmaxszInfo ) );
        
        
menu_additemhMenuszPlayerNameszInfo );
    }
    
    
menu_setprophMenuMPROP_NEXTNAME"Next Page" );
    
menu_setprophMenuMPROP_BACKNAME"Previous Page" );
    
    
menu_displayidhMenu);
}

public 
PlayerMenu_HandleridhMenuiItem )
{    
    if( 
iItem == MENU_EXIT || !g_bAliveid ] || !g_bLastRequestAllowed || g_iCurrentGame != LR_NONE )
    {
        
g_iChosenGameid ] = LR_NONE;
        
        
menu_destroyhMenu );
        return 
PLUGIN_HANDLED;
    }
    
    new 
szData], szPlayerName64 ];
    new 
iAccesshCallback;
    
    
menu_item_getinfohMenuiItemiAccessszDatacharsmaxszData ), szPlayerNamecharsmaxszPlayerName ), hCallback );
    
    new 
iGuard str_to_numszData );
    
    if( !
g_bAliveiGuard ] || cs_get_user_teamiGuard ) != CS_TEAM_CT )
    {
        
ColorChatidNORMAL"%s That player is no longer available for !gLast Request!n."g_szPrefix );
        
menu_destroyhMenu );
        
        
ShowPlayerMenuid );
        return 
PLUGIN_HANDLED;
    }
    
    
StartGameg_iChosenGameid ], idiGuard );
    
    
menu_destroyhMenu );
    return 
PLUGIN_HANDLED;
}

public 
StartGameiGameiPrisoneriGuard )
{
    
g_iCurrentGame iGame;
    
    
g_iLastRequestLR_PRISONER ] = iPrisoner;
    
g_iLastRequestLR_GUARD ] = iGuard;
    
    new 
szPrisonerName32 ], szGuardName32 ];
    
    
get_user_nameiPrisonerszPrisonerNamecharsmaxszPrisonerName ) );
    
get_user_nameiGuardszGuardNamecharsmaxszGuardName ) );
    
    
ColorChat0NORMAL"%s !t%s!n against !t%s!n in a !g%s!n!"g_szPrefixszPrisonerNameszGuardNameg_szGameNamesiGame ] );
    
    
strip_user_weaponsiPrisoner );
    
strip_user_weaponsiGuard );
    
    
set_user_healthiPrisoner100 );
    
set_user_healthiGuard100 );
    
    
set_user_armoriPrisoner);
    
set_user_armoriGuard);
    
    
StartBeacon();
    
    
ColorChatiPrisonerNORMAL"%s !tObjective: %s"g_szPrefixg_szDescriptioniGame ] );
    
ColorChatiGuardNORMAL"%s !tObjective: %s"g_szPrefixg_szDescriptioniGame ] );
    
    switch( 
iGame )
    {    
        case 
LR_S4S:
        {
            
LR_Shot4ShotiPrisoner );
            
LR_Shot4ShotiGuard );
        }
        
        case 
LR_RACE:
        {
            
LR_RaceiPrisoner );
            
LR_RaceiGuard );
        }
        
        case 
LR_KNIFE:
        {
            
LR_KnifeiPrisoner );
            
LR_KnifeiGuard );
        }
        
        case 
LR_SPRAY:
        {
            
LR_SprayiPrisoner );
            
LR_SprayiGuard );
        }
        
        case 
LR_GUNTOSS:
        {
            
LR_GunTossiPrisoner );
            
LR_GunTossiGuard );
        }
        
        case 
LR_NADETOSS:
        {
            
LR_NadeTossiPrisoner );
            
LR_NadeTossiGuard );
        }
        
        case 
LR_SCOUT:
        {
            
LR_ScoutiPrisoner );
            
LR_ScoutiGuard );
        }
        
        case 
LR_SHOTGUN:
        {
            
LR_ShotguniPrisoner );
            
LR_ShotguniGuard );
        }
    }
}

public 
StartBeacon()
{
    if( 
g_iCurrentGame == LR_NONE )
    {
        return;
    }
    
    new 
id;
    
    for( new 
02i++ )
    {
        
id g_iLastRequest];
        
        static 
origin[3]
        
emit_soundidCHAN_ITEMg_szBeaconSound1.0ATTN_NORM0PITCH_NORM )
        
        
get_user_originidorigin )
        
message_beginMSG_BROADCASTSVC_TEMPENTITY )
        
write_byteTE_BEAMCYLINDER )
        
write_coordorigin[0] )    //position.x
        
write_coordorigin[1] )    //position.y
        
write_coordorigin[2]-20 )    //position.z
        
write_coordorigin[0] )        //axis.x
        
write_coordorigin[1] )        //axis.y
        
write_coordorigin[2]+200 )    //axis.z
        
write_shortg_iSprite )    //sprite index
        
write_byte)           //starting frame
        
write_byte)           //frame rate in 0.1's
        
write_byte)            //life in 0.1's
        
write_byte10 )            //line width in 0.1's
        
write_byte)            //noise amplitude in 0.01's
        
        
switch( cs_get_user_teamid ) )
        {
            case 
CS_TEAM_CT:
            {
                
write_byte);
                
write_byte);
                
write_byte255 );
            }
            
            case 
CS_TEAM_T:
            {
                
write_byte255 );
                
write_byte);
                
write_byte);
            }
        }
        
        
write_byte255 );            // brightness
        
write_byte);            // scroll speed in 0.1's
        
message_end();
    }
}
    
public 
EndLastRequestiWinneriLoser )
{
    new 
szWinnerName32 ], szLoserName32 ];
    
    
get_user_nameiWinnerszWinnerName31 );
    
get_user_nameiLoserszLoserName31 );
    
    
ColorChat0NORMAL"%s !t%s!n beat !t%s!n in the !gLast Request!n."g_szPrefixszWinnerNameszLoserName );
    
    
//strip_user_weapons( iLoser );

    
g_iCurrentGame LR_NONE;
    
    
g_iLastRequestLR_PRISONER ] = 0;
    
g_iLastRequestLR_GUARD ] = 0;
    
    
set_task0.1"Task_EndLR"TASK_ENDLR iWinner );
}

public 
Task_EndLRiTaskID )
{
    new 
id iTaskID TASK_ENDLR;

    
strip_user_weaponsid );
    
set_user_healthid100 );
    
    if( 
cs_get_user_teamid ) == CS_TEAM_CT )
        
GiveWeaponsid );
}

//////////////////////////////
//            LR Games        //
//////////////////////////////

LR_Knifeid )
{
    new 
szMapName32 ], iCTOrigin], iTOrigin];
    
    
give_itemid"weapon_knife" );
    
    
get_mapnameszMapNamecharsmaxszMapName ) );
    
    if( 
equaliszMapName"some1s_jailbreak" ) )
    {
        
iCTOrigin = { -7591047100 };
        
iTOrigin = { -585867100 };
        
        if( 
id == g_iLastRequestLR_PRISONER ] )
            
set_user_originidiTOrigin );
        
        else
            
set_user_originidiCTOrigin );
    }
}

LR_Shotgunid )
{
    
give_itemid"weapon_m3" );
    
cs_set_user_bpammoidCSW_M328 );
}

LR_Scoutid )
{
    new 
szMapName32 ], iCTOrigin], iTOrigin];

    
give_itemid"weapon_scout" );
    
cs_set_user_bpammoidCSW_SCOUT90 );
    
    
get_mapnameszMapNamecharsmaxszMapName ) );
    
    if( 
equaliszMapName"some1s_jailbreak" ) )
    {
        
iCTOrigin = { -2898, -204037 };
        
iTOrigin = { -290890537 };
        
        if( 
id == g_iLastRequestLR_PRISONER ] )
            
set_user_originidiTOrigin );
        
        else
            
set_user_originidiCTOrigin );
    }
}

LR_Shot4Shotid )
{
    new 
szMapName32 ], iCTOrigin], iTOrigin];
    
    if( 
id == g_iLastRequestLR_PRISONER ] )
    {
        
cs_set_weapon_ammogive_itemid"weapon_deagle" ), );
    }
    
    else 
cs_set_weapon_ammogive_itemid"weapon_deagle" ), );
    
    
get_mapnameszMapNamecharsmaxszMapName ) );
    
    if( 
equaliszMapName"some1s_jailbreak" ) )
    {
        
iCTOrigin = { -135227138 };
        
iTOrigin = { -1338, -78238 };
        
        if( 
id == g_iLastRequestLR_PRISONER ] )
            
set_user_originidiTOrigin );
        
        else
            
set_user_originidiCTOrigin );
    }
}

LR_Raceid )
{
    
give_itemid"weapon_knife" );
}

LR_Sprayid )
{
    
give_itemid"weapon_knife" );
}

LR_GunTossid )
{
    
give_itemid"weapon_knife" );
    
cs_set_weapon_ammogive_itemid"weapon_deagle" ), );
}

LR_NadeTossid )
{
    
give_itemid"weapon_knife" );
    
give_itemid"weapon_smokegrenade" );
    
ColorChatidNORMAL"%s Do not throw the nade until you are doing the toss!"g_szPrefix );
}

public 
Task_Advertise()
{
    
//ColorChat( 0, NORMAL, "%s This server is running !tLast Request v%s !nby !tH3avY Ra1n!n.", g_szPrefix, g_szVersion );
}

GiveWeaponsid )
{
    
give_itemid"weapon_m4a1" );
    
give_itemid"weapon_deagle" );
    
give_itemid"weapon_smokegrenade" );
    
    
cs_set_user_bpammoidCSW_M4A190 );
    
cs_set_user_bpammoidCSW_DEAGLE120 );
}

ColorChatidcolour, const text[], any:... )
{
    if( !
get_playersnum() )
    {
        return;
    }
    
    static 
message[192];
    
    
message[0] = 0x01;
    
vformat(message[1], sizeof(message) - 1text4);
    
    
replace_all(messagesizeof(message) - 1"!g""^x04");
    
replace_all(messagesizeof(message) - 1"!n""^x01");
    
replace_all(messagesizeof(message) - 1"!t""^x03");
    
    static 
indexMSG_Type;
    
    if( !
id )
    {
        static 
i;
        for(
1<= g_iMaxPlayersi++)
        {
            if( 
g_bConnected[i] )
            {
                
index i;
                break;
            }
        }
        
        
MSG_Type MSG_ALL;
    }
    else
    {
        
MSG_Type MSG_ONE;
        
index id;
    }
    
    static 
bool:bChanged;
    if( 
colour == GREY || colour == RED || colour == BLUE )
    {
        
message_begin(MSG_Typeg_msgTeamInfo_index);
        
write_byte(index);
        
write_string(g_szTeamName[colour]);
        
message_end();
        
        
bChanged true;
    }
    
    
message_begin(MSG_Typeg_msgSayText_index);
    
write_byte(index);
    
write_string(message);
    
message_end();
    
    if( 
bChanged )
    {
        
message_begin(MSG_Typeg_msgTeamInfo_index);
        
write_byte(index);
        
write_string(g_szTeamName[_:cs_get_user_team(index)]);
        
message_end();
    }
}

get_playercountCsTeams:iTeamiStatus )
{
    new 
iPlayerCount;
    
    for( new 
1<= g_iMaxPlayersi++ )
    {
        if( !
g_bConnected] || cs_get_user_team) != iTeam ) continue;
        
        switch( 
iStatus )
        {
            case 
DEAD: if( g_bAlive] ) continue;
            case 
ALIVE: if( !g_bAlive] ) continue;
        }
        
        
iPlayerCount++;
    }
    
    return 
iPlayerCount;

__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !


Last edited by Natsheh; 02-21-2018 at 06:39.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh