#include <amxmodx>
#include <cstrike>
#include <engine>
#include <fun>
#include <xs>
#include <fakemeta>
#include <hamsandwich>
#include <zombieplague>
#define TASK_AURA 547
new const g_GunEvents[][] =
{
"events/awp.sc",
"events/g3sg1.sc",
"events/ak47.sc",
"events/scout.sc",
"events/m249.sc",
"events/m4a1.sc",
"events/sg552.sc",
"events/aug.sc",
"events/sg550.sc",
"events/m3.sc",
"events/xm1014.sc",
"events/usp.sc",
"events/mac10.sc",
"events/ump45.sc",
"events/fiveseven.sc",
"events/p90.sc",
"events/deagle.sc",
"events/p228.sc",
"events/glock18.sc",
"events/mp5n.sc",
"events/tmp.sc",
"events/elite_left.sc",
"events/elite_right.sc",
"events/galil.sc",
"events/famas.sc"
};
const WEAPONS_BITSUM = (1<<CSW_KNIFE|1<<CSW_HEGRENADE|1<<CSW_FLASHBANG|1<<CSW_SMOKEGRENADE|1<<CSW_C4)
const PRIMARY_WEAPONS_BITSUM = (1<<CSW_SCOUT)|(1<<CSW_XM1014)|(1<<CSW_MAC10)|(1<<CSW_AUG)|(1<<CSW_UMP45)|(1<<CSW_SG550)|(1<<CSW_GALIL)|(1<<CSW_FAMAS)|(1<<CSW_AWP)|(1<<CSW_MP5NAVY)|(1<<CSW_M249)|(1<<CSW_M3)|(1<<CSW_M4A1)|(1<<CSW_TMP)|(1<<CSW_G3SG1)|(1<<CSW_SG552)|(1<<CSW_AK47)|(1<<CSW_P90)
const SECONDARY_WEAPONS_BITSUM = (1<<CSW_GLOCK18)|(1<<CSW_DEAGLE)|(1<<CSW_P228)|(1<<CSW_USP)|(1<<CSW_ELITE)|(1<<CSW_FIVESEVEN)
const m_pPlayer = 41
const m_flNextPrimaryAttack = 46
const m_flNextSecondaryAttack = 47
const m_flTimeWeaponIdle = 48
new g_GunEventBits
new g_FMPrecacheEvent
new g_TouchGroundEnt
new g_msgHostageAdd, g_msgHostageDel, g_SayText, gmsgFade, g_status_sync
enum
{
NO_CLASS = 0,
//CLASS_ARMOR,
CLASS_POUND,
CLASS_JUMPER,
CLASS_STEALTH,
CLASS_FROST,
CLASS_APS,
CLASS_DOC,
CLASS_MAD,
CLASS_FALL,
CLASS_AZ,
CLASS_FLARE,
CLASS_PHALANX,
CLASS_RADAR,
CLASS_FIRE,
CLASS_DMGX,
//CLASS_MEDIC,
CLASS_GUNNER,
CLASS_SAMURAI,
CLASS_FLASHER,
//CLASS_MUTANT,
CLASS_SPY,
CLASS_HEAV,
CLASS_NVG,
//CLASS_SRV,
CLASS_CAM,
//CLASS_GHOST,
CLASS_SNIP,
CLASS_GORE,
CLASS_LEECH
//CLASS_KNOCK,
//CLASS_COLLECT,
//CLASS_STHG
}
new g_iPlayersClass[33]
new g_iCurrentWeapon[33]
new bool:got_class[33]
new areantiflash[33]
new itemid_zm
new meniu_activ[33]
new menu
new afostmutant[33]
new afostdezinfectat[33]
public plugin_init()
{
register_plugin("[ZP] Clase Oameni", "2.1", "EDUTz")
itemid_zm = zp_register_extra_item("[ZP] Anti Oftalmolog(blind)", 5, ZP_TEAM_ZOMBIE)
register_event("StatusValue", "showStatus", "be", "1=2", "2!0")
register_event("HLTV", "NewRound", "a", "1=0", "2=0")
register_event("DeathMsg", "DeathMsg", "a")
register_clcmd("cheer", "ClCmdSelectclass")
register_clcmd("say /hc", "ClCmdSelectclass")
RegisterHam(Ham_Killed, "player", "fw_PlayerKilled_Pre", 0)
RegisterHam(Ham_Killed, "player", "fw_PlayerKilled_Post", 1)
unregister_forward(FM_PrecacheEvent, g_FMPrecacheEvent, 1)
entity_set_string(g_TouchGroundEnt , EV_SZ_classname , "touchground_entity")
RegisterHam(Ham_TakeDamage, "player", "Ham_PlayerTakeDamage", 0)
RegisterHam(Ham_Weapon_PrimaryAttack, "weapon_knife", "fw_Knife_PrimaryAttack_Post", 1)
RegisterHam(Ham_Weapon_SecondaryAttack, "weapon_knife", "fw_Knife_SecondaryAttack_Post", 1)
g_TouchGroundEnt = create_entity("info_target")
g_status_sync = CreateHudSyncObj()
gmsgFade = get_user_msgid("ScreenFade")
g_SayText = get_user_msgid("SayText")
g_msgHostageAdd = get_user_msgid("HostagePos")
g_msgHostageDel = get_user_msgid("HostageK")
set_task (2.0,"radar_scan",_,_,_,"b")
menu = menu_create("\yAlege clasa Human:", "human_menu_handler")
human_menu()
}
public plugin_natives()
{
register_native("zc_user_class", "native_zc_user_class", 1)
}
public native_zc_user_class(id)
{
return g_iPlayersClass[id]
}
public plugin_precache()
{
precache_model("models/rpgrocket.mdl")
precache_sound("zombie_plague/zm2freakzhero.wav")
g_FMPrecacheEvent = register_forward(FM_PrecacheEvent, "fw_FMPrecacheEvent", 1)
}
public ClCmdSelectclass(id)
{
if(zp_get_user_zombie(id) || zp_get_user_nemesis(id) || zp_get_user_survivor(id))
{
return PLUGIN_HANDLED;
}
else if( got_class[id] == true )
{
client_print(id, print_chat, "[ZP] Meniul se va reactiva runda urmatoare !")
meniu_activ[id] = 1
}
else if(!is_user_alive(id))
{
return PLUGIN_HANDLED;
}
else
{
menu_display(id, menu, 0)
//human_menu(id)
}
return PLUGIN_CONTINUE;
}
public human_menu()
{
//new menu = menu_create("\yAlege clasa Human:", "human_menu_handler")
//menu_additem(menu, "\wOmul Armura \y(+20 Armura)", "1", 0)
menu_additem(menu, "\wOmul plin de viata \y(+300 HP)", "1", 0)
menu_additem(menu, "\wSaltaretul \y(Are o saritura puternica)", "2", 0)
menu_additem(menu, "\wCamuflatul \y(+Semi-invizibil)", "3", 0)
menu_additem(menu, "\wSoldatul ghetarurilor \y(Are 5xFrostNade)", "4", 0)
menu_additem(menu, "\wHotul \y(Fura credite la infectare)", "5", 0)
menu_additem(menu, "\wDoctorul \y(+500 la infectare)", "6", 0)
menu_additem(menu, "\wNebunul \y(+Are Madness la infectare)", "7", 0)
menu_additem(menu, "\wBig Foot \y(Nu ia damage la cazaturi)", "8", 0)
menu_additem(menu, "\wArmura dupa infectare \y(+Armura dupa infectare)", "9", 0)
menu_additem(menu, "\wLuminatul \y(Primesti 5xFlare & Aura luminoasa)", "10", 0)
menu_additem(menu, "\wSoldatul \y(Scut&Deagle)", "11", 0)
menu_additem(menu, "\wRadar Zombie \y(Zombie Radar)", "12", 0)
menu_additem(menu, "\wInflacaratul \y(Primesti 5 Grenade)", "13", 0)
menu_additem(menu, "\wArnold schwar-tantar \y(Dai damage cu 10% mai mare)", "14", 0)
//menu_additem(menu, "\wMedicul \y(1 Extra Antidote)", "15", 0)
menu_additem(menu, "\wPistolarul \y(+Primesti toate pistoalele din dotare)", "15", 0)
menu_additem(menu, "\wSamurai-Jack \y(Esti iute in cutit + Dai damage mai mare)", "16", 0)
menu_additem(menu, "\wOftalmologul \y(Orbesti zombie)", "17", 0)
//menu_additem(menu, "\wMutantul \y(Devii nemesis la infectare)", "20", 0)
menu_additem(menu, "\wInLove \y(Citeste informatii despre ceilalti)", "18", 0)
menu_additem(menu, "\wDoru cel dur \y(Primesti M249)", "19", 0)
menu_additem(menu, "\wNocturnul \y(Primesti NightVision)", "20", 0)
//menu_additem(menu, "\wGhimpele \y(Daca ramai ultimul, devii Survivor)", "22", 0)
menu_additem(menu, "\wCameramanul \y(Ai vedere 3rd person)", "21", 0)
//menu_additem(menu, "\wFantoma \y(Primesti No Clip la infectare)", "24", 0)
menu_additem(menu, "\wSniperul \y(Primesti Snipers & Dai Damage mai mare)", "22", 0)
menu_additem(menu, "\wDisperatul \y(Zombie explodeaza dupa ce ii ucide)", "23", 0)
menu_additem(menu, "\wCiorditorul \y(Fura HP)", "24", 0)
//menu_additem(menu, "\wKnockBacker \y(Dai Knockback mai mare)", "30", 0)
//menu_additem(menu, "\wAvarul \y(Culegi toate armele de pe jos)", "31", 0)
//menu_additem(menu, "\wDarnicul \y(Emani invizibilitate)", "31", 0)
menu_additem(menu, "\wRandom \y(Primesti o clasa random)", "27", 0)
menu_setprop(menu, MPROP_EXIT, MEXIT_ALL)
}
public human_menu_handler(id, menu, item)
{
if(!is_user_alive(id)) return PLUGIN_HANDLED
if( item == MENU_EXIT || zp_get_user_zombie(id) || zp_get_user_survivor(id) || zp_get_user_nemesis(id))
{
//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 key = str_to_num(data)
switch(key)
{
/*
case 1:
{
got_class[id] = true
class_1(id)
}
*/
case 1:
{
got_class[id] = true
class_2(id)
}
case 2:
{
got_class[id] = true
class_3(id)
}
case 3:
{
got_class[id] = true
class_6(id)
}
case 4:
{
got_class[id] = true
class_7(id)
}
case 5:
{
got_class[id] = true
class_8(id)
}
case 6:
{
got_class[id] = true
class_10(id)
}
case 7:
{
got_class[id] = true
class_11(id)
}
case 8:
{
got_class[id] = true
class_12(id)
}
case 9:
{
got_class[id] = true
class_13(id)
}
case 10:
{
got_class[id] = true
class_14(id)
}
case 11:
{
got_class[id] = true
class_17(id)
}
case 12:
{
got_class[id] = true
class_20(id)
}
case 13:
{
got_class[id] = true
class_21(id)
}
case 14:
{
got_class[id] = true
class_22(id)
}
/*
case 15:
{
got_class[id] = true
class_24(id)
}
*/
case 15:
{
got_class[id] = true
class_25(id)
}
case 16:
{
got_class[id] = true
class_26(id)
}
case 17:
{
got_class[id] = true
class_28(id)
}
/*
case 20:
{
got_class[id] = true
class_29(id)
}
*/
case 18:
{
got_class[id] = true
class_30(id)
}
case 19:
{
got_class[id] = true
class_31(id)
}
case 20:
{
got_class[id] = true
class_32(id)
}
/*
case 22:
{
got_class[id] = true
class_33(id)
}
*/
case 21:
{
got_class[id] = true
class_36(id)
}
/*
case 23:
{
got_class[id] = true
class_37(id)
}
*/
case 22:
{
got_class[id] = true
class_38(id)
}
case 23:
{
got_class[id] = true
class_39(id)
}
case 24:
{
got_class[id] = true
class_40(id)
}
case 27:
{
got_class[id] = true
new rand = random_num(1,27)
switch(rand)
{
//case 1: class_1(id)
case 1: class_2(id)
case 2: class_3(id)
case 3: class_6(id)
case 4: class_7(id)
case 5: class_8(id)
case 6: class_10(id)
case 7: class_11(id)
case 8: class_12(id)
case 9: class_13(id)
case 10: class_14(id)
case 11: class_17(id)
case 12: class_20(id)
case 13: class_21(id)
case 14: class_22(id)
//case 15: class_24(id)
case 15: class_25(id)
case 16: class_26(id)
case 17: class_28(id)
//case 20: class_29(id)
case 18: class_30(id)
case 19: class_31(id)
case 20: class_32(id)
//case 22: class_33(id)
case 21: class_36(id)
//case 24: class_37(id)
case 22: class_38(id)
case 23: class_39(id)
case 24: class_40(id)
//case 30: class_43(id)
//case 31: class_44(id)
//case 30: class_46(id)
}
}
}
//menu_destroy(menu)
return PLUGIN_HANDLED
}
public Ham_PlayerTakeDamage(iVictim, iInflictor, iAttacker, Float:flDamage, iDmgBits)
{
if ( !is_user_alive( iAttacker ) ) return HAM_IGNORED
if (iDmgBits & DMG_FALL)
{
if (g_iPlayersClass[iVictim] == CLASS_FALL && !zp_get_user_nemesis(iVictim) && !zp_get_user_survivor(iVictim) && !zp_get_user_zombie(iVictim))
{
return HAM_SUPERCEDE
}
}
if(g_iPlayersClass[iAttacker] == CLASS_DMGX && !zp_get_user_nemesis(iAttacker) && !zp_get_user_survivor(iAttacker) && !zp_get_user_zombie(iAttacker))
{
SetHamParamFloat(4,(flDamage*1.1))
return HAM_HANDLED
}
if(g_iPlayersClass[iAttacker] == CLASS_SAMURAI && g_iCurrentWeapon[iAttacker] == CSW_KNIFE && !zp_get_user_nemesis(iAttacker) && !zp_get_user_survivor(iAttacker) && !zp_get_user_zombie(iAttacker))
{
SetHamParamFloat(4,(flDamage*2.0))
return HAM_HANDLED
}
if(g_iPlayersClass[iAttacker] == CLASS_SNIP && g_iCurrentWeapon[iAttacker] == CSW_AWP || g_iCurrentWeapon[iAttacker] == CSW_SCOUT)
{
SetHamParamFloat(4,(flDamage*2.0))
return HAM_HANDLED
}
if (zp_get_user_zombie(iVictim) && iVictim != iAttacker && g_iPlayersClass[iAttacker] == CLASS_LEECH && is_user_alive(iAttacker) && is_user_alive(iVictim))
{
if( get_user_health(iAttacker) <= 300 )
{
new damage = floatround(flDamage)
set_user_health(iAttacker, (get_user_health(iAttacker) + damage/80))
}
}
/*
if(zp_get_user_zombie(iVictim) && iVictim != iAttacker && g_iPlayersClass[iAttacker] == CLASS_KNOCK)
{
new Float:vec[3];
new Float:oldvelo[3];
get_user_velocity(iVictim, oldvelo);
create_velocity_vector(iVictim , iAttacker , vec);
vec[0] += oldvelo[0];
vec[1] += oldvelo[1];
set_user_velocity(iVictim , vec);
return HAM_HANDLED
}
*/
return HAM_IGNORED
}
public blind(id)
{
message_begin(MSG_ONE_UNRELIABLE, gmsgFade,{0,0,0},id)
write_short(1<<2)
write_short(1<<11)
write_short(1<<12)
write_byte(255)
write_byte(255)
write_byte(255)
write_byte(250)
message_end()
}
/*
stock fm_get_speed(entity)
{
static Float:velocity[3]
pev(entity, pev_velocity, velocity)
return floatround(vector_length(velocity))
}
*/
public radar_scan()
{
new zombie_count = 0;
new zombie_list[32];
new ZombieCoords[3];
new id, i;
for (new id=1; id<=32; id++)
if (zp_get_user_zombie(id))
{
zombie_count++;
zombie_list[zombie_count]=id;
}
for (id=1; id<=32; id++)
{
if ( !is_user_alive(id) || g_iPlayersClass[id] != CLASS_RADAR || zp_get_user_nemesis(id) || zp_get_user_survivor(id) || zp_get_user_zombie(id)) continue;
for (i=1;i<=zombie_count;i++)
{
get_user_origin(zombie_list[i], ZombieCoords)
message_begin(MSG_ONE_UNRELIABLE, g_msgHostageAdd, {0,0,0}, id)
write_byte(id)
write_byte(i)
write_coord(ZombieCoords[0])
write_coord(ZombieCoords[1])
write_coord(ZombieCoords[2])
message_end()
message_begin(MSG_ONE_UNRELIABLE, g_msgHostageDel, {0,0,0}, id)
write_byte(i)
message_end()
}
}
}
public remove_mad(id)
{
set_user_godmode(id, 0)
remove_task(id + TASK_AURA)
}
public zp_extra_item_selected(id, itemid)
{
if (itemid == itemid_zm)
{
areantiflash[id] = 1;
}
}
public human_meniu()
{
for(new i = 0; i < get_maxplayers(); i++)
{
if(is_user_alive(i) && (g_iPlayersClass[i] == NO_CLASS))
{
menu_display(i, menu, 0)
client_cmd(i, "spk zombie_plague/zm2freakzhero.wav")
}
}
}
public NewRound()
{
for (new i = 1; i <= get_maxplayers(); i++)
{
if(is_user_connected(i) && is_user_alive(i)) set_view(i, CAMERA_NONE)
areantiflash[i] = 0
afostmutant[i] = 0
afostdezinfectat[i] = 0
if(meniu_activ[i] == 1)
{
got_class[i] = false
g_iPlayersClass[i] = NO_CLASS
}
switch( g_iPlayersClass[i] )
{
//case CLASS_ARMOR: set_task(1.0, "taskarmura", i)
case CLASS_POUND: set_task(1.0, "taskviata", i)
case CLASS_JUMPER: set_task(1.0, "taskgravitate", i)
case CLASS_STEALTH:
{
set_user_rendering(i,kRenderFxNone,0,0,0,kRenderTransAlpha,127)
chat_color(i, "!g[ZP] !yClasa ta Human pentru runda aceasta este:!g Camuflatul !t(Semi-invizibil)");
}
case CLASS_FROST:
{
give_item(i, "weapon_flashbang")
cs_set_user_bpammo(i, CSW_FLASHBANG, 5)
chat_color(i, "!g[ZP] !yClasa ta Human pentru runda aceasta este:!g Soldatul ghetarilor !t(5 FrostNade)");
}
case CLASS_APS: chat_color(i, "!g[ZP] !yClasa ta Human pentru runda aceasta este:!g Hotul !t(Fura credite la infectare)");
case CLASS_DOC: chat_color(i, "!g[ZP] !yClasa ta Human pentru runda aceasta este:!g Doctorul !t(+500 HP la infectare)");
case CLASS_MAD: chat_color(i, "!g[ZP] !yClasa ta Human pentru runda aceasta este:!g Nebunul !t(Are Madness la infectare pentru 5 Secunde)");
case CLASS_FALL: chat_color(i, "!g[ZP] !yClasa ta Human pentru runda aceasta este:!g Big Foot !t(Nu ia damage la cazaturi)");
case CLASS_AZ: chat_color(i, "!g[ZP] !yClasa ta Human pentru runda aceasta este:!g Fricosul !t(+100 Armura dupa infectare)");
case CLASS_FLARE: class_14(i)
case CLASS_PHALANX: class_17(i)
case CLASS_RADAR: chat_color(i, "!g[ZP] !yClasa ta Human pentru runda aceasta este:!g Omul Radar !t(Poti vedea Zombie pe Radar)");
case CLASS_FIRE: class_21(i)
case CLASS_DMGX: chat_color(i, "!g[ZP] !yClasa ta Human pentru runda aceasta este:!g Chuck Norris !t(Dai damage cu 10% mai mare)");
//case CLASS_MEDIC: chat_color(i, "!g[ZP] !yClasa ta Human pentru runda aceasta este:!g Medicul !t(1 Extra Antidote, la 10 Secunde dupa infectare)");
case CLASS_GUNNER:
{
drop_secondary_weapons(i)
class_25(i)
}
case CLASS_SAMURAI: chat_color(i, "!g[ZP] !yClasa ta Human pentru runda aceasta este:!g Samurai-Jack !t(Dai repede cu lama si ai Damage mai mare)");
case CLASS_FLASHER: chat_color(i, "!g[ZP] !yClasa ta Human pentru runda aceasta este:!g Oftalmologul !t(Orbesti zombie)");
//case CLASS_MUTANT: chat_color(i, "!g[ZP] !yClasa ta Human pentru runda aceasta este:!g Mutantul !t(Devii nemesis pentru 8 secunde la infectare)");
case CLASS_SPY: chat_color(i, "!g[ZP] !yClasa ta Human pentru runda aceasta este:!g InLove !t(Poate vedea HP-ul si nr de credite la zombie & nr de zombie ramasi)");
case CLASS_HEAV: class_31(i)
case CLASS_NVG: class_32(i)
//case CLASS_SRV: chat_color(i, "!g[ZP] !yClasa ta Human pentru runda aceasta este:!g Ghimpele !t(Daca ramai ultimul, devii Survivor)");
case CLASS_CAM: class_36(i)
//case CLASS_GHOST: chat_color(i, "!g[ZP] !yClasa ta Human pentru runda aceasta este:!g Fantoma !t(Primesti No Clip 10 secunde la infectare)");
case CLASS_SNIP: class_38(i)
case CLASS_GORE: chat_color(i, "!g[ZP] !yClasa ta Human pentru runda aceasta este:!g Disperatul !t(Zombie explodeaza dupa ce ii ucide)");
case CLASS_LEECH: chat_color(i, "!g[ZP] !yClasa ta Human pentru runda aceasta este:!g Ciorditorul !t(Fura HP in timp ce face Damage)");
//case CLASS_KNOCK: chat_color(i, "!g[ZP] !yClasa ta Human pentru runda aceasta este:!g KnockBacker !t(Ai Knockback mai mare)");
//case CLASS_COLLECT: chat_color(i, "!g[ZP] !yClasa ta Human pentru runda aceasta este:!g Avarul !t(Culegi toate armele de pe jos)");
//case CLASS_STHG: chat_color(i, "!g[ZP] !yClasa ta Human pentru runda aceasta este:!g Darnicul !t(Emani invizibilitate)");
}
meniu_activ[i] = 0
}
set_task(5.0, "human_meniu")
}
/*
public taskarmura(id)
{
if(is_user_alive(id) && is_user_connected(id))
{
new CsArmorType:ArmorType
new userarmor = cs_get_user_armor(id, ArmorType)
cs_set_user_armor(id, userarmor + 20, ArmorType)
chat_color(id,"!g[ZP] !yClasa ta Human pentru runda aceasta este:!g Omul Armura !t(+20 Armura)")
}
}
*/
public taskviata(id)
{
if(is_user_alive(id) && is_user_connected(id))
{
set_user_health(id, get_user_health(id) + 300)
chat_color(id, "!g[ZP] !yClasa ta Human pentru runda aceasta este:!g Omul plin de viata !t(300 HP)")
}
}
public taskgravitate(id)
{
if(is_user_alive(id) && is_user_connected(id))
{
set_user_gravity(id, 0.50)
chat_color(id, "!g[ZP] Clasa ta Human pentru runda aceasta este:!g Saltaretul !t(Are o saritura puternica)");
}
}
public zp_user_infected_post(id, infector)
{
if(g_iPlayersClass[id] == CLASS_DOC)
{
set_user_health(id, (get_user_health(id)) + 500)
}
if(g_iPlayersClass[id] == CLASS_APS)
{
new amount
amount = random_num(1,2)
zp_set_user_ammo_packs(id, zp_get_user_ammo_packs(id) + amount)
zp_set_user_ammo_packs(infector, (zp_get_user_ammo_packs(infector) - amount) - (get_cvar_num("zp_zombie_infect_reward")))
}
if(g_iPlayersClass[id] == CLASS_MAD)
{
set_user_godmode(id, 1)
set_task(0.1, "aura", id + TASK_AURA, _, _, "b")
set_task(5.0, "remove_mad", id)
}
if(g_iPlayersClass[id] == CLASS_AZ)
{
cs_set_user_armor(id, 100, CsArmorType:2)
}
/*
if(g_iPlayersClass[id] == CLASS_MEDIC && afostdezinfectat[id] == 0 && !zp_is_nemesis_round() && !zp_is_survivor_round() && !zp_is_swarm_round() && !zp_is_plague_round() && !zp_is_lnj_round() && !zp_is_sniper_round() && !zp_is_assassin_round())
{
set_task(10.0, "disinfect", id)
}
*/
/*
if(g_iPlayersClass[id] == CLASS_MUTANT)
{
if(afostmutant[id] == 0)
{
nemesize(id)
afostmutant[id] = 1
}
}
*/
/*
if(g_iPlayersClass[id] == CLASS_GHOST)
{
noclip(id)
}
*/
if(g_iPlayersClass[id] == CLASS_CAM)
{
set_view(id, CAMERA_NONE)
}
}
public DeathMsg()
{
new id = read_data(2)
set_view(id, CAMERA_NONE)
}
public aura(id)
{
id -= TASK_AURA
new Origin[3]
get_user_origin(id, Origin)
message_begin(MSG_ALL, SVC_TEMPENTITY)
write_byte(TE_DLIGHT)
write_coord(Origin[0])
write_coord(Origin[1])
write_coord(Origin[2])
write_byte(20)
write_byte(255)
write_byte(0)
write_byte(0)
write_byte(2)
write_byte(0)
message_end()
}
stock drop_primary_weapons(id)
{
static weapons [ 32 ], num, i, weaponid
num = 0
get_user_weapons (id, weapons, num )
for ( i = 0; i < num; i++ )
{
weaponid = weapons [ i ]
if ( ( (1<<weaponid) & PRIMARY_WEAPONS_BITSUM ) )
{
static wname[32]
get_weaponname(weaponid, wname, charsmax(wname))
engclient_cmd(id, "drop", wname)
}
}
}
stock drop_secondary_weapons(id)
{
static weapons [ 32 ], num, i, weaponid
num = 0
get_user_weapons (id, weapons, num )
for ( i = 0; i < num; i++ )
{
weaponid = weapons [ i ]
if ( ( (1<<weaponid) & SECONDARY_WEAPONS_BITSUM ) )
{
static wname[32]
get_weaponname(weaponid, wname, charsmax(wname))
engclient_cmd(id, "drop", wname)
}
}
}
/*
public class_1(id)
{
g_iPlayersClass[ id ] = CLASS_ARMOR
new CsArmorType:ArmorType
new userarmor = cs_get_user_armor(id, ArmorType)
cs_set_user_armor(id, userarmor + 20, ArmorType)
chat_color(id,"!g[ZP] !yClasa ta Human pentru runda aceasta este:!g Omul Armura !t(+20 Armura)")
}
*/
public class_2(id)
{
g_iPlayersClass[id] = CLASS_POUND
set_user_health(id, get_user_health(id) + 300)
chat_color(id, "!g[ZP] !yClasa ta Human pentru runda aceasta este:!g Omul plin de viata !t(300 HP)")
}
public class_3(id)
{
g_iPlayersClass[id] = CLASS_JUMPER
set_user_gravity(id, 0.50)
chat_color(id, "!g[ZP] Clasa ta Human pentru runda aceasta este:!g Saltaretul !t(Are o saritura puternica)");
}
public class_6(id)
{
g_iPlayersClass[id] = CLASS_STEALTH
set_user_rendering(id,kRenderFxNone,0,0,0,kRenderTransAlpha,127)
chat_color(id, "!g[ZP] !yClasa ta Human pentru runda aceasta este:!g Camuflatul !t(Semi-invizibil)");
}
public class_7(id)
{
g_iPlayersClass[id] = CLASS_FROST
give_item(id, "weapon_flashbang")
cs_set_user_bpammo(id, CSW_FLASHBANG, 5)
chat_color(id, "!g[ZP] !yClasa ta Human pentru runda aceasta este:!g Soldatul ghetarilor !t(5 FrostNade)");
}
public class_8(id)
{
g_iPlayersClass[id] = CLASS_APS
chat_color(id, "!g[ZP] !yClasa ta Human pentru runda aceasta este:!g Hotul !t(Fura credite la infectare)");
}
public class_10(id)
{
g_iPlayersClass[id] = CLASS_DOC
chat_color(id, "!g[ZP] !yClasa ta Human pentru runda aceasta este:!g Doctorul !t(+500 HP la infectare)");
}
public class_11(id)
{
g_iPlayersClass[id] = CLASS_MAD
chat_color(id, "!g[ZP] !yClasa ta Human pentru runda aceasta este:!g Nebunul !t(Are Madness la infectare pentru 5 Secunde)");
}
public class_12(id)
{
g_iPlayersClass[id] = CLASS_FALL
chat_color(id, "!g[ZP] !yClasa ta Human pentru runda aceasta este:!g Big Foot !t(Nu ia damage la cazaturi)");
}
public class_13(id)
{
g_iPlayersClass[id] = CLASS_AZ
chat_color(id, "!g[ZP] !yClasa ta Human pentru runda aceasta este:!g Fricosul !t(+100 Armura dupa infectare)");
}
public class_14(id)
{
g_iPlayersClass[id] = CLASS_FLARE
give_item(id, "weapon_smokegrenade")
cs_set_user_bpammo(id, CSW_SMOKEGRENADE, 5)
set_pev(id, pev_effects, pev(id, pev_effects) | EF_BRIGHTLIGHT)
chat_color(id, "!g[ZP] !yClasa ta Human pentru runda aceasta este:!g Luminatul !t(Primesti 5xFlare & Aura luminoasa)");
}
public class_17(id)
{
g_iPlayersClass[id] = CLASS_PHALANX
drop_primary_weapons(id)
give_item(id,"weapon_shield")
give_item(id,"weapon_deagle")
cs_set_user_bpammo(id, CSW_DEAGLE, 35)
chat_color(id, "!g[ZP] !yClasa ta Human pentru runda aceasta este:!g Soldatul !t(Scut & Deagle)");
}
public class_20(id)
{
g_iPlayersClass[id] = CLASS_RADAR
chat_color(id, "!g[ZP] !yClasa ta Human pentru runda aceasta este:!g Omul Radar !t(Poti vedea Zombie pe Radar)");
}
public class_21(id)
{
g_iPlayersClass[id] = CLASS_FIRE
give_item(id, "weapon_hegrenade")
cs_set_user_bpammo(id, CSW_HEGRENADE, 5)
chat_color(id, "!g[ZP] !yClasa ta Human pentru runda aceasta este:!g Inflacaratul !t(5 NapalmNade)");
}
public class_22(id)
{
g_iPlayersClass[id] = CLASS_DMGX
chat_color(id, "!g[ZP] !yClasa ta Human pentru runda aceasta este:!g Chuck Norris !t(Dai damage cu 10% mai mare)");
}
/*
public class_24(id)
{
g_iPlayersClass[id] = CLASS_MEDIC
chat_color(id, "!g[ZP] !yClasa ta Human pentru runda aceasta este:!g Medicul !t(1 Extra Antidote, la 10 Secunde dupa infectare)");
}
*/
public class_25(id)
{
g_iPlayersClass[id] = CLASS_GUNNER
give_item(id, "weapon_glock18")
cs_set_user_bpammo(id, CSW_GLOCK18, 100)
give_item(id, "weapon_deagle")
cs_set_user_bpammo(id, CSW_DEAGLE, 100)
give_item(id, "weapon_usp")
cs_set_user_bpammo(id, CSW_USP, 100)
give_item(id, "weapon_fiveseven")
cs_set_user_bpammo(id, CSW_FIVESEVEN, 100)
give_item(id, "weapon_p228")
cs_set_user_bpammo(id, CSW_P228, 100)
give_item(id, "weapon_elite")
cs_set_user_bpammo(id, CSW_ELITE, 100)
chat_color(id, "!g[ZP] !yClasa ta Human pentru runda aceasta este:!g Pistolarul !t(Primesti toate pistoalele din dotare)");
}
public class_26(id)
{
g_iPlayersClass[id] = CLASS_SAMURAI
chat_color(id, "!g[ZP] !yClasa ta Human pentru runda aceasta este:!g Samurai-Jack !t(Dai repede cu lama si ai Damage mai mare)");
}
public class_28(id)
{
g_iPlayersClass[id] = CLASS_FLASHER
chat_color(id, "!g[ZP] !yClasa ta Human pentru runda aceasta este:!g Oftalmologul !t(Orbesti zombie)");
}
/*
public class_29(id)
{
g_iPlayersClass[id] = CLASS_MUTANT
chat_color(id, "!g[ZP] !yClasa ta Human pentru runda aceasta este:!g Mutantul !t(Devii nemesis pentru 8 secunde la infectare)");
}
*/
public class_30(id)
{
g_iPlayersClass[id] = CLASS_SPY
chat_color(id, "!g[ZP] !yClasa ta Human pentru runda aceasta este:!g InLove !t(Poate vedea HP-ul si nr de credite la zombie & nr de zombie ramasi)");
}
public class_31(id)
{
g_iPlayersClass[id] = CLASS_HEAV
give_item(id, "weapon_m249")
cs_set_user_bpammo(id, CSW_M249, 250)
chat_color(id, "!g[ZP] !yClasa ta Human pentru runda aceasta este:!g Doru cel dur !t(Primesti M249)");
}
public class_32(id)
{
g_iPlayersClass[id] = CLASS_NVG
zp_set_user_nightvision(id, 1)
chat_color(id, "!g[ZP] !yClasa ta Human pentru runda aceasta este:!g Nocturnul !t(Primesti NightVision)");
}
/*
public class_33(id)
{
g_iPlayersClass[id] = CLASS_SRV
chat_color(id, "!g[ZP] !yClasa ta Human pentru runda aceasta este:!g Ghimpele !t(Daca ramai ultimul, devii Survivor)");
}
*/
public class_36(id)
{
g_iPlayersClass[id] = CLASS_CAM
set_view(id, CAMERA_3RDPERSON)
chat_color(id, "!g[ZP] !yClasa ta Human pentru runda aceasta este:!g Cameramanul !t(Vedere 3rd Person)");
}
/*
public class_37(id)
{
g_iPlayersClass[id] = CLASS_GHOST
chat_color(id, "!g[ZP] !yClasa ta Human pentru runda aceasta este:!g Fantoma !t(Primesti No Clip 10 secunde la infectare)");
}
*/
public class_38(id)
{
g_iPlayersClass[id] = CLASS_SNIP
drop_primary_weapons(id)
give_item(id, "weapon_awp")
cs_set_user_bpammo(id, CSW_AWP, 30)
give_item(id, "weapon_scout")
cs_set_user_bpammo(id, CSW_SCOUT, 30)
chat_color(id, "!g[ZP] !yClasa ta Human pentru runda aceasta este:!g Sniperul !t(Primesti Snipers & Dai Damage dublu)");
}
public class_39(id)
{
g_iPlayersClass[id] = CLASS_GORE
chat_color(id, "!g[ZP] !yClasa ta Human pentru runda aceasta este:!g Disperatul !t(Zombie explodeaza dupa ce ii ucide)");
}
public class_40(id)
{
g_iPlayersClass[id] = CLASS_LEECH
chat_color(id, "!g[ZP] !yClasa ta Human pentru runda aceasta este:!g Ciorditorul !t(Fura HP in timp ce face Damage)");
}
/*
public class_43(id)
{
g_iPlayersClass[id] = CLASS_KNOCK
chat_color(id, "!g[ZP] !yClasa ta Human pentru runda aceasta este:!g KnockBacker !t(Ai Knockback mai mare)");
}
*/
/*
public class_44(id)
{
g_iPlayersClass[id] = CLASS_COLLECT
chat_color(id, "!g[ZP] !yClasa ta Human pentru runda aceasta este:!g Avarul !t(Culegi toate armele de pe jos)");
}
*/
/*
public class_46(id)
{
g_iPlayersClass[id] = CLASS_STHG
chat_color(id, "!g[ZP] !yClasa ta Human pentru runda aceasta este:!g Darnicul !t(Emani invizibilitate)");
}
*/
stock chat_color(const id, const input[], any:...)
{
static msg[191]
vformat(msg, 190, input, 3)
replace_all(msg, 190, "!g", "^4")
replace_all(msg, 190, "!y", "^1")
replace_all(msg, 190, "!t", "^3")
replace_all(msg, 190, "!c", "^0")
message_begin(MSG_ONE_UNRELIABLE, g_SayText, _, id)
write_byte(id)
write_string(msg)
message_end()
}
/*
public pfn_touch(ptr, ptd)
{
new bomb = find_ent_by_model(-1,"weaponbox","models/w_backpack.mdl")
entity_set_string(bomb,EV_SZ_classname,"bomb")
if(ptr > 0 && ptd > 0 && is_valid_ent(ptr) && is_user_alive(ptd) && zp_get_user_zombie(ptd) && !zp_get_user_nemesis(ptd))
{
new bomb[32]
entity_get_string(ptr, EV_SZ_classname, bomb, 31)
if (equal(bomb,"bomb"))
{
set_user_health(ptd, (get_user_health(ptd)) - 500)
new bOrigin[3]
get_user_origin(ptd, bOrigin, 0)
message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
write_byte(TE_EXPLOSION)
write_coord(bOrigin[0])
write_coord(bOrigin[1])
write_coord(bOrigin[2])
write_short(boomsprite)
write_byte(30)
write_byte(15)
write_byte(0)
message_end()
remove_entity(ptr)
}
}
}
*/
public disinfect(id)
{
afostdezinfectat[id] = 1
zp_disinfect_user(id)
}
public nemesize(id)
{
zp_make_user_nemesis(id)
set_task(8.0, "zombify", id)
}
public zombify(id)
{
if(!is_user_alive(id)) return;
set_task(0.1, "disinfect", id)
set_task(0.2, "make_zomb", id)
}
public survivorize(id)
{
zp_make_user_survivor(id)
set_user_health(id, 1000)
}
public make_zomb(id)
{
zp_infect_user(id)
}
public fw_Knife_PrimaryAttack_Post(knife)
{
static id
id = get_pdata_cbase(knife, m_pPlayer, 4)
if(g_iPlayersClass[id] == CLASS_SAMURAI && !zp_get_user_nemesis(id) && !zp_get_user_survivor(id) && !zp_get_user_zombie(id))
{
static Float:flRate
flRate = 0.3
set_pdata_float(knife, m_flNextPrimaryAttack, flRate, 4)
set_pdata_float(knife, m_flNextSecondaryAttack, flRate, 4)
set_pdata_float(knife, m_flTimeWeaponIdle, flRate, 4)
}
return HAM_IGNORED
}
public fw_Knife_SecondaryAttack_Post(knife)
{
static id
id = get_pdata_cbase(knife, m_pPlayer, 4)
if(g_iPlayersClass[id] == CLASS_SAMURAI && !zp_get_user_nemesis(id) && !zp_get_user_survivor(id) && !zp_get_user_zombie(id))
{
static Float:flRate
flRate = 0.6
set_pdata_float(knife, m_flNextPrimaryAttack, flRate, 4)
set_pdata_float(knife, m_flNextSecondaryAttack, flRate, 4)
set_pdata_float(knife, m_flTimeWeaponIdle, flRate, 4)
}
return HAM_IGNORED
}
public showStatus(id)
{
if(is_user_connected(id) && zp_get_user_zombie(id))
{
new pid = read_data(2)
if(g_iPlayersClass[pid] == CLASS_FLASHER && areantiflash[id] == 0 && !zp_get_user_nemesis(pid) && !zp_get_user_survivor(pid) && !zp_get_user_zombie(pid))
{
blind(id)
}
}
if(!is_user_bot(id) && is_user_connected(id) && g_iPlayersClass[id] == CLASS_SPY && !zp_get_user_nemesis(id) && !zp_get_user_survivor(id) && !zp_get_user_zombie(id))
{
new zmb = read_data(2)
if(g_iPlayersClass[id] == CLASS_SPY && zp_get_user_zombie(zmb))
{
new
HP = get_user_health(zmb)
new ap = zp_get_user_ammo_packs(zmb)
new zm = zp_get_zombie_count()
new name[32]
get_user_name(zmb,name,31)
set_hudmessage(0, 255, 0, -1.0, 0.1, 0, 2.0, 1.5, 0.1, 0.2, 13)
ShowSyncHudMsg(id, g_status_sync, "Nume: %s^nHP: %i^nCredite: %i^nZombie Ramasi: %i", name, hp, ap, zm)
}
}
}
/*
public zp_user_last_human(id)
{
if(g_iPlayersClass[id] == CLASS_SRV)
set_task(1.0, "survivorize", id)
}
*/
/*
public noclip(id)
{
set_user_rendering(id,kRenderFxNone,0,0,0,kRenderTransAlpha,127)
set_user_noclip(id,1)
set_task(10.0, "clipno", id)
}
public clipno(id)
{
set_user_rendering(id,kRenderFxNone,0,0,0,kRenderTransAlpha,255)
set_user_noclip(id,0)
}
*/
public fw_FMPrecacheEvent( Type , const szName[] )
{
for ( new i = 0 ; i < sizeof( g_GunEvents ) ; ++i )
{
if (equal(g_GunEvents[i] , szName))
{
g_GunEventBits |= (1 << get_orig_retval());
return FMRES_HANDLED;
}
}
return FMRES_IGNORED;
}
public fw_PlayerKilled_Pre(iVictim, iAttacker, iShouldGib)
{
if(zp_get_user_zombie(iVictim) && is_user_connected(iAttacker) && g_iPlayersClass[iAttacker] == CLASS_GORE)
{
SetHamParamInteger(3, 2)
}
}
public fw_PlayerKilled_Post(iVictim, iAttacker, iShouldGib)
{
if(zp_get_user_zombie(iVictim) && is_user_connected(iAttacker) && g_iPlayersClass[iAttacker] == CLASS_GORE)
{
SetHamParamInteger(3, 2)
}
}
/*
stock fm_get_entity_distance(ent1, ent2)
{
return floatround(fm_entity_range(ent1, ent2))
}
*/
/*
stock Float:fm_entity_range(ent1, ent2) {
new Float:origin1[3], Float:origin2[3];
pev(ent1, pev_origin, origin1);
pev(ent2, pev_origin, origin2);
return get_distance_f(origin1, origin2);
}
*/
/*
stock create_velocity_vector(victim,attacker,Float:velocity[3])
{
if(!zp_get_user_zombie(victim) || !is_user_alive(attacker))
return 0;
new Float:vicorigin[3];
new Float:attorigin[3];
entity_get_vector(victim , EV_VEC_origin , vicorigin);
entity_get_vector(attacker , EV_VEC_origin , attorigin);
new Float:origin2[3]
origin2[0] = vicorigin[0] - attorigin[0];
origin2[1] = vicorigin[1] - attorigin[1];
new Float:largestnum = 0.0;
if(floatabs(origin2[0])>largestnum) largestnum = floatabs(origin2[0]);
if(floatabs(origin2[1])>largestnum) largestnum = floatabs(origin2[1]);
origin2[0] /= largestnum;
origin2[1] /= largestnum;
velocity[0] = ( origin2[0] * 30000 ) / get_entity_distance(victim , attacker);
velocity[1] = ( origin2[1] * 30000 ) / get_entity_distance(victim , attacker);
if(velocity[0] <= 20.0 || velocity[1] <= 20.0)
velocity[2] = random_float(200.0 , 275.0);
return 1;
}
*/
/*
public FM_Touch_hook(weaponbox,id)
{
if(is_user_alive(id) && !is_user_bot(id) && g_iPlayersClass[id] == CLASS_COLLECT && pev_valid(weaponbox) && !zp_get_user_nemesis(id) && !zp_get_user_survivor(id) && !zp_get_user_zombie(id))
{
static classname[64], trash[4]
pev(weaponbox,pev_classname,classname,63)
if(equali(classname,"weaponbox"))
{
pev(weaponbox,pev_model,classname,63)
replace(classname,63,"w_"," ")
replace(classname,63,".mdl","")
strbreak(classname,trash,3,classname,63)
format(classname,63,"weapon_%s",classname)
new ent = engfunc(EngFunc_FindEntityByString,g_iMaxPlayers,"classname",classname)
while(ent && pev_valid(ent))
{
if(pev(ent,pev_owner)==weaponbox)
{
give_item(id,classname)
static classname2[32]
pev(ent,pev_classname,classname2,31)
if(pev_valid(weaponbox)) engfunc(EngFunc_RemoveEntity,weaponbox)
if(pev_valid(ent)) engfunc(EngFunc_RemoveEntity,ent)
}
ent = engfunc(EngFunc_FindEntityByString,ent,"classname",classname)
}
}
}
}
*/
public client_putinserver(id)
{
areantiflash[id] = 0
got_class[id] = false
afostdezinfectat[id] = 0
g_iPlayersClass[id] = NO_CLASS
}
public client_disconnect(id)
{
areantiflash[id] = 0
got_class[id] = false
afostdezinfectat[id] = 0
g_iPlayersClass[id] = NO_CLASS
}