Raised This Month: $68 Target: $400
 17% 

[SOLVED] edit this plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
arvEL.
Senior Member
Join Date: Dec 2014
Location: Iraq
Old 10-10-2015 , 10:09   [SOLVED] edit this plugin
Reply With Quote #1

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];
enum 
{
        
SPECIAL_KILL,
        
MONEY_BONUS,
        
FRAG_BONUS
}

public 
plugin_init() {
        
register_plugin"Special Kill""1.0""Pastout!" );
        
g_iMaxPlayers get_maxplayers(); 
        
g_iHhPlayerKilledPost RegisterHamHam_Killed"player""Ham_CBasePlayer_Killed", .Post true );
        
DisableHamForwardg_iHhPlayerKilledPost );       
        
register_clcmd"cs_vip""R_VIP"ADMIN_BAN"VIP Round Has Been Started!!!" )
}

// vip round
public R_VIP( ) {
        
EnableHamForwardg_iHhPlayerKilledPost );
        
g_iSpecialTeamCheck 0;      
        
GetRandomPlayer"TERRORIST" );
}

GetRandomPlayerTEAM[] ) {
        new 
iPlayers32 ], iNumiPlayer;
        
get_playersiPlayersiNum"ae"TEAM );
        for( new 
0iNumi++ ) 
        {
                
iPlayer iPlayers];
                
resetPlayeriPlayer );
        }
        
iNum >= get_CvarSPECIAL_KILL ] ? SetSpecialPlayeriPlayersrandomiNum ) ] ) : g_iSpecialTeamCheck++;       
        if( 
g_iSpecialTeamCheck == )
        {
                for( new 
0iNumi++ ) 
                {
                        
iPlayer iPlayers];
                        
resetPlayeriPlayer );
            
                }
                
DisableHamForwardg_iHhPlayerKilledPost );
        }
}

resetPlayerid ) {
        if( 
UserIsSpecialid ) )
        {
                
cs_reset_user_model(id)
                
ClearUserIsSpecialid );
        }
}

SetSpecialPlayerid ) {
        
MarkUserIsSpecialid );
        new 
szName[32]; 
        
get_user_name(idszNamecharsmax(szName));        
        
ColorChat(0GREY"^4[CS]^3 %s^1 is now a^4 VIP" ,szName);
        
cs_set_user_model(id"vip")
        
set_hudmessage(2120177, -1.00.2810.05.01.01.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(id250)
        
set_user_armor(id200)
}

public 
Ham_CBasePlayer_Killed(idiVictimiKiller ) {
        if( 
IsPlayeriKiller )
        && 
UserIsSpecialiVictim ) )
        {
                
cs_set_user_moneyiKillercs_get_user_moneyiKiller ) + get_CvarMONEY_BONUS ] );
                
set_user_fragsiKillerget_user_fragsiKiller ) + get_CvarFRAG_BONUS ] );
                new 
szName[32]; 
                
get_user_name(iKillerszNamecharsmax(szName));                    
                
ColorChat(0GREY"^4[CS]^3 %s^1 killed^4 VIP" ,szName);
                
/////////////////////////
        
new iPlayer[32], iNum
        get_players
(iPlayeriNum)
            for(new 
iiNumi++) {
                if(
cs_get_user_team(iPlayer[i]) == CS_TEAM_T)
                
user_kill(iPlayer[i])
            }
                
/////////////////////////
                
g_iSpecialTeamCheck++
                if( 
g_iSpecialTeamCheck == )
                {
                        
DisableHamForwardg_iHhPlayerKilledPost );
                }
        }
}  
////////////////////// 
i want add option! when the vip killed
i want the end of the round
or killed all TERRORIST players

Last edited by arvEL.; 10-28-2015 at 23:28.
arvEL. is offline
Send a message via Skype™ to arvEL.
arvEL.
Senior Member
Join Date: Dec 2014
Location: Iraq
Old 10-11-2015 , 08:47   Re: [RESLOVED] edit this plugin
Reply With Quote #2

done! i resloved it.
T/C
arvEL. is offline
Send a message via Skype™ to arvEL.
Banana.
BANNED
Join Date: Oct 2015
Location: Brazil [<o>]
Old 10-11-2015 , 17:36   Re: [RESLOVED] edit this plugin
Reply With Quote #3

