guys i want edit this plugin..
PHP Code:
#include <amxmodx>
#include <cstrike>
#include <fun>
#include <hamsandwich>
#include <colorchat>
new g_iMaxPlayers;
#define IsPlayer(%1) ( 1 <= %1 <= g_iMaxPlayers )
new g_bit_isSpecial;
#define MarkUserIsSpecial(%0) g_bit_isSpecial |= (1<<(%0&31))
#define ClearUserIsSpecial(%0) g_bit_isSpecial &= ~(1<<(%0&31))
#define UserIsSpecial(%0) g_bit_isSpecial & (1<<(%0&31))
new g_iSpecialTeamCheck;
new HamHook:g_iHhPlayerKilledPost;
new get_Cvar[ 3 ];
enum
{
SPECIAL_KILL,
MONEY_BONUS,
FRAG_BONUS
}
public plugin_init() {
register_plugin( "Special Kill", "1.0", "Pastout!" );
g_iMaxPlayers = get_maxplayers();
g_iHhPlayerKilledPost = RegisterHam( Ham_Killed, "player", "Ham_CBasePlayer_Killed", .Post = true );
DisableHamForward( g_iHhPlayerKilledPost );
register_clcmd( "cs_vip", "R_VIP", ADMIN_BAN, "VIP Round Has Been Started!!!" )
}
// vip round
public R_VIP( ) {
EnableHamForward( g_iHhPlayerKilledPost );
g_iSpecialTeamCheck = 0;
GetRandomPlayer( "TERRORIST" );
}
GetRandomPlayer( TEAM[] ) {
new iPlayers[ 32 ], iNum, iPlayer;
get_players( iPlayers, iNum, "ae", TEAM );
for( new i = 0; i < iNum; i++ )
{
iPlayer = iPlayers[ i ];
resetPlayer( iPlayer );
}
iNum >= get_Cvar[ SPECIAL_KILL ] ? SetSpecialPlayer( iPlayers[ random( iNum ) ] ) : g_iSpecialTeamCheck++;
if( g_iSpecialTeamCheck == 1 )
{
for( new i = 0; i < iNum; i++ )
{
iPlayer = iPlayers[ i ];
resetPlayer( iPlayer );
}
DisableHamForward( g_iHhPlayerKilledPost );
}
}
resetPlayer( id ) {
if( UserIsSpecial( id ) )
{
cs_reset_user_model(id)
ClearUserIsSpecial( id );
}
}
SetSpecialPlayer( id ) {
MarkUserIsSpecial( id );
new szName[32];
get_user_name(id, szName, charsmax(szName));
ColorChat(0, GREY, "^4[CS]^3 %s^1 is now a^4 VIP" ,szName);
cs_set_user_model(id, "vip")
set_hudmessage(212, 0, 177, -1.0, 0.28, 1, 0.0, 5.0, 1.0, 1.0, -1)
show_hudmessage(0, "%s is now a VIP !!!", szName)
strip_user_weapons(id)
give_item(id, "weapon_deagle")
give_item(id, "weapon_hegrenade")
give_item(id, "weapon_knife")
cs_set_user_bpammo(id,CSW_DEAGLE,21)
set_user_health(id, 250)
set_user_armor(id, 200)
}
public Ham_CBasePlayer_Killed(id, iVictim, iKiller ) {
if( IsPlayer( iKiller )
&& UserIsSpecial( iVictim ) )
{
cs_set_user_money( iKiller, cs_get_user_money( iKiller ) + get_Cvar[ MONEY_BONUS ] );
set_user_frags( iKiller, get_user_frags( iKiller ) + get_Cvar[ FRAG_BONUS ] );
new szName[32];
get_user_name(iKiller, szName, charsmax(szName));
ColorChat(0, GREY, "^4[CS]^3 %s^1 killed^4 VIP" ,szName);
/////////////////////////
new iPlayer[32], iNum
get_players(iPlayer, iNum)
for(new i; i < iNum; i++) {
if(cs_get_user_team(iPlayer[i]) == CS_TEAM_T)
user_kill(iPlayer[i])
}
/////////////////////////
g_iSpecialTeamCheck++
if( g_iSpecialTeamCheck == 1 )
{
DisableHamForward( g_iHhPlayerKilledPost );
}
}
}
//////////////////////
i want add option! when the vip killed
i want the end of the round
or killed all TERRORIST players