PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fakemeta>
#include <hamsandwich>
#include <colorchat>
#include <fun>
#define IsPlayer(%1) (1<=%1<=g_max_clients)
#define TAG "[^x04 Last Request^x01 ]"
#define HUDTAG "[ Last Request ]"
/*================================================================================
Variables | bools | Cvars
=================================================================================*/
new g_maxPlayers, beacon_sprite, g_MaxClients,mode,red,green=255,blue, toggle,light,vel,g_max_clients,g_max_entities, g_trail,r,g,b, rar;
new HamHook:ForwardSecAttackAwp, HamHook:ForwardSecAttackScout;
new music2[] = "sound/Extreme/LR_dong.mp3"
new music3[] = "sound/Extreme/LR_killer.mp3"
new music4[] = "sound/Extreme/LR_killer3.mp3"
new music5[] = "sound/Extreme/LR_rambo.wav"
new g_sound_beacon[] = "fvox/blip.wav"
new bool:touch_weapons[33], bool:once[33], bool:player_challenged[33], bool:duel_active, bool:s4s_deagle[33],
bool:s4s_awp[33], bool:s4s_scout[33], bool:s4s_glock[33], bool:s4s_usp[33], bool:hp_menu[33], bool:hp_deagle[33],
bool:hp_awp[33], bool:hp_scout[33], bool:hp_mp5[33], bool:hp_m4a1[33], bool:hp_ak47[33], bool:hp_mech[33],
bool:hp_shotgun[33], bool:knife_duel[33], bool:shot4shot_menu[33], bool:grenade_duel[33], bool:scout_duel[33],
bool:hns_duel[33], bool:awp_duel[33], bool:take_duel[33], bool:bomb_duel[33], bool:spray_duel[33],
bool:guntoss_duel[33], bool:knifehp_duel[33], bool:rambo[33], bool:noclipman_duel[33], bool:invisible_duel[33],
bool:gravity_duel[33], bool:smoke_duel[33], bool:sr_duel[33], bool:seems_duel[33], bool:gravitym3_duel[33],
bool:gravityawp_duel[33], bool:freeday[33], bool:knife_slap[33], bool:zawp[33], bool:zscout[33], bool:songmsg
#define MAX_PLAYERS 32
#define OFFSET_ENT_TO_INDEX 43
enum droptype
{
droptype_manual,
droptype_ondeath
}
new const g_drop[] = "drop";
new const g_wbox_class[] = "weaponbox";
new const g_wbox_model[] = "models/w_weaponbox.mdl";
new const g_wbox_model_prefix[] = "models/w_";
new const g_start_client_index = 1;
new g_command[MAX_PLAYERS + 1][sizeof g_drop + 1];
public plugin_init()
{
register_plugin("Jailbreak Last Request", "2.6", "ZeDoX")
register_logevent("event_round_start", 2, "1=Round_Start")
RegisterHam(Ham_Touch, "weaponbox", "fw_touch_weapon")
RegisterHam(Ham_Touch, "armoury_entity", "fw_touch_weapon")
RegisterHam(Ham_Touch, "weapon_shield", "fw_touch_weapon")
RegisterHam(Ham_Spawn, "player", "fw_player_respawn", 1)
RegisterHam(Ham_Killed, "player", "fw_player_killed")
register_clcmd("say /lr", "duel_menu")
register_clcmd("say !lr", "duel_menu")
register_clcmd("say_team /lr", "duel_menu")
register_clcmd("say_team !lr", "duel_menu")
register_concmd("amx_wpglow_mode","cmd_wpglow_mode",ADMIN_LEVEL_A,"<0|1|2|3>")
register_concmd("amx_wpglow_color","cmd_wpglow_color",ADMIN_LEVEL_A,"<red> <green> <blue>")
register_forward(FM_SetModel,"fw_model")
register_forward(FM_SetModel, "fw_setmodel")
register_forward(FM_Touch,"fw_touch")
register_forward(FM_CmdStart,"fw_cmdstart",1)
g_maxPlayers = get_maxplayers()
toggle = register_cvar("weapontrail","1")
light = register_cvar("weapontrail_light","1")
vel = register_cvar("weapontrail_vel","0")
g_max_clients = global_get(glb_maxClients)
g_max_entities = global_get(glb_maxEntities)
ForwardSecAttackAwp = RegisterHam( Ham_Weapon_SecondaryAttack, "weapon_awp" , "OnSecondaryAttack" )
ForwardSecAttackScout = RegisterHam( Ham_Weapon_SecondaryAttack, "weapon_scout", "OnSecondaryAttack" )
}
public plugin_precache()
{
precache_generic(music2)
precache_generic(music3)
precache_generic(music4)
precache_generic(music5)
precache_sound(g_sound_beacon)
beacon_sprite = precache_model("sprites/zbeam2.spr")
g_trail = precache_model("sprites/smoke.spr")
}
public event_round_start()
{
duel_active = false
songmsg = false
remove_task
}
public fw_player_respawn(id)
{
remove_task(id)
new players[32], num, ct, t
get_players(players, num)
TeamCount(ct, t)
for(new i = 0; i < num; i++) {
if(t == 1 && ct > 0 && cs_get_user_team(players[i]) == CS_TEAM_T && is_user_alive(players[i]))
{
client_cmd(players[i], "say /lr")
if(!songmsg) {
set_hudmessage(0, 255, 0, -1.0, 0.22, 1, 6.0, 6.0)
show_hudmessage(0, "LastRequest activated Now !")
ColorChat(0, NORMAL, "%s^x04 LastRequest^x01 activated Now !.", TAG)
client_cmd(0, "mp3 play ^"%s^"", music2)
songmsg = true
}
}
}
if(!is_user_alive(id) || !cs_get_user_team(id))
touch_weapons[id] = false
once[id] = false
knife_duel[id] = false
shot4shot_menu[id] = false
grenade_duel[id] = false
scout_duel[id] = false
hns_duel[id] = false
knifehp_duel[id] = false
awp_duel[id] = false
take_duel[id] = false
bomb_duel[id] = false
spray_duel[id] = false
guntoss_duel[id] = false
noclipman_duel[id] = false
invisible_duel[id] = false
gravity_duel[id] = false
smoke_duel[id] = false
sr_duel[id] = false
seems_duel[id] = false
gravitym3_duel[id] = false
gravityawp_duel[id] = false
knife_slap[id] = false
s4s_deagle[id] = false
s4s_awp[id] = false
s4s_scout[id] = false
s4s_glock[id] = false
s4s_usp[id] = false
hp_menu[id] = false
hp_deagle[id] = false
hp_awp[id] = false
hp_scout[id] = false
hp_mp5[id] = false
hp_m4a1[id] = false
hp_ak47[id] = false
hp_mech[id] = false
hp_shotgun[id] = false
zawp[id] = false
zscout[id] = false
player_challenged[id] = false
zawp[id] = false
zscout[id] = false
rambo[id] = false
DisableHamForward( ForwardSecAttackAwp )
DisableHamForward( ForwardSecAttackScout )
if(freeday[id]) {
set_task(10.0, "glow", id)
freeday[id] = false
}
}
public fw_touch_weapon(weapon, id)
{
if (!is_user_connected(id))
return HAM_IGNORED;
new players[32], pnum, tempid;
get_players(players, pnum, "a");
for( new i; i<pnum; i++ )
{
tempid = players[i];
}
if (touch_weapons[id] || touch_weapons[tempid])
return HAM_SUPERCEDE;
return HAM_IGNORED;
}
public fw_player_killed(victim, attacker, shouldgib, id)
{
if(duel_active)
{
new szVName[32], szKName[32]
get_user_name(victim, szVName, charsmax(szVName))
get_user_name(attacker, szKName, charsmax(szKName))
static origin[3]
get_user_origin(victim, origin)
message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
write_byte(TE_BEAMCYLINDER) // TE id
write_coord(origin[0]) // x
write_coord(origin[1]) // y
write_coord(origin[2]-20) // z
write_coord(origin[0]) // x axis
write_coord(origin[1]) // y axis
write_coord(origin[2]+200) // z axis
write_short(beacon_sprite) // sprite
write_byte(0) // startframe
write_byte(1) // framerate
write_byte(6) // life
write_byte(1000) // width
write_byte(1) // noise
write_byte(0) // red
write_byte(250) // green
write_byte(0) // blue
write_byte(200) // brightness
write_byte(0) // speed
message_end()
emit_sound(0, CHAN_ITEM, "weapons/explode3.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
switch(random_num(1,2)) {
case 1: client_cmd(0, "mp3 play ^"%s^"", music3)
case 2: client_cmd(0, "mp3 play ^"%s^"", music4)
}
if(cs_get_user_team(victim) == CS_TEAM_CT && player_challenged[victim])
{
knife_duel[attacker] = false
shot4shot_menu[attacker] = false
grenade_duel[attacker] = false
scout_duel[attacker] = false
hns_duel[attacker] = false
knifehp_duel[attacker] = false
awp_duel[attacker] = false
take_duel[attacker] = false
bomb_duel[attacker] = false
spray_duel[attacker] = false
guntoss_duel[attacker] = false
noclipman_duel[attacker] = false
invisible_duel[attacker] = false
gravity_duel[attacker] = false
smoke_duel[attacker] = false
sr_duel[attacker] = false
seems_duel[attacker] = false
gravitym3_duel[attacker] = false
gravityawp_duel[attacker] = false
freeday[attacker] = false
knife_slap[attacker] = false
s4s_deagle[attacker] = false
s4s_awp[attacker] = false
s4s_scout[attacker] = false
s4s_glock[attacker] = false
s4s_usp[attacker] = false
hp_menu[attacker] = false
hp_deagle[attacker] = false
hp_awp[attacker] = false
hp_scout[attacker] = false
hp_mp5[attacker] = false
hp_m4a1[attacker] = false
hp_ak47[attacker] = false
hp_mech[attacker] = false
hp_shotgun[attacker] = false
zawp[attacker] = false
zscout[attacker] = false
once[attacker] = false
strip_user_weapons(attacker)
give_item(attacker, "weapon_knife")
set_user_rendering(attacker)
duel_menu(attacker)
ColorChat(0, NORMAL, "%s^x04 %s^x01 has won the Duel against^x04 %s.", TAG, szKName, szVName)
set_hudmessage(0, 255, 255, -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15, 3)
show_hudmessage(0, "%s has won the Duel against %s", szKName, szVName)
}
else if(cs_get_user_team(victim) == CS_TEAM_CT && !player_challenged[victim])
{
set_hudmessage( 0, 255, 0, -1.0, 0.40, 2, 5.0, 8.0, 0.0, 0.0, 10)
show_hudmessage(0, "%s died for killing the enemy was not", szKName)
}
}
new players[32], num, ct, t
get_players(players, num)
TeamCount(ct, t)
for(new i = 0; i < num; i++)
{
if(t == 1 && ct > 0 && cs_get_user_team(players[i]) == CS_TEAM_T && is_user_alive(players[i]))
{
client_cmd(players[i], "say /lr")
if(!songmsg) {
set_hudmessage(0, 255, 0, -1.0, 0.22, 1, 6.0, 6.0)
show_hudmessage(0, "LastRequest activated Now !")
ColorChat(0, NORMAL, "%s^x04 LastRequest^x01 activated Now !.", TAG)
client_cmd(0, "mp3 play ^"%s^"", music2)
songmsg = true
}
}
}
remove_task(attacker)
remove_task(victim)
return PLUGIN_CONTINUE
}
/*================================================================================
Main Menu
=================================================================================*/
public duel_menu(id)
{
if(is_user_alive(id) && !once[id])
{
if(cs_get_user_team(id) == CS_TEAM_T)
{
new cts[32], ts[32], ctsnum, tsnum
for (new id=1; id <= g_maxPlayers; id++)
{
if(!is_user_connected(id) || !is_user_alive(id))
continue
if(cs_get_user_team(id) == CS_TEAM_T)
ts[tsnum++] = id
else if(cs_get_user_team(id) == CS_TEAM_CT)
cts[ctsnum++] = id
}
if(tsnum == 1 && ctsnum >= 1)
{
new iMenu = menu_create("\r[\w Last Request \r ]\w Select:", "sub_duel_menu")
menu_additem(iMenu, "Knife Duel", "1")
menu_additem(iMenu, "Shot4Shot\r [\yMenu\r]", "2")
menu_additem(iMenu, "Hp Duel\r [\yMenu\r]", "3")
menu_additem(iMenu, "Grenades Duel", "4")
menu_additem(iMenu, "Scout Duel", "5")
menu_additem(iMenu, "Hide N Seek Duel\r [\yTimer\r]", "6")
menu_additem(iMenu, "Knife\r [\yHp\r]", "7")
menu_additem(iMenu, "AWP Duel", "8")
menu_additem(iMenu, "Take Away The Bomb Duel", "9")
menu_additem(iMenu, "BombToss Duel", "10")
menu_additem(iMenu, "Spray Contest Duel", "11")
menu_additem(iMenu, "GunToss Duel", "12")
menu_additem(iMenu, "Kill The Noclip Man\r [\yTimer\r]", "13")
menu_additem(iMenu, "Invisible Duel", "14")
menu_additem(iMenu, "Stealth Fight Duel", "15")
menu_additem(iMenu, "Smoke Death Duel", "16")
menu_additem(iMenu, "Survival Mode Duel", "17")
menu_additem(iMenu, "Fight in no Seems Duel", "18")
menu_additem(iMenu, "Gravity\r [\ySg\r]", "19")
menu_additem(iMenu, "Gravity\r [\yAwp\r]", "20")
menu_additem(iMenu, "Freeday\r [\yNr\r]", "21")
menu_additem(iMenu, "Knife Duel\r [\ySlap\r]", "22")
menu_additem(iMenu, "Awp\r [\yNoZoom\r]", "23")
menu_additem(iMenu, "Scout\r [\yNoZoom\r]", "24")
menu_additem(iMenu, "\rRambo Mode", "25")
menu_setprop(iMenu, MPROP_EXIT, MEXIT_ALL)
menu_display(id, iMenu)
}
}
}
}
public sub_duel_menu(id, menu, item)
{
new name[32]
get_user_name(id, name, 31)
strip_user_weapons(id)
new Data[6], Name[621]
new Access, Callback
menu_item_getinfo(menu, item, Access, Data,5, Name, 63, Callback)
new Key = str_to_num(Data)
switch (Key)
{
case 1:
{
knife_duel[id] = true
choose_enemy(id)
set_hudmessage(135, 135, 135, -1.0, 0.0, 0, 6.0, 12.0)
show_hudmessage(0, "%s^n%s has Chose Knife Duel !", HUDTAG, name)
}
case 2:
{
shot4shot_menu[id] = true
sub_s4s(id)
}
case 3:
{
hp_menu[id] = true
sub_hp(id)
}
case 4:
{
grenade_duel[id] = true
choose_enemy(id)
set_hudmessage(135, 135, 135, -1.0, 0.0, 0, 6.0, 12.0)
show_hudmessage(0, "%s^n%s has Chose Grenade Duel !", HUDTAG, name)
}
case 5:
{
scout_duel[id] = true
choose_enemy(id)
set_hudmessage(135, 135, 135, -1.0, 0.0, 0, 6.0, 12.0)
show_hudmessage(0, "%s^n%s has Scout Duel !", HUDTAG, name)
}
case 6:
{
hns_duel[id] = true
choose_enemy(id)
set_hudmessage(135, 135, 135, -1.0, 0.0, 0, 6.0, 12.0)
show_hudmessage(0, "%s^n%s has Chose Hide N Seek [Timer] !", HUDTAG, name)
}
case 7:
{
knifehp_duel[id] = true
choose_enemy(id)
set_hudmessage(135, 135, 135, -1.0, 0.0, 0, 6.0, 12.0)
show_hudmessage(0, "%s^n%s has Chose Knife [Hp] !", HUDTAG, name)
}
case 8:
{
awp_duel[id] = true
choose_enemy(id)
set_hudmessage(135, 135, 135, -1.0, 0.0, 0, 6.0, 12.0)
show_hudmessage(0, "%s^n%s has Chose AWP Duel !", HUDTAG, name)
}
case 9:
{
take_duel[id] = true
choose_enemy(id)
set_hudmessage(135, 135, 135, -1.0, 0.0, 0, 6.0, 12.0)
show_hudmessage(0, "%s^n%s has Chose Take Away The Bomb !", HUDTAG, name)
}
case 10:
{
bomb_duel[id] = true
choose_enemy(id)
set_hudmessage(135, 135, 135, -1.0, 0.0, 0, 6.0, 12.0)
show_hudmessage(0, "%s^n%s has Chose Bomb Toss Duel !", HUDTAG, name)
}
case 11:
{
spray_duel[id] = true
choose_enemy(id)
set_hudmessage(135, 135, 135, -1.0, 0.0, 0, 6.0, 12.0)
show_hudmessage(0, "%s^n%s has Chose Spray Cantest Duel !", HUDTAG, name)
}
case 12:
{
guntoss_duel[id] = true
choose_enemy(id)
set_hudmessage(135, 135, 135, -1.0, 0.0, 0, 6.0, 12.0)
show_hudmessage(0, "%s^n%s has Chose GunToss Duel !", HUDTAG, name)
}
case 13:
{
noclipman_duel[id] = true
choose_enemy(id)
set_hudmessage(135, 135, 135, -1.0, 0.0, 0, 6.0, 12.0)
show_hudmessage(0, "%s^n%s has Chose Kill The Noclip Man Duel [Timer] !", HUDTAG, name)
}
case 14:
{
invisible_duel[id] = true
choose_enemy(id)
set_hudmessage(135, 135, 135, -1.0, 0.0, 0, 6.0, 12.0)
show_hudmessage(0, "%s^n%s has Chose Invisible Duel !", HUDTAG, name)
}
case 15:
{
gravity_duel[id] = true
choose_enemy(id)
set_hudmessage(135, 135, 135, -1.0, 0.0, 0, 6.0, 12.0)
show_hudmessage(0, "%s^n%s has Chose Stealth Fight Duel !", HUDTAG, name)
}
case 16:
{
smoke_duel[id] = true
choose_enemy(id)
set_hudmessage(135, 135, 135, -1.0, 0.0, 0, 6.0, 12.0)
show_hudmessage(0, "%s^n%s has Chose Smoke Death Duel !", HUDTAG, name)
}
case 17:
{
sr_duel[id] = true
choose_enemy(id)
set_hudmessage(135, 135, 135, -1.0, 0.0, 0, 6.0, 12.0)
show_hudmessage(0, "%s^n%s has Chose Survival Mode Duel !", HUDTAG, name)
}
case 18:
{
seems_duel[id] = true
choose_enemy(id)
set_hudmessage(135, 135, 135, -1.0, 0.0, 0, 6.0, 12.0)
show_hudmessage(0, "%s^n%s has Chose Fight in no Seems Duel", HUDTAG, name)
}
case 19:
{
gravitym3_duel[id] = true
choose_enemy(id)
set_hudmessage(135, 135, 135, -1.0, 0.0, 0, 6.0, 12.0)
show_hudmessage(0, "%s^n%s has Chose Gravity [Sg] !", HUDTAG, name)
}
case 20:
{
gravityawp_duel[id] = true
choose_enemy(id)
set_hudmessage(135, 135, 135, -1.0, 0.0, 0, 6.0, 12.0)
show_hudmessage(0, "%s^n%s has Chose Gravity [Awp] !", HUDTAG, name)
}
case 21:
{
freeday[id] = true
duel_active = true
once[id] = true
user_kill(id)
set_hudmessage( 0, 255, 0, -1.0, 0.40, 2, 5.0, 8.0, 0.0, 0.0, 10)
show_hudmessage(0,"%s^n%s Choose Freeday^nnext round you will be with glow", HUDTAG, name)
ColorChat(0, NORMAL, "%s^x04 %s^x01 has Choose^x04 Freeday.", TAG, name)
}
case 22:
{
knife_slap[id] = true
choose_enemy(id)
set_hudmessage(135, 135, 135, -1.0, 0.0, 0, 6.0, 12.0)
show_hudmessage(0, "%s^n%s has Chose Knife [Slap] !", HUDTAG, name)
}
case 23:
{
zawp[id] = true
choose_enemy(id)
set_hudmessage(135, 135, 135, -1.0, 0.0, 0, 6.0, 12.0)
show_hudmessage(0, "%s^n%s has Chose Awp [NoZoom] !", HUDTAG, name)
}
case 24:
{
zscout[id] = true
choose_enemy(id)
set_hudmessage(135, 135, 135, -1.0, 0.0, 0, 6.0, 12.0)
show_hudmessage(0, "%s^n%s has Chose Scout [NoZoom] !", HUDTAG, name)
}
case 25:
{
server_cmd("weapontrail 1;amx_wpglow_mode 1")
rambo[id] = true
duel_active = true
once[id] = true
client_cmd(0, "spk ^"%s^"", music5)
set_user_rendering(id, kRenderFxGlowShell, 0, 250, 0, kRenderNormal, 250)
strip_user_weapons(id)
give_item(id, "weapon_m249")
cs_set_user_bpammo(id, CSW_M249, 500)
set_task(0.5, "beacon", id,_,_, "b")
set_user_health(id, 2000)
set_hudmessage(0, 255, 0, -1.0, 0.40, 2, 5.0, 8.0, 0.0, 0.0, 10)
show_hudmessage(0,"%s^n%s has started^n Rambo Mode", HUDTAG, name)
ColorChat(0, NORMAL, "%s^x04 %s^x01 has started a^x04 Rambo Mode.", TAG, name)
}
}
menu_destroy(menu)
return PLUGIN_HANDLED
}
/*================================================================================
Menu of challenges
=================================================================================*/
public sub_s4s(id)
{
static opcion[64]
formatex(opcion, charsmax(opcion),"\r[\w Last Request\r ]\w Choose Weapon For Shot4Shot")
new iMenus4s = menu_create(opcion, "sub_duel_menu_s4s")
formatex(opcion, charsmax(opcion),"Deagle")
menu_additem(iMenus4s, opcion, "1")
formatex(opcion, charsmax(opcion),"Awp \r[\yNoZoom\r]")
menu_additem(iMenus4s, opcion, "2")
formatex(opcion, charsmax(opcion),"Scout \r[\yNoZoom\r]")
menu_additem(iMenus4s, opcion, "3")
formatex(opcion, charsmax(opcion),"Glock")
menu_additem(iMenus4s, opcion, "4")
formatex(opcion, charsmax(opcion),"Usp")
menu_additem(iMenus4s, opcion, "5")
menu_setprop(iMenus4s, MPROP_EXIT, MEXIT_ALL)
menu_display(id, iMenus4s, 0)
return PLUGIN_HANDLED
}
public sub_hp(id)
{
static opcion[64]
formatex(opcion, charsmax(opcion),"\r[\w Last Request\r ]\w Choose Weapon For Hp Duel")
new iMenuhp = menu_create(opcion, "sub_duel_menu_hp")
formatex(opcion, charsmax(opcion),"Deagle")
menu_additem(iMenuhp, opcion, "1")
formatex(opcion, charsmax(opcion),"Awp")
menu_additem(iMenuhp, opcion, "2")
formatex(opcion, charsmax(opcion),"Scout")
menu_additem(iMenuhp, opcion, "3")
formatex(opcion, charsmax(opcion),"Mechinegun")
menu_additem(iMenuhp, opcion, "4")
formatex(opcion, charsmax(opcion),"Shotgun")
menu_additem(iMenuhp, opcion, "5")
formatex(opcion, charsmax(opcion),"Mp5")
menu_additem(iMenuhp, opcion, "6")
formatex(opcion, charsmax(opcion),"M4a1")
menu_additem(iMenuhp, opcion, "7")
formatex(opcion, charsmax(opcion),"Ak47")
menu_additem(iMenuhp, opcion, "8")
menu_setprop(iMenuhp, MPROP_EXIT, MEXIT_ALL)
menu_display(id, iMenuhp, 0)
return PLUGIN_HANDLED
}
public sub_duel_menu_hp(id, menu_sub_hp, item)
{
new name[32]
get_user_name(id, name, 31)
strip_user_weapons(id)
new Data[6], Name[621]
new Access, Callback
menu_item_getinfo(menu_sub_hp, item, Access, Data,5, Name, 63, Callback)
new Key = str_to_num(Data)
switch (Key)
{
case 1:
{
hp_deagle[id] = true
choose_enemy(id)
set_hudmessage(135, 135, 135, -1.0, 0.0, 0, 6.0, 12.0)
show_hudmessage(0, "%s^n%s has Chose Hp Duel [Deagle] !", HUDTAG, name)
}
case 2:
{
hp_awp[id] = true
choose_enemy(id)
set_hudmessage(135, 135, 135, -1.0, 0.0, 0, 6.0, 12.0)
show_hudmessage(0, "%s^n%s has Chose Hp Duel [Awp] !", HUDTAG, name)
}
case 3:
{
hp_scout[id] = true
choose_enemy(id)
set_hudmessage(135, 135, 135, -1.0, 0.0, 0, 6.0, 12.0)
show_hudmessage(0, "%s^n%s has Chose Hp Duel [Scout] !", HUDTAG, name)
}
case 4:
{
hp_mech[id] = true
choose_enemy(id)
set_hudmessage(135, 135, 135, -1.0, 0.0, 0, 6.0, 12.0)
show_hudmessage(0, "%s^n%s has Chose Hp Duel [Mechinegun] !", HUDTAG, name)
}
case 5:
{
hp_shotgun[id] = true
choose_enemy(id)
set_hudmessage(135, 135, 135, -1.0, 0.0, 0, 6.0, 12.0)
show_hudmessage(0, "%s^n%s has Chose Hp Duel [Shotgun] !", HUDTAG, name)
}
case 6:
{
hp_mp5[id] = true
choose_enemy(id)
set_hudmessage(135, 135, 135, -1.0, 0.0, 0, 6.0, 12.0)
show_hudmessage(0, "%s^n%s has Chose Hp Duel [Mp5] !", HUDTAG, name)
}
case 7:
{
hp_m4a1[id] = true
choose_enemy(id)
set_hudmessage(135, 135, 135, -1.0, 0.0, 0, 6.0, 12.0)
show_hudmessage(0, "%s^n%s has Chose Hp Duel [M4a1] !", HUDTAG, name)
}
case 8:
{
hp_ak47[id] = true
choose_enemy(id)
set_hudmessage(135, 135, 135, -1.0, 0.0, 0, 6.0, 12.0)
show_hudmessage(0, "%s^n%s has Chose Hp Duel [Ak47] !", HUDTAG, name)
}
}
menu_destroy(menu_sub_hp)
return PLUGIN_HANDLED
}
public sub_duel_menu_s4s(id, menu_sub_s4s, item)
{
//client_cmd(0, "mp3 play ^"%s^"", music2)
new name[32]
get_user_name(id, name, 31)
if (item == MENU_EXIT)
{
menu_destroy(menu_sub_s4s)
return PLUGIN_HANDLED
}
strip_user_weapons(id)
new Data[6], Name[621]
new Access, Callback
menu_item_getinfo(menu_sub_s4s, item, Access, Data,5, Name, 63, Callback)
new Key = str_to_num(Data)
switch (Key)
{
case 1:
{
s4s_deagle[id] = true
choose_enemy(id)
set_hudmessage(135, 135, 135, -1.0, 0.0, 0, 6.0, 12.0)
show_hudmessage(0, "%s^n%s has Chose Shot4Shot [Deagle] !", HUDTAG, name)
}
case 2:
{
s4s_awp[id] = true
choose_enemy(id)
set_hudmessage(135, 135, 135, -1.0, 0.0, 0, 6.0, 12.0)
show_hudmessage(0, "%s^n%s has Chose Shot4Shot [Awp] !", HUDTAG, name)
}
case 3:
{
s4s_scout[id] = true
choose_enemy(id)
set_hudmessage(135, 135, 135, -1.0, 0.0, 0, 6.0, 12.0)
show_hudmessage(0, "%s^n%s has Chose Shot4Shot [Scout] !", HUDTAG, name)
}
case 4:
{
s4s_glock[id] = true
choose_enemy(id)
set_hudmessage(135, 135, 135, -1.0, 0.0, 0, 6.0, 12.0)
show_hudmessage(0, "%s^n%s has Chose Shot4Shot [Glock] !", HUDTAG, name)
}
case 5:
{
s4s_usp[id] = true
choose_enemy(id)
set_hudmessage(135, 135, 135, -1.0, 0.0, 0, 6.0, 12.0)
show_hudmessage(0, "%s^n%s has Chose Shot4Shot [Usp] !", HUDTAG, name)
}
}
menu_destroy(menu_sub_s4s)
return PLUGIN_HANDLED
}
public choose_enemy(id)
{
static opcion[64]
formatex(opcion, charsmax(opcion),"\r[\w Last Request\r ]\w Choose player")
new iMenu = menu_create(opcion, "sub_choose_enemy")
new players[32], pnum, tempid
new szName[32], szTempid[10]
get_players(players, pnum, "a")
for( new i; i<pnum; i++ )
{
tempid = players[i]
if(cs_get_user_team(tempid) != CS_TEAM_CT)
continue
get_user_name(tempid, szName, 31)
num_to_str(tempid, szTempid, 9)
menu_additem(iMenu, szName, szTempid, 0)
}
menu_display(id, iMenu)
return PLUGIN_HANDLED
}
public sub_choose_enemy(id, menu, item)
{
new Data[6], Name[64]
new Access, Callback
menu_item_getinfo(menu, item, Access, Data,5, Name, 63, Callback)
new tempid = str_to_num(Data)
new challenger[32], challenged[32]
get_user_name(id, challenger, 31)
get_user_name(tempid, challenged, 31)
set_user_health(id, 100)
set_user_health(tempid, 100)
set_user_armor(id, 100)
set_user_armor(tempid, 100)
set_user_gravity(id, 1.0)
set_user_gravity(tempid, 1.0)
set_user_rendering(id, kRenderFxGlowShell, 255, 0, 0, kRenderNormal, 20)
set_user_rendering(tempid, kRenderFxGlowShell, 0, 0, 255, kRenderNormal, 20)
set_user_godmode(id, 0)
set_user_godmode(tempid, 0)
set_user_noclip(id, 0)
set_user_noclip(tempid, 0)
//client_cmd(0, "mp3 play ^"%s^"", music2)
player_challenged[tempid] = true
once[id] = true
server_cmd("weapontrail 1;amx_wpglow_mode 1")
if(knife_duel[id])
{
strip_user_weapons(id)
strip_user_weapons(tempid)
give_item(id, "weapon_knife")
give_item(tempid, "weapon_knife")
set_task(1.5, "beacon", id,_,_, "b")
set_task(1.5, "beacon", tempid,_,_, "b")
set_hudmessage( 0, 255, 0, -1.0, 0.40, 2, 5.0, 8.0, 0.0, 0.0, 10)
show_hudmessage(0, "%s vs %s^n Knife Duel", challenger, challenged)
ColorChat(0, NORMAL, "%s^x04 %s^x01 has started a^x04 Knife Duel^x01 vs^x04 %s.", TAG, challenger, challenged)
}
else if(grenade_duel[id])
{
strip_user_weapons(id)
strip_user_weapons(tempid)
give_item(id, "weapon_hegrenade")
give_item(tempid, "weapon_hegrenade")
cs_set_user_bpammo(id, CSW_HEGRENADE, 99999)
cs_set_user_bpammo(tempid, CSW_HEGRENADE, 99999)
set_user_health(id, 250)
set_user_health(tempid, 250)
set_task(1.5, "beacon", id,_,_, "b")
set_task(1.5, "beacon", tempid,_,_, "b")
set_hudmessage( 0, 255, 0, -1.0, 0.40, 2, 5.0, 8.0, 0.0, 0.0, 10)
show_hudmessage(0,"%s vs %s^n Grenades Duel", challenger, challenged)
ColorChat(0, NORMAL, "%s^x04 %s^x01 has started a^x04 Grenade Duel^x01 vs^x04 %s.", TAG, challenger, challenged)
}
else if(scout_duel[id])
{
strip_user_weapons(id)
strip_user_weapons(tempid)
give_item(id, "weapon_scout")
give_item(tempid, "weapon_scout")
cs_set_user_bpammo(id, CSW_SCOUT, 99999)
cs_set_user_bpammo(tempid, CSW_SCOUT, 99999)
set_task(1.5, "beacon", id,_,_, "b")
set_task(1.5, "beacon", tempid,_,_, "b")
set_hudmessage( 0, 255, 0, -1.0, 0.40, 2, 5.0, 8.0, 0.0, 0.0, 10)
show_hudmessage(0,"%s vs %s^n Scout Duel", challenger, challenged)
ColorChat(0, NORMAL, "%s^x04 %s^x01 has started a^x04 Scout Duel^x01 vs^x04 %s.", TAG, challenger, challenged)
}
else if(hns_duel[id])
{
strip_user_weapons(id)
strip_user_weapons(tempid)
give_item(tempid, "weapon_knife")
set_user_rendering(id, kRenderFxNone, 16, 16, 16, kRenderTransAlpha, 5)
set_hudmessage(0, 255, 0, -1.0, 0.36, 0, 6.0, 12.0)
rar = 120
set_task(1.0, "raga", id);
set_hudmessage( 0, 255, 0, -1.0, 0.40, 2, 5.0, 8.0, 0.0, 0.0, 10)
show_hudmessage(0,"%s vs %s^n Hide N Seek", challenger, challenged)
ColorChat(0, NORMAL, "%s^x04 %s^x01 has started a^x04 Hide N Seek^x01 vs^x04 %s.", TAG, challenger, challenged)
}
else if(knifehp_duel[id])
{
strip_user_weapons(id)
strip_user_weapons(tempid)
give_item(id, "weapon_knife")
give_item(tempid, "weapon_knife")
set_user_health(id, 700)
set_user_health(tempid, 700)
set_task(1.5, "beacon", id,_,_, "b")
set_task(1.5, "beacon", tempid,_,_, "b")
set_hudmessage( 0, 255, 0, -1.0, 0.40, 2, 5.0, 8.0, 0.0, 0.0, 10)
show_hudmessage(0,"%s vs %s^n Knife Duel [Hp]", challenger, challenged)
ColorChat(0, NORMAL, "%s^x04 %s^x01 has started a^x04 Knife Duel [HP]^x01 vs^x04 %s.", TAG, challenger, challenged)
}
else if(awp_duel[id])
{
strip_user_weapons(id)
strip_user_weapons(tempid)
give_item(id, "weapon_awp")
give_item(tempid, "weapon_awp")
cs_set_user_bpammo(id, CSW_AWP, 999999)
cs_set_user_bpammo(tempid, CSW_AWP, 99999)
set_task(1.5, "beacon", id,_,_, "b")
set_task(1.5, "beacon", tempid,_,_, "b")
set_hudmessage( 0, 255, 0, -1.0, 0.40, 2, 5.0, 8.0, 0.0, 0.0, 10)
show_hudmessage(0,"%s vs %s^n AWP Duel", challenger, challenged)
ColorChat(0, NORMAL, "%s^x04 %s^x01 has started a^x04 Awp Duel^x01 vs^x04 %s.", TAG, challenger, challenged)
}
else if(take_duel[id])
{
strip_user_weapons(id)
strip_user_weapons(tempid)
give_item(id, "weapon_c4")
give_item(tempid, "weapon_c4")
give_item(id, "weapon_deagle")
give_item(tempid, "weapon_deagle")
cs_set_user_bpammo(id, CSW_DEAGLE, 70)
cs_set_user_bpammo(tempid, CSW_DEAGLE, 70)
set_task(1.5, "beacon", id,_,_, "b")
set_task(1.5, "beacon", tempid,_,_, "b")
set_hudmessage( 0, 255, 0, -1.0, 0.40, 2, 5.0, 8.0, 0.0, 0.0, 10)
show_hudmessage(0,"%s vs %s^n Take Away The Bomb", challenger, challenged)
ColorChat(0, NORMAL, "%s^x04 %s^x01 has started a^x04 Take Away The Bomb^x01 vs^x04 %s.", TAG, challenger, challenged)
}
else if(bomb_duel[id])
{
strip_user_weapons(id)
strip_user_weapons(tempid)
give_item(id, "weapon_c4")
give_item(tempid, "weapon_c4")
give_item(id, "weapon_m4a1")
give_item(tempid, "weapon_m4a1")
cs_set_user_bpammo(id, CSW_M4A1, 120)
cs_set_user_bpammo(tempid, CSW_M4A1, 120)
set_task(1.5, "beacon", id,_,_, "b")
set_task(1.5, "beacon", tempid,_,_, "b")
set_hudmessage( 0, 255, 0, -1.0, 0.40, 2, 5.0, 8.0, 0.0, 0.0, 10)
show_hudmessage(0,"%s vs %s^n Bomb Toss Duel", challenger, challenged)
ColorChat(0, NORMAL, "%s^x04 %s^x01 has started a^x04 Bomb Toss Duel^x01 vs^x04 %s.", TAG, challenger, challenged)
}
else if(spray_duel[id])
{
strip_user_weapons(id)
strip_user_weapons(tempid)
give_item(id, "weapon_knife")
give_item(tempid, "weapon_knife")
set_task(1.5, "beacon", id,_,_, "b")
set_task(1.5, "beacon", tempid,_,_, "b")
set_hudmessage( 0, 255, 0, -1.0, 0.40, 2, 5.0, 8.0, 0.0, 0.0, 10)
show_hudmessage(0,"%s vs %s^n Spray Contast Duel", challenger, challenged)
ColorChat(0, NORMAL, "%s^x04 %s^x01 has started a^x04 Spray Contast^x01 vs^x04 %s.", TAG, challenger, challenged)
}
else if(guntoss_duel[id])
{
strip_user_weapons(id)
strip_user_weapons(tempid)
give_item(id, "weapon_deagle")
give_item(tempid, "weapon_deagle")
cs_set_user_bpammo(id, CSW_DEAGLE, 70)
cs_set_user_bpammo(tempid, CSW_DEAGLE, 70)
set_task(1.5, "beacon", id,_,_, "b")
set_task(1.5, "beacon", tempid,_,_, "b")
set_hudmessage( 0, 255, 0, -1.0, 0.40, 2, 5.0, 8.0, 0.0, 0.0, 10)
show_hudmessage(0,"%s vs %s^n GunToss Duel", challenger, challenged)
ColorChat(0, NORMAL, "%s^x04 %s^x01 has started a^x04 GunToss Duel^x01 vs^x04 %s.", TAG, challenger, challenged)
}
else if(noclipman_duel[id])
{
strip_user_weapons(id)
strip_user_weapons(tempid)
give_item(id, "weapon_deagle")
give_item(tempid, "weapon_knife")
cs_set_user_bpammo(id, CSW_DEAGLE, 99999)
set_user_noclip(tempid, 1)
rar = 60
set_task(1.0, "raga", id);
set_hudmessage( 0, 255, 0, -1.0, 0.40, 2, 5.0, 8.0, 0.0, 0.0, 10)
show_hudmessage(0,"%s vs %s^n Kill The Noclip Man", challenger, challenged)
ColorChat(0, NORMAL, "%s^x04 %s^x01 has started a^x04 Kill The Noclip Man^x01 vs^x04 %s.", TAG, challenger, challenged)
}
else if(invisible_duel[id])
{
strip_user_weapons(id)
strip_user_weapons(tempid)
give_item(id, "weapon_knife")
give_item(tempid, "weapon_m4a1")
cs_set_user_bpammo(tempid, CSW_M4A1, 99999)
set_user_rendering(id, kRenderFxNone, 16, 16, 16, kRenderTransAlpha, 5)
set_task(5.0, "beacon", id,_,_, "b")
set_task(1.5, "beacon", tempid,_,_, "b")
set_hudmessage( 0, 255, 0, -1.0, 0.40, 2, 5.0, 8.0, 0.0, 0.0, 10)
show_hudmessage(0,"%s vs %s^n Invisibility Fight", challenger, challenged)
ColorChat(0, NORMAL, "%s^x04 %s^x01 has started a^x04 Invisibility Fight^x01 vs^x04 %s.", TAG, challenger, challenged)
}
else if(gravity_duel[id])
{
strip_user_weapons(id)
strip_user_weapons(tempid)
give_item(id, "weapon_knife")
give_item(tempid, "weapon_deagle")
give_item(tempid, "weapon_m4a1")
set_user_noclip(id, 1)
cs_set_user_bpammo(tempid, CSW_DEAGLE, 9999);
cs_set_user_bpammo(tempid, CSW_M4A1, 99999);
set_user_rendering(id, kRenderFxNone, 16, 16, 16, kRenderTransAlpha, 5)
set_user_health(tempid, 500)
//set_task(1.5, "beacon", id,_,_, "b")
set_task(1.5, "beacon", tempid,_,_, "b")
set_hudmessage( 0, 255, 0, -1.0, 0.40, 2, 5.0, 8.0, 0.0, 0.0, 10)
show_hudmessage(0,"%s vs %s^n Stealth Fight", challenger, challenged)
ColorChat(0, NORMAL, "%s^x04 %s^x01 has started a^x04 Stealth Fight^x01 vs^x04 %s.", TAG, challenger, challenged)
}
else if(smoke_duel[id])
{
strip_user_weapons(id)
strip_user_weapons(tempid)
give_item(id, "weapon_smokegrenade")
give_item(tempid, "weapon_smokegrenade")
cs_set_user_bpammo(id, CSW_SMOKEGRENADE, 99999)
cs_set_user_bpammo(tempid, CSW_SMOKEGRENADE, 99999)
set_user_health(id, 25)
set_user_health(tempid, 25)
set_task(1.5, "beacon", id,_,_, "b")
set_task(1.5, "beacon", tempid,_,_, "b")
set_hudmessage( 0, 255, 0, -1.0, 0.40, 2, 5.0, 8.0, 0.0, 0.0, 10)
show_hudmessage(0,"%s vs %s^n Smoke Death Duel", challenger, challenged)
ColorChat(0, NORMAL, "%s^x04 %s^x01 has started a^x04 Smoke Death^x01 vs^x04 %s.", TAG, challenger, challenged)
}
else if(sr_duel[id])
{
strip_user_weapons(id)
strip_user_weapons(tempid)
give_item(id, "weapon_m4a1")
give_item(id, "weapon_deagle")
give_item(tempid, "weapon_knife")
cs_set_user_bpammo( id, CSW_M4A1, 500)
cs_set_user_bpammo( id, CSW_DEAGLE, 500)
set_user_health(tempid, 4000) // 4000 hp to ct
set_task(1.5, "beacon", id,_,_, "b")
set_task(1.5, "beacon", tempid,_,_, "b")
set_hudmessage( 0, 255, 0, -1.0, 0.40, 2, 5.0, 8.0, 0.0, 0.0, 10)
show_hudmessage(0,"%s vs %s^n Survival Mode", challenger, challenged)
ColorChat(0, NORMAL, "%s^x04 %s^x01 has started a^x04 Survival Mode^x01 vs^x04 %s.", TAG, challenger, challenged)
}
else if(seems_duel[id])
{
strip_user_weapons(id)
strip_user_weapons(tempid)
give_item(id, "weapon_knife")
give_item(tempid, "weapon_knife")
set_user_rendering(id, kRenderFxNone, 16, 16, 16, kRenderTransAlpha, 5)
set_user_rendering(tempid, kRenderFxNone, 16, 16, 16, kRenderTransAlpha, 5)
set_task(4.0, "beacon", id,_,_, "b")
set_task(4.0, "beacon", tempid,_,_, "b")
set_hudmessage( 0, 255, 0, -1.0, 0.40, 2, 5.0, 8.0, 0.0, 0.0, 10)
show_hudmessage(0,"%s vs %s^n Fight in no Seems", challenger, challenged)
ColorChat(0, NORMAL, "%s^x04 %s^x01 has started a^x04 Fight in No Seems^x01 vs^x04 %s.", TAG, challenger, challenged)
}
else if(gravitym3_duel[id])
{
strip_user_weapons(id)
strip_user_weapons(tempid)
give_item(id, "weapon_m3")
give_item(tempid, "weapon_m3")
cs_set_user_bpammo(id, CSW_M3, 99999)
cs_set_user_bpammo(tempid, CSW_M3, 99999)
set_user_health(id, 1200)
set_user_health(tempid, 1200)
set_task(1.5, "beacon", id,_,_, "b")
set_task(1.5, "beacon", tempid,_,_, "b")
set_user_gravity(id, 0.3)
set_user_gravity(tempid, 0.3)
set_hudmessage( 0, 255, 0, -1.0, 0.40, 2, 5.0, 8.0, 0.0, 0.0, 10)
show_hudmessage(0,"%s vs %s^n Gravity Duel [Sg]", challenger, challenged)
ColorChat(0, NORMAL, "%s^x04 %s^x01 has started a^x04 Gravity Duel [Sg]^x01 vs^x04 %s.", TAG, challenger, challenged)
}
else if(gravityawp_duel[id])
{
strip_user_weapons(id)
strip_user_weapons(tempid)
give_item(id, "weapon_awp")
give_item(tempid, "weapon_awp")
cs_set_user_bpammo(id, CSW_AWP, 99999)
cs_set_user_bpammo(tempid, CSW_AWP, 99999)
set_user_health(id, 1100)
set_user_health(tempid, 1100)
set_task(1.5, "beacon", id,_,_, "b")
set_task(1.5, "beacon", tempid,_,_, "b")
set_user_gravity(id, 0.3)
set_user_gravity(tempid, 0.3)
set_hudmessage( 0, 255, 0, -1.0, 0.40, 2, 5.0, 8.0, 0.0, 0.0, 10)
show_hudmessage(0,"%s vs %s^n Gravity Duel [Awp]", challenger, challenged)
ColorChat(0, NORMAL, "%s^x04 %s^x01 has started a^x04 Gravity Duel [Awp]^x01 vs^x04 %s.", TAG, challenger, challenged)
}
else if(knife_slap[id])
{
strip_user_weapons(id)
strip_user_weapons(tempid)
give_item(id, "weapon_knife")
give_item(tempid, "weapon_knife")
set_user_health(id, 100)
set_user_health(tempid, 100)
set_task(1.5, "beacon", id,_,_, "b")
set_task(1.5, "beacon", tempid,_,_, "b")
set_task(0.5, "slaps",id,_,_, "b");
set_task(0.5, "slaps",tempid,_,_, "b");
set_hudmessage( 0, 255, 0, -1.0, 0.40, 2, 5.0, 8.0, 0.0, 0.0, 10)
show_hudmessage(0,"%s vs %s^n Knife Duel [Slap]", challenger, challenged)
ColorChat(0, NORMAL, "%s^x04 %s^x01 has started a^x04 Knife Duel [Slap]^x01 vs^x04 %s.", TAG, challenger, challenged)
}
else if(s4s_deagle[id])
{
strip_user_weapons(id)
strip_user_weapons(tempid)
give_item(id, "weapon_deagle")
give_item(tempid, "weapon_deagle")
cs_set_weapon_ammo(give_item(id, "weapon_deagle"), 1)
cs_set_weapon_ammo(give_item(tempid, "weapon_deagle"), 1)
set_task(1.5, "beacon", id,_,_, "b")
set_task(1.5, "beacon", tempid,_,_, "b")
set_hudmessage( 0, 255, 0, -1.0, 0.40, 2, 5.0, 8.0, 0.0, 0.0, 10)
show_hudmessage(0, "%s vs %s^n Shot4Shot [Deagle] Duel", challenger, challenged)
ColorChat(0, NORMAL, "%s^x04 %s^x01 has started a^x04 Shot4Shot^x01 vs^x04 %s.", TAG, challenger, challenged)
}
else if(s4s_awp[id])
{
strip_user_weapons(id)
strip_user_weapons(tempid)
give_item(id, "weapon_awp")
give_item(tempid, "weapon_awp")
cs_set_weapon_ammo(give_item(id, "weapon_awp"), 1)
cs_set_weapon_ammo(give_item(tempid, "weapon_awp"), 1)
EnableHamForward( ForwardSecAttackAwp );
set_task(1.5, "beacon", id,_,_, "b")
set_task(1.5, "beacon", tempid,_,_, "b")
set_hudmessage( 0, 255, 0, -1.0, 0.40, 2, 5.0, 8.0, 0.0, 0.0, 10)
show_hudmessage(0, "%s vs %s^n Shot4Shot [Awp] Duel", challenger, challenged)
ColorChat(0, NORMAL, "%s^x04 %s^x01 has started a^x04 Shot4Shot [Awp]^x01 vs^x04 %s.", TAG, challenger, challenged)
}
else if(s4s_scout[id])
{
strip_user_weapons(id)
strip_user_weapons(tempid)
give_item(id, "weapon_scout")
give_item(tempid, "weapon_scout")
cs_set_weapon_ammo(give_item(id, "weapon_scout"), 1)
cs_set_weapon_ammo(give_item(tempid, "weapon_scout"), 1)
EnableHamForward( ForwardSecAttackScout );
set_task(1.5, "beacon", id,_,_, "b")
set_task(1.5, "beacon", tempid,_,_, "b")
set_hudmessage( 0, 255, 0, -1.0, 0.40, 2, 5.0, 8.0, 0.0, 0.0, 10)
show_hudmessage(0, "%s vs %s^n Shot4Shot [Scout] Duel", challenger, challenged)
ColorChat(0, NORMAL, "%s^x04 %s^x01 has started a^x04 Shot4Shot [Scout]^x01 vs^x04 %s.", TAG, challenger, challenged)
}
else if(s4s_glock[id])
{
strip_user_weapons(id)
strip_user_weapons(tempid)
give_item(id, "weapon_glock18")
give_item(tempid, "weapon_glock18")
cs_set_weapon_ammo(give_item(id, "weapon_glock18"), 1)
cs_set_weapon_ammo(give_item(tempid, "weapon_glock18"), 1)
set_task(1.5, "beacon", id,_,_, "b")
set_task(1.5, "beacon", tempid,_,_, "b")
set_hudmessage( 0, 255, 0, -1.0, 0.40, 2, 5.0, 8.0, 0.0, 0.0, 10)
show_hudmessage(0, "%s vs %s^n Shot4Shot [Glock] Duel", challenger, challenged)
ColorChat(0, NORMAL, "%s^x04 %s^x01 has started a^x04 Shot4Shot [Glock]^x01 vs^x04 %s.", TAG, challenger, challenged)
}
else if(s4s_usp[id])
{
strip_user_weapons(id)
strip_user_weapons(tempid)
give_item(id, "weapon_usp")
give_item(tempid, "weapon_usp")
cs_set_weapon_ammo(give_item(id, "weapon_usp"), 1)
cs_set_weapon_ammo(give_item(tempid, "weapon_usp"), 1)
set_task(1.5, "beacon", id,_,_, "b")
set_task(1.5, "beacon", tempid,_,_, "b")
set_hudmessage( 0, 255, 0, -1.0, 0.40, 2, 5.0, 8.0, 0.0, 0.0, 10)
show_hudmessage(0, "%s vs %s^n Shot4Shot [Usp] Duel", challenger, challenged)
ColorChat(0, NORMAL, "%s^x04 %s^x01 has started a^x04 Shot4Shot [Usp]^x01 vs^x04 %s.", TAG, challenger, challenged)
}
else if(hp_deagle[id])
{
strip_user_weapons(id)
strip_user_weapons(tempid)
give_item(id, "weapon_deagle")
give_item(tempid, "weapon_deagle")
cs_set_user_bpammo(id, CSW_DEAGLE, 999999)
cs_set_user_bpammo(tempid, CSW_DEAGLE, 99999)
set_user_health(id, 1500)
set_user_health(tempid, 1500)
set_task(1.5, "beacon", id,_,_, "b")
set_task(1.5, "beacon", tempid,_,_, "b")
set_hudmessage( 0, 255, 0, -1.0, 0.40, 2, 5.0, 8.0, 0.0, 0.0, 10)
show_hudmessage(0,"%s vs %s^n Hp Duel [Deagle]", challenger, challenged)
ColorChat(0, NORMAL, "%s^x04 %s^x01 has started a^x04 Hp Duel [Deagle]^x01 vs^x04 %s.", TAG, challenger, challenged)
}
else if(hp_awp[id])
{
strip_user_weapons(id)
strip_user_weapons(tempid)
give_item(id, "weapon_awp")
give_item(tempid, "weapon_awp")
cs_set_user_bpammo(id, CSW_AWP, 999999)
cs_set_user_bpammo(tempid, CSW_AWP, 99999)
set_user_health(id, 1000)
set_user_health(tempid, 1000)
set_task(1.5, "beacon", id,_,_, "b")
set_task(1.5, "beacon", tempid,_,_, "b")
set_hudmessage( 0, 255, 0, -1.0, 0.40, 2, 5.0, 8.0, 0.0, 0.0, 10)
show_hudmessage(0,"%s vs %s^n Hp Duel [Awp]", challenger, challenged)
ColorChat(0, NORMAL, "%s^x04 %s^x01 has started a^x04 Hp Duel [Awp]^x01 vs^x04 %s.", TAG, challenger, challenged)
}
else if(hp_m4a1[id])
{
strip_user_weapons(id)
strip_user_weapons(tempid)
give_item(id, "weapon_m4a1")
give_item(tempid, "weapon_m4a1")
cs_set_user_bpammo(id, CSW_M4A1, 99999)
cs_set_user_bpammo(tempid, CSW_M4A1, 99999)
set_user_health(id, 3000)
set_user_health(tempid, 3000)
set_task(1.5, "beacon", id,_,_, "b")
set_task(1.5, "beacon", tempid,_,_, "b")
set_hudmessage( 0, 255, 0, -1.0, 0.40, 2, 5.0, 8.0, 0.0, 0.0, 10)
show_hudmessage(0,"%s vs %s^n Hp Duel [M4a1]", challenger, challenged)
ColorChat(0, NORMAL, "%s^x04 %s^x01 has started a^x04 Hp Duel [M4a1]^x01 vs^x04 %s.", TAG, challenger, challenged)
}
else if(hp_mp5[id])
{
strip_user_weapons(id)
strip_user_weapons(tempid)
give_item(id, "weapon_mp5navy")
give_item(tempid, "weapon_mp5navy")
cs_set_user_bpammo(id, CSW_MP5NAVY, 99999)
cs_set_user_bpammo(tempid, CSW_MP5NAVY, 99999)
set_user_health(id, 2500)
set_user_health(tempid, 2500)
set_task(1.5, "beacon", id,_,_, "b")
set_task(1.5, "beacon", tempid,_,_, "b")
set_hudmessage( 0, 255, 0, -1.0, 0.40, 2, 5.0, 8.0, 0.0, 0.0, 10)
show_hudmessage(0,"%s vs %s^n Hp Duel [Mp5]", challenger, challenged)
ColorChat(0, NORMAL, "%s^x04 %s^x01 has started a^x04 Hp Duel [Mp5]^x01 vs^x04 %s.", TAG, challenger, challenged)
}
else if(hp_shotgun[id])
{
strip_user_weapons(id)
strip_user_weapons(tempid)
give_item(id, "weapon_m3")
give_item(tempid, "weapon_m3")
cs_set_user_bpammo(id, CSW_M3, 99999)
cs_set_user_bpammo(tempid, CSW_M3, 99999)
set_user_health(id, 4000)
set_user_health(tempid, 4000)
set_task(1.5, "beacon", id,_,_, "b")
set_task(1.5, "beacon", tempid,_,_, "b")
set_hudmessage( 0, 255, 0, -1.0, 0.40, 2, 5.0, 8.0, 0.0, 0.0, 10)
show_hudmessage(0,"%s vs %s^n Hp Duel [Shotgun]", challenger, challenged)
ColorChat(0, NORMAL, "%s^x04 %s^x01 has started a^x04 Hp Duel [Shotgun]^x01 vs^x04 %s.", TAG, challenger, challenged)
}
else if(hp_scout[id])
{
strip_user_weapons(id)
strip_user_weapons(tempid)
give_item(id, "weapon_scout")
give_item(tempid, "weapon_scout")
cs_set_user_bpammo(id, CSW_SCOUT, 99999)
cs_set_user_bpammo(tempid, CSW_SCOUT, 99999)
set_user_health(id, 350)
set_user_health(tempid, 350)
set_task(1.5, "beacon", id,_,_, "b")
set_task(1.5, "beacon", tempid,_,_, "b")
set_hudmessage( 0, 255, 0, -1.0, 0.40, 2, 5.0, 8.0, 0.0, 0.0, 10)
show_hudmessage(0,"%s vs %s^n Hp Duel [Scout]", challenger, challenged)
ColorChat(0, NORMAL, "%s^x04 %s^x01 has started a^x04 Hp Duel [Scout]^x01 vs^x04 %s.", TAG, challenger, challenged)
}
else if(hp_ak47[id])
{
strip_user_weapons(id)
strip_user_weapons(tempid)
give_item(id, "weapon_ak47")
give_item(tempid, "weapon_ak47")
cs_set_user_bpammo(id, CSW_AK47, 99999)
cs_set_user_bpammo(tempid, CSW_AK47, 99999)
set_user_health(id, 2700)
set_user_health(tempid, 2700)
set_task(1.5, "beacon", id,_,_, "b")
set_task(1.5, "beacon", tempid,_,_, "b")
set_hudmessage( 0, 255, 0, -1.0, 0.40, 2, 5.0, 8.0, 0.0, 0.0, 10)
show_hudmessage(0,"%s vs %s^n Hp Duel [Ak47]", challenger, challenged)
ColorChat(0, NORMAL, "%s^x04 %s^x01 has started a^x04 Hp Duel [Ak47]^x01 vs^x04 %s.", TAG, challenger, challenged)
}
else if(hp_mech[id])
{
strip_user_weapons(id)
strip_user_weapons(tempid)
give_item(id, "weapon_m249")
give_item(tempid, "weapon_m249")
cs_set_user_bpammo( id, CSW_M249, 500 )
cs_set_user_bpammo( tempid, CSW_M249, 500 )
set_user_health(id, 4000) // 4000 hp to t
set_user_health(tempid, 4000) // 4000 hp to ct
set_task(1.5, "beacon", id,_,_, "b")
set_task(1.5, "beacon", tempid,_,_, "b")
set_hudmessage(0, 255, 0, -1.0, 0.40, 2, 5.0, 8.0, 0.0, 0.0, 10)
show_hudmessage(0,"%s vs %s^n Hp Duel [Mechingun]", challenger, challenged)
ColorChat(0, NORMAL, "%s^x04 %s^x01 has started a^x04 Hp Duel [Machingun]^x01 vs^x04 %s.", TAG, challenger, challenged)
}
else if(zawp[id])
{
strip_user_weapons(id)
strip_user_weapons(tempid)
give_item(id, "weapon_awp")
give_item(tempid, "weapon_awp")
cs_set_user_bpammo( id, CSW_AWP, 70 )
cs_set_user_bpammo( tempid, CSW_AWP, 70 )
EnableHamForward( ForwardSecAttackAwp )
set_task(1.5, "beacon", id,_,_, "b")
set_task(1.5, "beacon", tempid,_,_, "b")
set_hudmessage(0, 255, 0, -1.0, 0.40, 2, 5.0, 8.0, 0.0, 0.0, 10)
show_hudmessage(0,"%s vs %s^n Awp [NoZoom]", challenger, challenged)
ColorChat(0, NORMAL, "%s^x04 %s^x01 has started a^x04 Awp [NoZoom]^x01 vs^x04 %s.", TAG, challenger, challenged)
}
else if(zscout[id])
{
strip_user_weapons(id)
strip_user_weapons(tempid)
give_item(id, "weapon_scout")
give_item(tempid, "weapon_scout")
cs_set_user_bpammo( id, CSW_SCOUT, 70 )
cs_set_user_bpammo( tempid, CSW_SCOUT, 70 )
EnableHamForward( ForwardSecAttackScout )
set_task(1.5, "beacon", id,_,_, "b")
set_task(1.5, "beacon", tempid,_,_, "b")
set_hudmessage(0, 255, 0, -1.0, 0.40, 2, 5.0, 8.0, 0.0, 0.0, 10)
show_hudmessage(0,"%s vs %s^n Scout [NoZoom]", challenger, challenged)
ColorChat(0, NORMAL, "%s^x04 %s^x01 has started a^x04 Scout [NoZoom]^x01 vs^x04 %s.", TAG, challenger, challenged)
}
duel_active = true
menu_destroy(menu)
return PLUGIN_HANDLED
}
public OnSecondaryAttack( const entity )
return HAM_SUPERCEDE;
public slaps(id)
user_slap(id, 0)
public beacon(id)
{
if(cs_get_user_team(id) == CS_TEAM_CT)
{
static origin[3]
get_user_origin(id, origin)
message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
write_byte(TE_BEAMCYLINDER) // TE id
write_coord(origin[0]) // x
write_coord(origin[1]) // y
write_coord(origin[2]-20) // z
write_coord(origin[0]) // x axis
write_coord(origin[1]) // y axis
write_coord(origin[2]+200) // z axis
write_short(beacon_sprite) // sprite
write_byte(0) // startframe
write_byte(1) // framerate
write_byte(6) // life
write_byte(50) // width
write_byte(1) // noise
write_byte(0) // red
write_byte(0) // green
write_byte(250) // blue
write_byte(200) // brightness
write_byte(0) // speed
message_end()
//emit_sound(id, CHAN_ITEM, g_sound_beacon, 1.0, ATTN_NORM, 0, PITCH_NORM)
}
else
{
static origin[3]
get_user_origin(id, origin)
message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
write_byte(TE_BEAMCYLINDER) // TE id
write_coord(origin[0]) // x
write_coord(origin[1]) // y
write_coord(origin[2]-20) // z
write_coord(origin[0]) // x axis
write_coord(origin[1]) // y axis
write_coord(origin[2]+200) // z axis
write_short(beacon_sprite) // sprite
write_byte(0) // startframe
write_byte(1) // framerate
write_byte(6) // life
write_byte(50) // width
write_byte(1) // noise
write_byte(250) // red
write_byte(0) // green
write_byte(0) // blue
write_byte(200) // brightness
write_byte(0) // speed
message_end()
//emit_sound(id, CHAN_ITEM, g_sound_beacon, 1.0, ATTN_NORM, 0, PITCH_NORM)
if(rambo[id]) {
emit_sound(id, CHAN_ITEM, g_sound_beacon, 1.0, ATTN_NORM, 0, PITCH_NORM)
}
}
}
public glow(id)
{
new name[32]
get_user_name(id, name,31)
set_user_rendering(id, kRenderFxGlowShell, 0, 0, 255, kRenderNormal, 255)
ColorChat(0, NORMAL, "%s^x04 %s^x01 freeday this round.", TAG, name)
}
public client_command(id)
read_argv(0, g_command[id], sizeof g_drop);
public fw_setmodel(ent, const model[])
{
if(get_pcvar_num(toggle) != 1)
return FMRES_IGNORED;
if(!pev_valid(ent) || !equal(model, g_wbox_model_prefix, sizeof g_wbox_model_prefix - 1) || equal(model, g_wbox_model))
return FMRES_IGNORED;
new id = pev(ent, pev_owner)
if(!(g_start_client_index <= id <= g_max_clients))
return FMRES_IGNORED;
static class[32],i;
pev(ent,pev_classname,class, sizeof class - 1)
if(!equal(class,g_wbox_class))
return FMRES_IGNORED;
for(i = g_max_clients + 1;i < g_max_entities;++i)
{
if(!pev_valid(i) || ent != pev(i, pev_owner))
continue;
new wid = get_pdata_int(i,OFFSET_ENT_TO_INDEX);
if(wid != CSW_C4)
{
new droptype:drop_type;
if(!is_user_alive(id))
drop_type = droptype_ondeath;
else if(equal(g_command[id], g_drop))
drop_type = droptype_manual;
else
return FMRES_IGNORED;
switch(drop_type)
{
case droptype_ondeath: {
if(get_user_team(id) == 1){r=255;g=0;b=0;}
else if(get_user_team(id) == 2){r=0;g=0;b=255;}
}
case droptype_manual: {
r = random(255);
g = random(255);
b = random(255);
switch(cs_get_user_team(id))
{
case CS_TEAM_T:
{
r = 255;
g = 0;
b = 0;
}
case CS_TEAM_CT:
{
r = 0;
g = 0;
b = 255;
}
}
}
}
if(get_pcvar_num(vel) == 1)
{
new Float:vel[3];
vel[0] = float(random(300));
vel[1] = float(random(300));
vel[2] = float(random(300));
set_pev(ent,pev_velocity,vel);
}
message_begin(MSG_BROADCAST, SVC_TEMPENTITY);
write_byte(TE_BEAMFOLLOW);
write_short(ent);
write_short(g_trail);
write_byte(5);
write_byte(5);
write_byte(r);
write_byte(g);
write_byte(b);
write_byte(195);
message_end();
}
}
return FMRES_IGNORED;
}
public fw_touch(touched, toucher)
{
if(get_pcvar_num(toggle) != 1)
return FMRES_IGNORED;
if(get_pcvar_num(light) != 1)
return FMRES_IGNORED;
static class[32];
pev(toucher, pev_classname, class, sizeof class - 1);
if(containi(class, "weapon") != -1 && !touched)
{
new Float:origin[3];
pev(toucher, pev_origin, origin);
message_begin(MSG_BROADCAST, SVC_TEMPENTITY);
write_byte(TE_DLIGHT);
write_coord(floatround(origin[0]));
write_coord(floatround(origin[1]));
write_coord(floatround(origin[2]));
write_byte(20);
write_byte(r);
write_byte(g);
write_byte(b);
write_byte(5);
write_byte(20);
message_end();
}
return FMRES_IGNORED;
}
public plugin_cfg()
{
g_MaxClients=global_get(glb_maxClients)
}
public cmd_wpglow_mode(id,level,cid)
{
if(!cmd_access(id,level,cid,2))
return PLUGIN_HANDLED
new arg[2]
read_argv(1,arg,1)
mode=str_to_num(arg)
return PLUGIN_CONTINUE
}
public cmd_wpglow_color(id,level,cid)
{
if(!cmd_access(id,level,cid,4))
return PLUGIN_HANDLED
new arg[4],arg2[4],arg3[4]
read_argv(1,arg,3)
read_argv(2,arg2,3)
read_argv(3,arg3,3)
red=clamp(str_to_num(arg),1,255);
green=clamp(str_to_num(arg2),1,255);
blue=clamp(str_to_num(arg3),1,255);
return PLUGIN_CONTINUE
}
public fw_model(ent)
{
if(!pev_valid(ent))
return FMRES_IGNORED
static id
id=pev(ent,pev_owner)
if(!(1<=id<=g_MaxClients))
return FMRES_IGNORED
switch(mode)
{
case 0:return FMRES_IGNORED
case 1:
{
switch(get_user_team(id))
{
case 1:fm_set_rendering(ent,kRenderFxGlowShell,255,0,0,kRenderNormal,16)
case 2:fm_set_rendering(ent,kRenderFxGlowShell,0,0,255,kRenderNormal,16)
}
}
case 2:fm_set_rendering(ent,kRenderFxGlowShell,random_num(1,255),random_num(1,255),random_num(1,255),kRenderNormal,16)
case 3:
{
fm_set_rendering(ent,kRenderFxGlowShell,red,green,blue,kRenderNormal,16)
}
}
return FMRES_IGNORED
}
fm_set_rendering(ent,fx=kRenderFxNone,r=0,g=0,b=0,mode=kRenderNormal,amount=16)
{
static Float:RenderColor[3]
RenderColor[0]=float(r)
RenderColor[1]=float(g)
RenderColor[2]=float(b)
set_pev(ent,pev_renderfx,fx)
set_pev(ent,pev_rendercolor,RenderColor)
set_pev(ent,pev_rendermode,mode)
set_pev(ent,pev_renderamt,float(amount))
}
public raga(id)
{
if(duel_active)
{
rar--
if(rar <= 0)
{
give_item(id, "weapon_m4a1")
cs_set_user_bpammo(id, CSW_M4A1, 90)
set_hudmessage(255, 0, 0, -1.0, 0.74, 0, 6.0, 12.0)
show_hudmessage(0, "TE won the Duel and got M4A1, TE can go and kill the CT !")
} else {
set_hudmessage(0, 255, 0, -1.0, -1.0, 0, 0.5, 0.5)
show_hudmessage(0, "%d", rar)
set_task(1.0, "raga",id)
}
}
}
public TeamCount(&ct, &t)
{
for(new id=1; id <= g_maxPlayers; id++) {
if(!is_user_connected(id) || !is_user_alive(id))
continue
if(cs_get_user_team(id) == CS_TEAM_T)
t++
else if(cs_get_user_team(id) == CS_TEAM_CT)
ct++
}
}