PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fakemeta>
#include <hamsandwich>
#include <fun>
#include <colorchat>
#include <dhudmessage>
#define IsPlayer(%1) (1<=%1<=g_max_clients)
#define OFFSET_PRIMARYWEAPON 116
#define MAX_PLAYERS 32
#define UPDATE_INTERVAL 2.0
#define TID_TIMER 9124
new const PREFIX[] = { "[ WaRzOnE ]" };
new const VERSION[] = { "1.0" };
new const g_sound_rambo[] = "misc/rambomode.wav";
new g_max_clients;
new bool:g_got_beacon[MAX_PLAYERS+1]
new Float:g_t_time
new g_timer_entid
new g_sprite
new bool: lr_started
new bool: spray_on
new bool:LR_KD
new bool:LR_S4D
new bool:LR_GD
new bool:LR_R
new bool:LR_SC
new bool:LR_GT
new bool:LR_SCOUT
new bool:LR_M4A1
new bool:LR_AWP
new bool:LR_TAKEAWAY
new bool:LR_DEAGLEHP
new bool:LR_AKHP
new g_sprite_path[] = { "sprites/white.spr" };
new plid, opid;
stock strip_weapons(index)
{
strip_user_weapons(index)
set_pdata_int(index, OFFSET_PRIMARYWEAPON, 0)
give_item(index, "weapon_knife")
}
public plugin_init()
{
register_plugin("Last Request", VERSION, "drekes & LAV1z")
RegisterHam(Ham_Spawn, "player", "Event_PlayerSpawn", 1)
RegisterHam( Ham_Killed, "player", "HamKilled");
register_clcmd("say /lr", "lr_check")
register_clcmd("say_team /lr", "lr_check")
register_event("DeathMsg", "Event_DeathMsg", "a")
g_max_clients = get_maxplayers();
create_timer();
}
public plugin_precache()
{
g_sprite = precache_model(g_sprite_path);
precache_sound("misc/rambomode.wav")
}
public HamKilled(id)
{
remove_task(id);
lr_started = false;
spray_on = false;
g_got_beacon[id] = false;
}
public Event_PlayerSpawn(id)
{
remove_task(id);
lr_started = false;
g_got_beacon[id] = false;
spray_on = false;
LR_KD = false;
LR_S4D = false;
LR_GD = false;
LR_R = false;
LR_SC = false;
LR_GT = false;
LR_SCOUT = false;
LR_M4A1 = false;
LR_AWP = false;
LR_TAKEAWAY = false;
LR_DEAGLEHP = false;
LR_AKHP = false;
return PLUGIN_HANDLED
}
public client_connect(id)
{
remove_task(id);
g_got_beacon[id] = false;
lr_started = false;
spray_on = false;
LR_KD = false;
LR_S4D = false;
LR_GD = false;
LR_R = false;
LR_SC = false;
LR_GT = false;
LR_SCOUT = false;
LR_M4A1 = false;
LR_AWP = false;
LR_TAKEAWAY = false;
LR_DEAGLEHP = false;
LR_AKHP = false;
}
public remove_otherlr(id)
{
lr_started = false;
spray_on = false;
}
public client_disconnect(id)
{
remove_task(id);
g_got_beacon[id] = false;
lr_started = false;
spray_on = false;
LR_KD = false;
LR_S4D = false;
LR_GD = false;
LR_R = false;
LR_SC = false;
LR_GT = false;
LR_SCOUT = false;
LR_M4A1 = false;
LR_AWP = false;
LR_TAKEAWAY = false;
LR_DEAGLEHP = false;
LR_AKHP = false;
}
// Death Event
public Event_DeathMsg(id)
{
remove_task(id);
new iVictim = read_data(2);
new iKiller = read_data(1);
if (iKiller == iVictim && is_user_alive(plid)) {
iKiller = plid;
iVictim = opid;
}
else if (iKiller == iVictim && is_user_alive(opid)) {
iKiller = opid;
iVictim = plid;
}
if(IsPlayer(iKiller) && is_user_alive(iKiller))
{
if(LR_KD)
{
new szVName[32], szKName[32];
get_user_name(iVictim, szVName, charsmax(szVName));
get_user_name(iKiller, szKName, charsmax(szKName));
ColorChat(0, RED, "%s ^x04%s^x01 has won the Box Duel against ^x04%s", PREFIX, szKName, szVName);
set_dhudmessage(0, 255, 255, -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15, 3)
show_dhudmessage(0, "%s has won the Box Duel against %s", szKName, szVName);
remove_otherlr(id);
LR_KD = false;
LR_S4D = false;
LR_GD = false;
LR_R = false;
LR_SC = false;
LR_GT = false;
LR_SCOUT = false;
LR_M4A1 = false;
LR_AWP = false;
LR_TAKEAWAY = false;
LR_DEAGLEHP = false;
LR_AKHP = false;
g_got_beacon[iKiller] = false;
g_got_beacon[iVictim] = false;
}
else if(LR_S4D)
{
new szVName[32], szKName[32];
get_user_name(iVictim, szVName, charsmax(szVName));
get_user_name(iKiller, szKName, charsmax(szKName));
ColorChat(0, RED, "%s ^x04%s^x01 has won the Shot For Shot^x01 against ^x04%s", PREFIX, szKName, szVName);
set_dhudmessage(0, 255, 255, -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15, 3)
show_dhudmessage(0, "%s has won the Shot 4 Shot against %s", szKName, szVName);
remove_otherlr(id);
LR_KD = false;
LR_S4D = false;
LR_GD = false;
LR_R = false;
LR_SC = false;
LR_GT = false;
LR_SCOUT = false;
LR_M4A1 = false;
LR_AWP = false;
LR_TAKEAWAY = false;
LR_DEAGLEHP = false;
LR_AKHP = false;
g_got_beacon[iKiller] = false;
g_got_beacon[iVictim] = false;
}
else if(LR_GD)
{
new szVName[32], szKName[32];
get_user_name(iVictim, szVName, charsmax(szVName));
get_user_name(iKiller, szKName, charsmax(szKName));
ColorChat(0, RED, "%s ^x04%s^x01 has won the Grenade Duel against ^x04%s", PREFIX, szKName, szVName);
set_dhudmessage(0, 255, 255, -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15, 3)
show_dhudmessage(0, "%s has won the Grenade Duel against %s", szKName, szVName);
remove_otherlr(id);
LR_KD = false;
LR_S4D = false;
LR_GD = false;
LR_R = false;
LR_SC = false;
LR_GT = false;
LR_SCOUT = false;
LR_M4A1 = false;
LR_AWP = false;
LR_TAKEAWAY = false;
LR_DEAGLEHP = false;
LR_AKHP = false;
g_got_beacon[iKiller] = false;
g_got_beacon[iVictim] = false;
}
else if(LR_R)
{
new szVName[32], szKName[32];
get_user_name(iVictim, szVName, charsmax(szVName));
get_user_name(iKiller, szKName, charsmax(szKName));
ColorChat(0, RED, "%s ^x04%s^x01 has won the Box [HP] against ^x04%s", PREFIX, 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 Box [HP] against %s", szKName, szVName);
remove_otherlr(id);
LR_KD = false;
LR_S4D = false;
LR_GD = false;
LR_R = false;
LR_SC = false;
LR_GT = false;
LR_SCOUT = false;
LR_M4A1 = false;
LR_AWP = false;
LR_TAKEAWAY = false;
LR_DEAGLEHP = false;
LR_AKHP = false;
g_got_beacon[iKiller] = false;
g_got_beacon[iVictim] = false;
}
else if(LR_SC)
{
new szVName[32], szKName[32];
get_user_name(iVictim, szVName, charsmax(szVName));
get_user_name(iKiller, szKName, charsmax(szKName));
ColorChat(0, RED, "%s ^x04%s^x01 has won the Spray Contest against ^x04%s", PREFIX, 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 Spray Contest against %s", szKName, szVName);
remove_otherlr(id);
LR_KD = false;
LR_S4D = false;
LR_GD = false;
LR_R = false;
LR_SC = false;
LR_GT = false;
LR_SCOUT = false;
LR_M4A1 = false;
LR_AWP = false;
LR_DEAGLEHP = false;
LR_TAKEAWAY = false;
LR_AKHP = false;
g_got_beacon[iKiller] = false;
g_got_beacon[iVictim] = false;
}
else if(LR_GT)
{
new szVName[32], szKName[32];
get_user_name(iVictim, szVName, charsmax(szVName));
get_user_name(iKiller, szKName, charsmax(szKName));
ColorChat(0, RED, "%s ^x04%s^x01 has won the Gun Toss against ^x04%s", PREFIX, 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 Gun Toss against %s", szKName, szVName);
remove_otherlr(id);
LR_KD = false;
LR_S4D = false;
LR_GD = false;
LR_R = false;
LR_SC = false;
LR_GT = false;
LR_SCOUT = false;
LR_M4A1 = false;
LR_AWP = false;
LR_TAKEAWAY = false;
LR_DEAGLEHP = false;
LR_AKHP = false;
g_got_beacon[iKiller] = false;
g_got_beacon[iVictim] = false;
}
else if(LR_SCOUT)
{
new szVName[32], szKName[32];
get_user_name(iVictim, szVName, charsmax(szVName));
get_user_name(iKiller, szKName, charsmax(szKName));
ColorChat(0, RED, "%s ^x04%s^x01 has won the Scout Duel against ^x04%s", PREFIX, 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 Scout Duel against %s", szKName, szVName);
remove_otherlr(id);
LR_KD = false;
LR_S4D = false;
LR_GD = false;
LR_R = false;
LR_SC = false;
LR_GT = false;
LR_SCOUT = false;
LR_M4A1 = false;
LR_AWP = false;
LR_TAKEAWAY = false;
LR_DEAGLEHP = false;
LR_AKHP = false;
g_got_beacon[iKiller] = false;
g_got_beacon[iVictim] = false;
}
else if(LR_M4A1)
{
new szVName[32], szKName[32];
get_user_name(iVictim, szVName, charsmax(szVName));
get_user_name(iKiller, szKName, charsmax(szKName));
ColorChat(0, RED, "%s ^x04%s^x01 has won the M4A1 Duel against ^x04%s", PREFIX, 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 M4A1 Duel against %s", szKName, szVName);
remove_otherlr(id);
LR_KD = false;
LR_S4D = false;
LR_GD = false;
LR_R = false;
LR_SC = false;
LR_GT = false;
LR_SCOUT = false;
LR_M4A1 = false;
LR_AWP = false;
LR_TAKEAWAY = false;
LR_DEAGLEHP = false;
LR_AKHP = false;
g_got_beacon[iKiller] = false;
g_got_beacon[iVictim] = false;
}
else if(LR_AWP)
{
new szVName[32], szKName[32];
get_user_name(iVictim, szVName, charsmax(szVName));
get_user_name(iKiller, szKName, charsmax(szKName));
ColorChat(0, RED, "%s ^x04%s^x01 has won the AWP Duel against ^x04%s", PREFIX, 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 AWP Duel against %s", szKName, szVName);
remove_otherlr(id);
LR_KD = false;
LR_S4D = false;
LR_GD = false;
LR_R = false;
LR_SC = false;
LR_GT = false;
LR_SCOUT = false;
LR_M4A1 = false;
LR_AWP = false;
LR_TAKEAWAY = false;
LR_DEAGLEHP = false;
LR_AKHP = false;
g_got_beacon[iKiller] = false;
g_got_beacon[iVictim] = false;
}
else if(LR_TAKEAWAY)
{
new szVName[32], szKName[32];
get_user_name(iVictim, szVName, charsmax(szVName));
get_user_name(iKiller, szKName, charsmax(szKName));
ColorChat(0, RED, "%s ^x04%s^x01 has won the Shot the bomb Duel against ^x04%s", PREFIX, 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 Shot the bomb Duel against %s", szKName, szVName);
remove_otherlr(id);
LR_KD = false;
LR_S4D = false;
LR_GD = false;
LR_R = false;
LR_SC = false;
LR_GT = false;
LR_SCOUT = false;
LR_M4A1 = false;
LR_AWP = false;
LR_TAKEAWAY = false;
LR_DEAGLEHP = false;
LR_AKHP = false;
g_got_beacon[iKiller] = false;
g_got_beacon[iVictim] = false;
}
else if(LR_DEAGLEHP)
{
new szVName[32], szKName[32];
get_user_name(iVictim, szVName, charsmax(szVName));
get_user_name(iKiller, szKName, charsmax(szKName));
ColorChat(0, RED, "%s ^x04%s^x01 has won the Deagle [HP] Duel against ^x04%s", PREFIX, 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 Deagle [HP] Duel against %s", szKName, szVName);
remove_otherlr(id);
LR_KD = false;
LR_S4D = false;
LR_GD = false;
LR_R = false;
LR_SC = false;
LR_GT = false;
LR_SCOUT = false;
LR_M4A1 = false;
LR_AWP = false;
LR_TAKEAWAY = false;
LR_DEAGLEHP = false;
LR_AKHP = false;
g_got_beacon[iKiller] = false;
g_got_beacon[iVictim] = false;
}
else if(LR_AWP)
{
new szVName[32], szKName[32];
get_user_name(iVictim, szVName, charsmax(szVName));
get_user_name(iKiller, szKName, charsmax(szKName));
ColorChat(0, RED, "%s ^x04%s^x01 ganhou um Duelo de AWP contra ^x04%s", PREFIX, 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 ganhou um Duelo de AWP contra %s", szKName, szVName);
remove_otherlr(id);
LR_KD = false;
LR_S4D = false;
LR_GD = false;
LR_R = false;
LR_SC = false;
LR_GT = false;
LR_SCOUT = false;
LR_M4A1 = false;
LR_AWP = false;
LR_TAKEAWAY = false;
LR_DEAGLEHP = false;
LR_AKHP = false;
g_got_beacon[iKiller] = false;
g_got_beacon[iVictim] = false;
}
else if(LR_AKHP)
{
new szVName[32], szKName[32];
get_user_name(iVictim, szVName, charsmax(szVName));
get_user_name(iKiller, szKName, charsmax(szKName));
ColorChat(0, RED, "%s ^x04%s^x01 has won the Ak47 [HP] Duel against ^x04%s", PREFIX, 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 Ak47 [HP] Duel against %s", szKName, szVName);
remove_otherlr(id);
LR_KD = false;
LR_S4D = false;
LR_GD = false;
LR_R = false;
LR_SC = false;
LR_GT = false;
LR_SCOUT = false;
LR_M4A1 = false;
LR_AWP = false;
LR_TAKEAWAY = false;
LR_DEAGLEHP = false;
LR_AKHP = false;
g_got_beacon[iKiller] = false;
g_got_beacon[iVictim] = false;
}
}
if(lr_started)
{
lr_started = false
if(spray_on)
{
server_cmd("decalfrequency 20")
spray_on = false
}
}
return PLUGIN_HANDLED
}
public lr_check(id)
{
if (cs_get_user_team(id) != CS_TEAM_T)
{
return PLUGIN_HANDLED
}
if(!is_user_alive(id))
{
ColorChat(id, RED, "%s ^x01You must be alive to have a ^x04Last Request^x01", PREFIX);
return PLUGIN_HANDLED
}
if(lr_started)
{
ColorChat(id, RED, "%s ^x01There is already a ^x04Last Request^x01 in progress.", PREFIX);
return PLUGIN_HANDLED
}
new ctCount, trCount
new players[32]
new pnum
get_players(players, pnum, "a");
for (new i = 0; i < g_max_clients; i++)
{
if (!is_user_alive(i))
{
continue;
}
switch (cs_get_user_team(i))
{
case CS_TEAM_CT:
{
ctCount++;
}
case CS_TEAM_T:
{
trCount++;
}
}
}
if (trCount > 1)
{
ColorChat(id, RED, "%s ^x01There are to many prisoners left.", PREFIX)
return PLUGIN_HANDLED;
}
if (ctCount == 0)
{
ColorChat(id, RED, "%s ^x01There are no Guard alive", PREFIX)
return PLUGIN_HANDLED;
}
lr_menu(id)
return PLUGIN_HANDLED
}
public lr_menu(id)
{
new lrmenu = menu_create("\r[ WaRzOnE ] \yLast Request", "sub_lr_menu")
menu_additem(lrmenu, "\wDuelo de Faca", "1", 0);
menu_additem(lrmenu, "\wTiro a Tiro \r[ DEAGLE ] ", "2", 0);
menu_additem(lrmenu, "\wDuelo de Granadas", "3", 0);
menu_additem(lrmenu, "\wRambo", "4", 0);
menu_additem(lrmenu, "\wDuelo de Faca \r[HP]", "5", 0);
menu_additem(lrmenu, "\wDuelo de Spray", "6", 0);
menu_additem(lrmenu, "\wLancamento de Deagle", "7", 0);
menu_additem(lrmenu, "\wDuelo de Scout", "8", 0);
menu_additem(lrmenu, "\wDuelo M4A1", "9", 0);
menu_additem(lrmenu, "\wDuelo de AWP", "10", 0);
menu_additem(lrmenu, "\wTiro de Bomba", "11", 0);
menu_additem(lrmenu, "\wDuelo de Deagle\r[HP]", "12", 0);
menu_additem(lrmenu, "\wDuelo de AK47 \r[HP]", "13", 0);
menu_setprop( lrmenu, MPROP_EXIT, MEXIT_ALL );
menu_display( id, lrmenu, 0 );
return PLUGIN_HANDLED;
}
public sub_lr_menu(id, lrmenu, item)
{
if (item == MENU_EXIT)
{
lr_menu(id)
menu_destroy(lrmenu);
return PLUGIN_HANDLED;
}
new Data[7], Name[64];
new Access, Callback;
menu_item_getinfo(lrmenu, item, Access, Data,5, Name, 63, Callback);
new Key = str_to_num(Data);
plid = id;
switch (Key)
{
case 1:
menu(id)
case 2:
menu2(id)
case 3:
menu3(id)
case 4:
menu4(id)
case 5:
menu5(id)
case 6:
menu6(id)
case 7:
menu7(id)
case 8:
menu8(id)
case 9:
menu9(id)
case 10:
menu10(id)
case 11:
menu11(id)
case 12:
menu12(id)
case 13:
menu13(id)
}
menu_destroy(lrmenu);
return PLUGIN_HANDLED;
}
public menu(id)
{
new menu = menu_create("\y[\rsG\y] \yEscolhe o Guarda:", "submenu");
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(menu, szName, szTempid, 0);
}
menu_display(id, menu);
return PLUGIN_HANDLED;
}
public submenu(id, menu, item)
{
if( item == MENU_EXIT )
{
menu_destroy(menu);
return PLUGIN_HANDLED;
}
new data[6], iName[64];
new access, callback;
menu_item_getinfo(menu, item, access, data,5, iName, 63, callback);
new tempid = str_to_num(data);
strip_user_weapons(tempid);
give_item(tempid, "weapon_knife");
strip_user_weapons(id)
give_item(id, "weapon_knife")
set_user_health(id, 100);
new szName[32], szName2[32];
get_user_name(id, szName, 31);
get_user_name(tempid, szName2, 31);
ColorChat(0, RED, "%s ^x04%s ^x01want to have a Box Duel with ^x04%s^n", PREFIX, szName, szName2);
set_hudmessage(0, 255, 255, -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15, 3)
show_hudmessage(0, "%s want to have a Box Duel with %s^n", szName, szName2)
LR_KD = true;
if( is_user_alive(tempid) )
set_user_health(tempid, 100);
g_got_beacon[id] = true;
g_got_beacon[tempid] = true;
menu_destroy(menu);
lr_started = true
opid = tempid;
return PLUGIN_HANDLED;
}
public menu2(id)
{
new menu = menu_create("\yEcolhe um Guarda:", "submenu2");
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(menu, szName, szTempid, 0);
}
menu_display(id, menu);
return PLUGIN_HANDLED;
}
public submenu2(id, menu, item)
{
if( item == MENU_EXIT )
{
menu_destroy(menu);
return PLUGIN_HANDLED;
}
new data[6], iName[64];
new access, callback;
menu_item_getinfo(menu, item, access, data,5, iName, 63, callback);
new tempid = str_to_num(data);
strip_user_weapons(tempid);
give_item(tempid, "weapon_knife");
give_item(tempid, "weapon_deagle")
cs_set_user_bpammo(tempid,CSW_DEAGLE,35);
strip_user_weapons(id)
give_item(id, "weapon_knife")
set_user_health(id, 100)
give_item(id, "weapon_deagle")
cs_set_user_bpammo(id,CSW_DEAGLE,35)
new szName[32], szName2[32]
get_user_name(id, szName, 31);
get_user_name(tempid, szName2, 31);
ColorChat(0, RED, "%s ^x04%s ^x01want to have a Shot For Shot with ^x04%s^n", PREFIX, szName, szName2)
set_hudmessage(0, 255, 255, -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15, 3)
show_hudmessage(0, "%s want to have a Shot For Shot with %s^n", szName, szName2)
if( is_user_alive(tempid) )
set_user_health(tempid, 100);
LR_S4D = true;
g_got_beacon[id] = true;
g_got_beacon[tempid] = true;
menu_destroy(menu);
lr_started = true
opid = tempid;
return PLUGIN_HANDLED;
}
public menu3(id)
{
new menu = menu_create("\y[\rsG\y] \yChoose a Guard:", "submenu3");
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(menu, szName, szTempid, 0);
}
menu_display(id, menu);
return PLUGIN_HANDLED;
}
public submenu3(id, menu, item)
{
if( item == MENU_EXIT )
{
menu_destroy(menu);
return PLUGIN_HANDLED;
}
new data[6], iName[64];
new access, callback;
menu_item_getinfo(menu, item, access, data,5, iName, 63, callback);
new tempid = str_to_num(data);
strip_user_weapons(tempid);
give_item(tempid, "weapon_knife");
give_item(tempid, "weapon_hegrenade");
cs_set_user_bpammo(tempid,CSW_HEGRENADE,100)
strip_user_weapons(id)
set_user_health(id, 100)
give_item(id, "weapon_knife")
give_item(id, "weapon_hegrenade")
cs_set_user_bpammo(id,CSW_HEGRENADE,100)
new szName[32], szName2[32]
get_user_name(id, szName, 31);
get_user_name(tempid, szName2, 31);
ColorChat(0, RED, "%s ^x04%s ^x01want to have a Grenade Duel with ^x4%s^n", PREFIX, szName, szName2)
set_hudmessage(0, 255, 255, -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15, 3)
show_hudmessage(0, "%s want to have a Grenade Duel with %s^n", szName, szName2)
if( is_user_alive(tempid) )
set_user_health(tempid, 100);
g_got_beacon[id] = true;
g_got_beacon[tempid] = true;
LR_GD = true;
menu_destroy(menu);
lr_started = true
opid = tempid;
return PLUGIN_HANDLED;
}
public menu4(id)
{
strip_user_weapons(id)
set_user_health(id, 600)
give_item(id, "weapon_knife")
give_item( id, "weapon_m249" );
cs_set_user_bpammo(id,CSW_M249,300)
new szName[32]
get_user_name(id, szName, 31);
emit_sound(id, CHAN_STATIC, g_sound_rambo, 1.0, ATTN_NORM, 0, PITCH_NORM);
ColorChat(0, RED, "%s ^x04%s^x01 choosed ^x04Rambo Mod", PREFIX, szName)
set_hudmessage(0, 255, 255, -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15, 3)
show_hudmessage(0, "Rambo Mod Activated")
lr_started = true
}
public menu5(id)
{
new menu = menu_create("\y[\rsG\y] \yChoose a Guard", "submenu5");
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(menu, szName, szTempid, 0);
}
menu_display(id, menu);
return PLUGIN_HANDLED;
}
public submenu5(id, menu, item)
{
if( item == MENU_EXIT )
{
menu_destroy(menu);
return PLUGIN_HANDLED;
}
new data[6], iName[64];
new access, callback;
menu_item_getinfo(menu, item, access, data,5, iName, 63, callback);
new tempid = str_to_num(data);
strip_user_weapons(tempid);
give_item(tempid, "weapon_knife");
strip_user_weapons(id)
give_item(id, "weapon_knife")
set_user_health(id, 800);
new szName[32], szName2[32];
get_user_name(id, szName, 31);
get_user_name(tempid, szName2, 31);
ColorChat(0, RED, "%s ^x04%s ^x01want to have a Box Duel [HP] with ^x04%s^n", PREFIX, szName, szName2);
set_hudmessage(0, 255, 255, -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15, 3)
show_hudmessage(0, "%s want to have a Box Duel [HP] with %s^n", szName, szName2)
if( is_user_alive(tempid) )
set_user_health(tempid, 800);
g_got_beacon[id] = true;
g_got_beacon[tempid] = true;
LR_R = true;
menu_destroy(menu);
lr_started = true
opid = tempid;
return PLUGIN_HANDLED;
}
public menu6(id)
{
new menu = menu_create("\y[\rsG\y] \yChoose a Guard:", "submenu6");
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(menu, szName, szTempid, 0);
}
menu_display(id, menu);
return PLUGIN_HANDLED;
}
public submenu6(id, menu, item)
{
if( item == MENU_EXIT )
{
menu_destroy(menu);
return PLUGIN_HANDLED;
}
new data[6], iName[64];
new access, callback;
menu_item_getinfo(menu, item, access, data,5, iName, 63, callback);
new tempid = str_to_num(data);
strip_user_weapons(tempid);
give_item(tempid, "weapon_knife")
strip_user_weapons(id)
give_item(id, "weapon_knife")
set_user_health(id, 100);
new szName[32], szName2[32];
get_user_name(id, szName, 31);
get_user_name(tempid, szName2, 31);
ColorChat(0, RED, "%s ^x04%s ^x01want to have a Spray Contest with with ^x04%s^n", PREFIX, szName, szName2);
set_hudmessage(0, 255, 255, -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15, 3)
show_hudmessage(0, "%s want to have a Spray Contest with %s^n", szName, szName2)
server_cmd("decalfrequency 20")
spray_on = true;
if( is_user_alive(tempid) )
set_user_health(tempid, 100);
g_got_beacon[id] = true;
g_got_beacon[tempid] = true;
LR_SC = true;
menu_destroy(menu);
lr_started = true
opid = tempid;
return PLUGIN_HANDLED;
}
public menu7(id)
{
new menu = menu_create("\y[\rsG\y] \yChoose a Guard:", "submenu7");
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(menu, szName, szTempid, 0);
}
menu_display(id, menu);
return PLUGIN_HANDLED;
}
public submenu7(id, menu, item)
{
if( item == MENU_EXIT )
{
menu_destroy(menu);
return PLUGIN_HANDLED;
}
new data[6], iName[64];
new access, callback;
menu_item_getinfo(menu, item, access, data,5, iName, 63, callback);
new tempid = str_to_num(data);
strip_user_weapons(tempid);
strip_user_weapons(id)
give_item(tempid, "weapon_knife");
give_item(id, "weapon_knife")
set_user_health(tempid, 100);
set_user_health(id, 100)
cs_set_weapon_ammo(give_item(id, "weapon_deagle"), 7)
cs_set_user_bpammo(id, CSW_DEAGLE, 7)
cs_set_weapon_ammo(give_item(tempid, "weapon_deagle"), 7)
cs_set_user_bpammo(tempid, CSW_DEAGLE, 7)
new szName[32], szName2[32]
get_user_name(id, szName, 31);
get_user_name(tempid, szName2, 31);
ColorChat(0, RED, "%s ^x04%s ^x01want to have a Gun Toss with ^x04%s^n", PREFIX, szName, szName2);
set_hudmessage(0, 255, 255, -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15, 3)
show_hudmessage(0, "%s want to have a Gun Toss with %s^n", szName, szName2)
if( is_user_alive(tempid) )
set_user_health(tempid, 100);
g_got_beacon[id] = true;
g_got_beacon[tempid] = true;
LR_GT = true;
menu_destroy(menu);
lr_started = true
opid = tempid;
return PLUGIN_HANDLED;
}
public menu8(id)
{
new menu = menu_create("\y[\rsG\y] \yChoose a Guard:", "submenu7");
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(menu, szName, szTempid, 0);
}
menu_display(id, menu);
return PLUGIN_HANDLED;
}
public submenu8(id, menu, item)
{
if( item == MENU_EXIT )
{
menu_destroy(menu);
return PLUGIN_HANDLED;
}
new data[6], iName[64];
new access, callback;
menu_item_getinfo(menu, item, access, data,5, iName, 63, callback);
new tempid = str_to_num(data);
strip_user_weapons(tempid);
strip_user_weapons(id)
give_item(tempid, "weapon_knife");
give_item(id, "weapon_knife")
set_user_health(tempid, 100);
set_user_health(id, 100)
cs_set_weapon_ammo(give_item(id, "weapon_Scout"), 9999)
cs_set_user_bpammo(id, CSW_DEAGLE, 9999)
cs_set_weapon_ammo(give_item(tempid, "weapon_Scout"), 9999)
cs_set_user_bpammo(tempid, CSW_SCOUT, 9999)
new szName[32], szName2[32]
get_user_name(id, szName, 31);
get_user_name(tempid, szName2, 31);
ColorChat(0, RED, "%s ^x04%s ^x01want to have a Scout Duel with ^x04%s^n", PREFIX, szName, szName2);
set_hudmessage(0, 255, 255, -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15, 3)
show_hudmessage(0, "%s want to have a Scot Duel with %s^n", szName, szName2)
if( is_user_alive(tempid) )
set_user_health(tempid, 100);
g_got_beacon[id] = true;
g_got_beacon[tempid] = true;
LR_SCOUT = true;
menu_destroy(menu);
lr_started = true
opid = tempid;
return PLUGIN_HANDLED;
}
public menu9(id)
{
new menu = menu_create("\y[\rsG\y] \yChoose a Guard:", "submenu7");
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(menu, szName, szTempid, 0);
}
menu_display(id, menu);
return PLUGIN_HANDLED;
}
public submenu9(id, menu, item)
{
if( item == MENU_EXIT )
{
menu_destroy(menu);
return PLUGIN_HANDLED;
}
new data[6], iName[64];
new access, callback;
menu_item_getinfo(menu, item, access, data,5, iName, 63, callback);
new tempid = str_to_num(data);
strip_user_weapons(tempid);
strip_user_weapons(id)
give_item(tempid, "weapon_knife");
give_item(id, "weapon_knife")
set_user_health(tempid, 100);
set_user_health(id, 100)
cs_set_weapon_ammo(give_item(id, "weapon_m4a1"), 9999)
cs_set_user_bpammo(id, CSW_DEAGLE, 7)
cs_set_weapon_ammo(give_item(tempid, "weapon_m4a1"), 9999)
cs_set_user_bpammo(tempid, CSW_M4A1, 9999)
new szName[32], szName2[32]
get_user_name(id, szName, 31);
get_user_name(tempid, szName2, 31);
ColorChat(0, RED, "%s ^x04%s ^x01want to have a M4A1 Duel with ^x04%s^n", PREFIX, szName, szName2);
set_hudmessage(0, 255, 255, -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15, 3)
show_hudmessage(0, "%s want to have a M4A1 Duel with %s^n", szName, szName2)
if( is_user_alive(tempid) )
set_user_health(tempid, 100);
g_got_beacon[id] = true;
g_got_beacon[tempid] = true;
LR_M4A1 = true;
menu_destroy(menu);
lr_started = true
opid = tempid;
return PLUGIN_HANDLED;
}
public menu10(id)
{
new menu = menu_create("\y[\rsG\y] \yChoose a Guard:", "submenu7");
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(menu, szName, szTempid, 0);
}
menu_display(id, menu);
return PLUGIN_HANDLED;
}
public submenu10(id, menu, item)
{
if( item == MENU_EXIT )
{
menu_destroy(menu);
return PLUGIN_HANDLED;
}
new data[6], iName[64];
new access, callback;
menu_item_getinfo(menu, item, access, data,5, iName, 63, callback);
new tempid = str_to_num(data);
strip_user_weapons(tempid);
strip_user_weapons(id)
give_item(tempid, "weapon_knife");
give_item(id, "weapon_knife")
set_user_health(tempid, 1000);
set_user_health(id, 1000)
cs_set_weapon_ammo(give_item(id, "weapon_awp"), 9999)
cs_set_user_bpammo(id, CSW_AWP, 7)
cs_set_weapon_ammo(give_item(tempid, "weapon_awp"), 9999)
cs_set_user_bpammo(tempid, CSW_AWP, 9999)
new szName[32], szName2[32]
get_user_name(id, szName, 31);
get_user_name(tempid, szName2, 31);
ColorChat(0, RED, "%s ^x04%s ^x01want to have a AWP [HP] Duel with ^x04%s^n", PREFIX, szName, szName2);
set_hudmessage(0, 255, 255, -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15, 3)
show_hudmessage(0, "%s want to have a AWP [HP] Duel with %s^n", szName, szName2)
if( is_user_alive(tempid) )
set_user_health(tempid, 100);
g_got_beacon[id] = true;
g_got_beacon[tempid] = true;
LR_AWP = true;
menu_destroy(menu);
lr_started = true
opid = tempid;
return PLUGIN_HANDLED;
}
public menu11(id)
{
new menu = menu_create("\y[\rsG\y] \yChoose a Guard:", "submenu7");
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(menu, szName, szTempid, 0);
}
menu_display(id, menu);
return PLUGIN_HANDLED;
}
public submenu11(id, menu, item)
{
if( item == MENU_EXIT )
{
menu_destroy(menu);
return PLUGIN_HANDLED;
}
new data[6], iName[64];
new access, callback;
menu_item_getinfo(menu, item, access, data,5, iName, 63, callback);
new tempid = str_to_num(data);
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")
new szName[32], szName2[32]
get_user_name(id, szName, 31);
get_user_name(tempid, szName2, 31);
ColorChat(0, RED, "%s ^x04%s ^x01want to have a Shot the bomb Duel with ^x04%s^n", PREFIX, szName, szName2);
set_hudmessage(0, 255, 255, -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15, 3)
show_hudmessage(0, "%s want to have a Shot the bomb Duel with %s^n", szName, szName2)
if( is_user_alive(tempid) )
set_user_health(tempid, 100);
g_got_beacon[id] = true;
g_got_beacon[tempid] = true;
LR_TAKEAWAY = true;
menu_destroy(menu);
lr_started = true
opid = tempid;
return PLUGIN_HANDLED;
}
public menu12(id)
{
new menu = menu_create("\yChoose Guard to fight:", "submenu2");
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(menu, szName, szTempid, 0);
}
menu_display(id, menu);
return PLUGIN_HANDLED;
}
public submenu12(id, menu, item)
{
if( item == MENU_EXIT )
{
menu_destroy(menu);
return PLUGIN_HANDLED;
}
new data[6], iName[64];
new access, callback;
menu_item_getinfo(menu, item, access, data,5, iName, 63, callback);
new tempid = str_to_num(data);
strip_user_weapons(tempid);
give_item(tempid, "weapon_knife");
give_item(tempid, "weapon_deagle")
cs_set_user_bpammo(tempid,CSW_DEAGLE,9999);
strip_user_weapons(id)
give_item(id, "weapon_knife")
set_user_health(id, 700)
give_item(id, "weapon_deagle")
cs_set_user_bpammo(id,CSW_DEAGLE,9999)
new szName[32], szName2[32]
get_user_name(id, szName, 31);
get_user_name(tempid, szName2, 31);
ColorChat(0, RED, "%s ^x04%s ^x01want to have a Deagle Duel [HP] with ^x04%s^n", PREFIX, szName, szName2)
set_hudmessage(0, 255, 255, -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15, 3)
show_hudmessage(0, "%s want to have a Deagle Duel [HP] with %s^n", szName, szName2)
if( is_user_alive(tempid) )
set_user_health(tempid, 700);
LR_DEAGLEHP = true;
g_got_beacon[id] = true;
g_got_beacon[tempid] = true;
menu_destroy(menu);
lr_started = true
opid = tempid;
return PLUGIN_HANDLED;
}
public menu13(id)
{
new menu = menu_create("\yChoose Guard to fight:", "submenu2");
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(menu, szName, szTempid, 0);
}
menu_display(id, menu);
return PLUGIN_HANDLED;
}
public submenu13(id, menu, item)
{
if( item == MENU_EXIT )
{
menu_destroy(menu);
return PLUGIN_HANDLED;
}
new data[6], iName[64];
new access, callback;
menu_item_getinfo(menu, item, access, data,5, iName, 63, callback);
new tempid = str_to_num(data);
strip_user_weapons(tempid);
give_item(tempid, "weapon_knife");
give_item(tempid, "weapon_ak47")
cs_set_user_bpammo(tempid,CSW_AK47,9999);
strip_user_weapons(id)
give_item(id, "weapon_knife")
set_user_health(id, 2000)
give_item(id, "weapon_ak47")
cs_set_user_bpammo(id,CSW_AK47,9999)
new szName[32], szName2[32]
get_user_name(id, szName, 31);
get_user_name(tempid, szName2, 31);
ColorChat(0, RED, "%s ^x04%s ^x01want to have a AK47 [HP] with ^x04%s^n", PREFIX, szName, szName2)
set_hudmessage(0, 255, 255, -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15, 3)
show_hudmessage(0, "%s want to have a AK47 [HP] with %s^n", szName, szName2)
if( is_user_alive(tempid) )
set_user_health(tempid, 2000);
LR_AKHP = true;
g_got_beacon[id] = true;
g_got_beacon[tempid] = true;
menu_destroy(menu);
lr_started = true
opid = tempid;
return PLUGIN_HANDLED;
}
public create_timer()
{
g_timer_entid = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString,"info_target"))
if(pev_valid(g_timer_entid))
{
set_pev(g_timer_entid, pev_classname, "beacon_timer")
global_get(glb_time, g_t_time)
set_pev(g_timer_entid, pev_nextthink, g_t_time + UPDATE_INTERVAL)
register_forward(FM_Think,"fwd_Think")
}
else
{
log_amx("Warning: Failed to create timer entity, using task instead")
set_task(UPDATE_INTERVAL, "timer_cycle", TID_TIMER, "", 0, "b")
}
}
public fwd_Think(Ent){
if(Ent != g_timer_entid)
return FMRES_IGNORED
g_t_time += UPDATE_INTERVAL
set_pev(Ent, pev_nextthink, g_t_time)
timer_cycle()
return FMRES_IGNORED
}
public plugin_unpause()
{
if(pev_valid(g_timer_entid))
{
global_get(glb_time, g_t_time)
g_t_time += UPDATE_INTERVAL
set_pev(g_timer_entid, pev_nextthink, g_t_time)
}
}
public timer_cycle()
{
static id
for(id=1; id<=g_max_clients; id++)
if(g_got_beacon[id] && is_user_alive(id))
show_beacon(id)
}
public show_beacon(id)
{
static origin[3];
get_user_origin(id, origin);
message_begin(MSG_BROADCAST, SVC_TEMPENTITY);
write_byte(TE_BEAMCYLINDER);
write_coord(origin[0]); //position.x
write_coord(origin[1]); //position.y
write_coord(origin[2]+5); //position.z
write_coord(origin[0]); //axis.x
write_coord(origin[1]); //axis.y
write_coord(origin[2]+130); //axis.z
write_short(g_sprite); //sprite index
write_byte(0); //starting frame
write_byte(1); //frame rate in 0.1's
write_byte(6); //life in 0.1's
write_byte(10); //line width in 0.1's
write_byte(1); //noise amplitude in 0.01's
if (cs_get_user_team(id) == CS_TEAM_CT)
{
write_byte(0); // r
write_byte(0); // g
write_byte(255); // b
}
else if (cs_get_user_team(id) == CS_TEAM_T)
{
write_byte(255); // r
write_byte(0); // g
write_byte(0); // b
}
else
{
write_byte(0); // r
write_byte(0); // g
write_byte(255); // b
}
write_byte(255); // brightness
write_byte(0); // scroll speed in 0.1's
message_end();
}