resloved? solved guy

I fixed your code , try this:

PHP Code:
#include <amxmodx>
#include <cstrike>
#include <fun>
#include <hamsandwich>

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];
enum 
{
        
SPECIAL_KILL,
        
MONEY_BONUS,
        
FRAG_BONUS
}

public 
plugin_init() {
        
register_plugin"Special Kill""1.0""Pastout!" );
        
g_iMaxPlayers get_maxplayers(); 
        
g_iHhPlayerKilledPost RegisterHamHam_Killed"player""Ham_CBasePlayer_Killed", .Post true );
        
DisableHamForwardg_iHhPlayerKilledPost );       
        
register_clcmd"cs_vip""R_VIP"ADMIN_BAN"VIP Round Has Been Started!!!" )
}

// vip round
public R_VIP( ) {
        
EnableHamForwardg_iHhPlayerKilledPost );
        
g_iSpecialTeamCheck 0;      
        
GetRandomPlayer"TERRORIST" );
}

GetRandomPlayerTEAM[] ) {
        new 
iPlayers32 ], iNumiPlayer;
        
get_playersiPlayersiNum"ae"TEAM );
        for( new 
0iNumi++ ) 
        {
                
iPlayer iPlayers];
                
resetPlayeriPlayer );
        }
        
iNum >= get_CvarSPECIAL_KILL ] ? SetSpecialPlayeriPlayersrandomiNum ) ] ) : g_iSpecialTeamCheck++;       
        if( 
g_iSpecialTeamCheck == )
        {
                for( new 
0iNumi++ ) 
                {
                        
iPlayer iPlayers];
                        
resetPlayeriPlayer );
            
                }
                
DisableHamForwardg_iHhPlayerKilledPost );
        }
}

resetPlayerid ) {
        if( 
UserIsSpecialid ) )
        {
                
cs_reset_user_model(id)
                
ClearUserIsSpecialid );
        }
}

SetSpecialPlayerid ) {
        
MarkUserIsSpecialid );
        new 
szName[32]; 
        
get_user_name(idszNamecharsmax(szName));        
        
client_print_color(0GREY"^4[CS]^3 %s^1 is now a^4 VIP" ,szName);
        
cs_set_user_model(id"vip")
        
set_hudmessage(2120177, -1.00.2810.05.01.01.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(id250)
        
set_user_armor(id200)
}

public 
Ham_CBasePlayer_Killed(idiVictimiKiller ) {
        if( 
IsPlayeriKiller )
        && 
UserIsSpecialiVictim ) )
        {
                
cs_set_user_moneyiKillercs_get_user_moneyiKiller ) + get_CvarMONEY_BONUS ] );
                
set_user_fragsiKillerget_user_fragsiKiller ) + get_CvarFRAG_BONUS ] );
                new 
szName[32]; 
                
get_user_name(iKillerszNamecharsmax(szName));                    
                
client_print_color(0GREY"^4[CS]^3 %s^1 killed^4 VIP" ,szName);
                
/////////////////////////
        
new iPlayer[32], iNum
        get_players
(iPlayeriNum)
            for(new 
iiNumi++) {
                if(
cs_get_user_team(iPlayer[i]) == CS_TEAM_T)
                
user_kill(iPlayer[i])
            }
                
/////////////////////////
                
g_iSpecialTeamCheck++
                if( 
g_iSpecialTeamCheck == )
                {
                        
DisableHamForwardg_iHhPlayerKilledPost );
                }
        }
}  

stock client_print_color(const id,const input[], any:...)
{
    new 
msg[191], players[32], count 1vformat(msg,190,input,3);
    
replace_all(msg,190,"/g","^4");    // green
    
replace_all(msg,190,"/y","^1");    // normal
    
replace_all(msg,190,"/t","^3");    // team
        
    
if (idplayers[0] = id; else get_players(players,count,"ch");
        
    for (new 
i=0;i<count;i++)
    {
        if (
is_user_connected(players[i]))
        {
            
message_begin(MSG_ONE_UNRELIABLE,get_user_msgid("SayText"),_,players[i]);
            
write_byte(players[i]);
            
write_string(msg);
            
message_end();
        }
    }


Last edited by Banana.; 10-11-2015 at 17:38.
Banana. is offline
Reply


Thread Tools
Display Modes

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 23:11.


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