I made this plugin who is so much users/members needs it
Thanks to Raheem and Jack , They helped me so much <3
Commands:
- The commands are just a Longjump(Leap Jump) For The Nemesis
- /*
- Version 1.1:
- What is News ?
- 1- Added Lonjump Plugin To Nemsesis Zombies
- 2- The Nemesis round now is in the last round
- 3- Fixed Bugs & Some Problems
- And Special thanks to Jack Gameplay
- */
- #include <zombie_escape>
- new MaxRounds
- new RoundCount
- new g_maxplayers
- native give_longjump(id)
- new const v_model[] = "models/zombie_escape/Nemesis_Claws.mdl"
- new const g_szNemsisModel[] = "Nemesis_Zombie"
- public plugin_init()
- {
- register_plugin("[ZE] Nemsis round", "1.1", "Kaya Gaming")
- register_event("TextMsg", "new_map_or_restart", "a", "2&#Game_C", "2&#Game_w")
- MaxRounds = get_cvar_pointer("mp_maxrounds")
- g_maxplayers = get_maxplayers()
- }
- public plugin_precache()
- {
- new szModelPath[32]
- precache_model(v_model)
- formatex(szModelPath, charsmax(szModelPath), "models/player/%s/%s.mdl", g_szNemsisModel, g_szNemsisModel)
- precache_model(szModelPath)
- }
- public ze_roundend()
- {
- RoundCount++
- }
- public new_map_or_restart()
- {
- RoundCount = 0
- }
- public ze_zombie_appear(id)
- {
- if(get_pcvar_num(MaxRounds) - RoundCount == 1)
- {
- set_task(0.01, "models", id)
- claws_model(id)
- messages(id)
- give_longjump(id)
- }
- }
- public ze_user_infected_pre(iVictim, iInfector, iDamage)
- {
- if(get_pcvar_num(MaxRounds) - RoundCount != 1)
- return
- new g_attacker = read_data(1);
- new g_victim = read_data(2);
- if(g_victim != g_attacker && ze_is_user_zombie(g_attacker))
- {
- set_task(0.01, "kill_no_infect", g_victim)
- return 1;
- }
- }
- public kill_no_infect(id)
- {
- user_silentkill(id)
- }
- public models(id)
- {
- if(ze_is_user_zombie(id) && get_pcvar_num(MaxRounds) - RoundCount == 1)
- {
- rg_reset_user_model(id)
- rg_set_user_model(id, g_szNemsisModel)
- }
- }
- public messages(id)
- {
- PlaySound(id, "zombie_escape/Nemesis_scream.wav")
- }
- public claws_model(id)
- {
- if(get_pcvar_num(MaxRounds) - RoundCount == 1 && get_user_weapon(id) == CSW_KNIFE && ze_is_user_zombie(id))
- {
- rg_give_item(id, "weapon_knife")
- set_pev(id, pev_viewmodel2, v_model)
- set_pev(id, pev_weaponmodel2, "")
- }
- }
- #include <zombie_escape>
- #define PLUGIN "[ZE] Extra Item:Leap"
- #define VERSION "1.5.7"
- #define AUTHOR "Fry!"
- /*================================================================================
- [Plugin Customization]
- =================================================================================*/
- new bool:g_hasLongJump[33],g_SayText
- new Float:g_last_LongJump_time[33]
- new g_LongJump_force, g_LongJump_height, g_LongJump_cooldown
- public plugin_init()
- {
- register_plugin(PLUGIN, VERSION, AUTHOR)
- register_cvar("ze_leap",VERSION,FCVAR_SERVER|FCVAR_EXTDLL|FCVAR_UNLOGGED|FCVAR_SPONLY)
- g_LongJump_force = register_cvar("ze_longjump_force", "580")
- g_LongJump_height = register_cvar("ze_longjump_height", "320")
- g_LongJump_cooldown = register_cvar("ze_longjump_cooldown", "10.0")
- register_forward(FM_PlayerPreThink, "fw_PlayerPreThink")
- register_event("DeathMsg", "death", "a")
- register_event("HLTV", "event_round_start", "a", "1=0", "2=0")
- g_SayText = get_user_msgid("SayText")
- }
- public plugin_natives()
- {
- register_native("give_longjump","native_give_longjump",1)
- }
- public native_give_longjump(id)
- {
- if(ze_is_user_zombie(id))
- {
- g_hasLongJump[id] = true
- }
- else
- {
- g_hasLongJump[id] = false
- }
- }
- stock 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")
- message_begin(MSG_ONE_UNRELIABLE, g_SayText, _, id)
- write_byte(id)
- write_string(msg)
- message_end()
- }
- // Reset on disconnection
- public client_disconnected(id)
- {
- g_hasLongJump[id] = false
- }
- // Reset on death
- public death()
- {
- g_hasLongJump[read_data(2)] = false
- }
- // Reset if turned into human
- public ze_user_humanized(id)
- {
- g_hasLongJump[id] = false
- }
- // Reset at round start (for everyone)
- public event_round_start()
- {
- for (new i = 1; i <= 32; i++)
- g_hasLongJump[i] = false
- }
- public fw_PlayerPreThink(id)
- {
- if (!is_user_alive(id))
- return FMRES_IGNORED
- if (allow_LongJump(id))
- {
- static Float:velocity[3]
- velocity_by_aim(id, get_pcvar_num(g_LongJump_force), velocity)
- velocity[2] = get_pcvar_float(g_LongJump_height)
- set_pev(id, pev_velocity, velocity)
- g_last_LongJump_time[id] = get_gametime()
- }
- return FMRES_IGNORED
- }
- // Check if the player can longjump
- allow_LongJump(id)
- {
- if (!g_hasLongJump[id])
- return false
- if (!(pev(id, pev_flags) & FL_ONGROUND) || fm_get_speed(id) < 80)
- return false
- static buttons
- buttons = pev(id, pev_button)
- if (!is_user_bot(id) && (!(buttons & IN_JUMP) || !(buttons & IN_DUCK)))
- return false
- if (get_gametime() - g_last_LongJump_time[id] < get_pcvar_float(g_LongJump_cooldown))
- return false
- if(g_last_LongJump_time[id] == get_pcvar_float(g_LongJump_cooldown))
- {
- client_print(id,print_chat,"[ZE] You can use the Leap Jump now.")
- return true
- }
- return true
- }
- // Get entity's speed (from fakemeta_util)
- stock fm_get_speed(entity)
- {
- static Float:velocity[3]
- pev(entity, pev_velocity, velocity)
- return floatround(vector_length(velocity))
- }