I found this cool plugin that makes 1 T vs All, Please help me do 1 CT = +500hp for terrorist
PHP Code:
/*
boss event amxx plugin © 2005 bes island
Uses team locking code © bardelot
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
In addition, as a special exception, the author gives permission to
link the code of this program with the Half-Life Game Engine ("HL
Engine") and Modified Game Libraries ("MODs") developed by Valve,
L.L.C ("Valve"). You must obey the GNU General Public License in all
respects for all of the code used other than the HL Engine and MODs
from Valve. If you modify this file, you may extend this exception
to your version of the file, but you are not obligated to do so. If
you do not wish to do so, delete this exception statement from your
version.
*/
#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <cstrike>
new player, bossPower
new old_mp_autoteambalance, Float:old_mp_roundtime, Float:old_mp_buytime, old_mp_freezetime, old_mp_startmoney
public plugin_init(){
register_plugin("boss","1.17","bes island")
register_clcmd("amx_boss","cmdMakeBoss",ADMIN_SLAY,"<name or #userid> <power> - make player a boss. Power must be 201 to 999")
register_clcmd("amx_unboss","cmdUnmakeBoss",ADMIN_SLAY,"- end the boss event")
register_event("TeamScore","hook_teamscore","a")
register_menucmd(register_menuid("Team_Select"),(1<<0)|(1<<1)|(1<<4)|(1<<5),"hook_team_select")
register_menucmd(-2,(1<<0)|(1<<1)|(1<<4)|(1<<5),"hook_team_select")
player=0
}
public hook_team_select(id,key){
if((key==0)&&(player!=0)){
engclient_cmd(id,"chooseteam")
return PLUGIN_HANDLED
}
return PLUGIN_CONTINUE
}
public cmdUnmakeBoss(id,level,cid){
if(cmd_access(id,level,cid,1))set_task(5.0,"UnmakeBoss")
return PLUGIN_HANDLED
}
public hook_teamscore(){
new score=read_data(2)
if((score>0)&&(player!=0))UnmakeBoss()
return PLUGIN_CONTINUE
}
public UnmakeBoss(){
if(player==0)return
if(is_user_connected(player))
set_user_rendering(player,kRenderFxGlowShell,0,0,0,kRenderNormal,99)
player=0
set_cvar_num("mp_autoteambalance",old_mp_autoteambalance)
set_cvar_float("mp_roundtime",old_mp_roundtime)
set_cvar_float("mp_buytime",old_mp_buytime)
set_cvar_num("mp_freezetime",old_mp_freezetime)
set_cvar_num("mp_startmoney",old_mp_startmoney)
set_cvar_num("sv_restart",1)
}
public cmdMakeBoss(id,level,cid){
if(!cmd_access(id,level,cid,3))return PLUGIN_HANDLED
if(player!=0){
client_print(id,print_console,"There already exists a boss")
return PLUGIN_HANDLED
}
new arg[32]
read_argv(1,arg,31)
player=cmd_target(id,arg,6)
if(!player)return PLUGIN_HANDLED
read_argv(2,arg,31)
bossPower=max(201,min(999,str_to_num(arg)))
new players[32], num, i
get_players(players,num)
for(i=0;i<num;i++)
if(players[i]!=player){
get_user_team(players[i],arg,31)
if(arg[0]!='S')cs_set_user_team(players[i],CS_TEAM_CT)
}else
cs_set_user_team(player,CS_TEAM_T,CS_T_GUERILLA);
old_mp_autoteambalance=get_cvar_num("mp_autoteambalance")
old_mp_roundtime=get_cvar_float("mp_roundtime")
old_mp_buytime=get_cvar_float("mp_buytime")
old_mp_startmoney=get_cvar_num("mp_startmoney")
old_mp_freezetime=get_cvar_num("mp_freezetime")
set_cvar_num("mp_autoteambalance",0)
set_cvar_num("mp_roundtime",9)
set_cvar_num("mp_startmoney",16000)
set_cvar_num("sv_restart",1)
set_cvar_float("mp_buytime",0.2)
set_cvar_num("mp_freezetime",12)
set_task(13.0,"MakeBoss2")
return PLUGIN_HANDLED
}
public MakeBoss2(){
if(is_user_connected(player)){
set_user_health(player,bossPower)
set_user_armor(player,100)
set_user_rendering(player,kRenderFxGlowShell,255,0,0,kRenderNormal,99)
strip_user_weapons(player)
give_item(player,"weapon_knife")
give_item(player,"weapon_m249")
new i
for(i=0;i<7;i++)give_item(player,"ammo_556natobox")
}else
UnmakeBoss()
set_hudmessage(255,0,0)
show_hudmessage(0,"The enemy is strong!")
}