- #include <zombie_escape>
- #include <ze_vip>
- // Sound
- new const g_szArmorSound[] = "player/bhit_helmet-1.wav"
- // Cvars
- new g_pCvarArmorAmount
- public plugin_init()
- {
- register_plugin("[ZE] Armor","1.0","Raheem")
- // Cvars
- g_pCvarArmorAmount = register_cvar("ze_human_armor_amount", "100")
- }
- public ze_user_humanized(id)
- {
- set_entvar(id, var_armorvalue, get_pcvar_float(g_pCvarArmorAmount))
- }
- public ze_user_infected_pre(iVictim, iInfector, iDamage)
- {
- if (!(ze_get_vip_flags(id) & VIP_A))
- return HC_CONTINUE;
- if (iInfector != 0)
- {
- new iArmor = floatround(get_entvar(iVictim, var_armorvalue))
- if (iArmor > 0)
- {
- emit_sound(iVictim, CHAN_BODY, g_szArmorSound, 1.0, ATTN_NORM, 0, PITCH_NORM)
- if (iArmor - iDamage > 0)
- {
- set_entvar(iVictim, var_armorvalue, float(iArmor - iDamage))
- }
- else
- {
- set_entvar(iVictim, var_armorvalue, 0.0)
- }
- return HC_SUPERCEDE;
- }
- }
- return HC_CONTINUE;
- }
[ReQ] New Idea (Armor)
-
- Veteran Member
- Posts: 598
- Joined: 7 years ago
- Contact:
can someone make it working for VIPS only? Because all players have this ARMOR
czirimbolo wrote: ↑5 years ago can someone make it working for VIPS only? Because all players have this ARMOR
Code: Select all
#include <ze_vip>
// Sound
new const g_szArmorSound[] = "player/bhit_helmet-1.wav"
// Cvars
new g_pCvarArmorAmount
public plugin_init()
{
register_plugin("[ZE] Armor","1.0","Raheem")
// Cvars
g_pCvarArmorAmount = register_cvar("ze_human_armor_amount", "100")
}
public ze_user_humanized(id)
{
set_entvar(id, var_armorvalue, get_pcvar_float(g_pCvarArmorAmount))
}
public ze_user_infected_pre(iVictim, iInfector, iDamage)
{
if (!(ze_get_vip_flags(id) & VIP_A))
return HC_CONTINUE;
if (iInfector != 0)
{
new iArmor = floatround(get_entvar(iVictim, var_armorvalue))
if (iArmor > 0)
{
emit_sound(iVictim, CHAN_BODY, g_szArmorSound, 1.0, ATTN_NORM, 0, PITCH_NORM)
if (iArmor - iDamage > 0)
{
set_entvar(iVictim, var_armorvalue, float(iArmor - iDamage))
}
else
{
set_entvar(iVictim, var_armorvalue, 0.0)
}
return HC_SUPERCEDE;
}
}
return HC_CONTINUE;
}
-
- Veteran Member
- Posts: 598
- Joined: 7 years ago
- Contact:
Here:
Code: Select all
#include <zombie_escape> #include <ze_vip> // Sound new const g_szArmorSound[] = "player/bhit_helmet-1.wav" // Cvars new g_pCvarArmorAmount public plugin_init() { register_plugin("[ZE] Armor","1.0","Raheem") // Cvars g_pCvarArmorAmount = register_cvar("ze_human_armor_amount", "100") } public ze_user_humanized(id) { if (ze_get_vip_flags(id) & VIP_A) { set_entvar(id, var_armorvalue, get_pcvar_float(g_pCvarArmorAmount)) } } public ze_user_infected_pre(iVictim, iInfector, iDamage) { if (!(ze_get_vip_flags(iVictim) & VIP_A)) return HC_CONTINUE if (iInfector != 0) { new iArmor = floatround(get_entvar(iVictim, var_armorvalue)) if (iArmor > 0) { emit_sound(iVictim, CHAN_BODY, g_szArmorSound, 1.0, ATTN_NORM, 0, PITCH_NORM) if (iArmor - iDamage > 0) { set_entvar(iVictim, var_armorvalue, float(iArmor - iDamage)) } else { set_entvar(iVictim, var_armorvalue, 0.0) } return HC_SUPERCEDE } } return HC_CONTINUE }
He who fails to plan is planning to fail
-
- Veteran Member
- Posts: 598
- Joined: 7 years ago
- Contact:
I added #include <zombie_escape> but:
/ C:\Users\macie\Desktop\Compiler v1.8.3\scripting\ze_armor.sma(28) : error 017: undefined symbol "id"
//
// 1 Error.
// Could not locate output file compiled\ze_armor.amx (compile failed).
//
// Compilation Time: 0,84 sec
/ C:\Users\macie\Desktop\Compiler v1.8.3\scripting\ze_armor.sma(28) : error 017: undefined symbol "id"
//
// 1 Error.
// Could not locate output file compiled\ze_armor.amx (compile failed).
//
// Compilation Time: 0,84 sec
- Night Fury
- Mod Developer
- Posts: 677
- Joined: 7 years ago
- Contact:
Check the updated code.czirimbolo wrote: ↑5 years ago I added #include <zombie_escape> but:
/ C:\Users\macie\Desktop\Compiler v1.8.3\scripting\ze_armor.sma(28) : error 017: undefined symbol "id"
//
// 1 Error.
// Could not locate output file compiled\ze_armor.amx (compile failed).
//
// Compilation Time: 0,84 sec
-
- Veteran Member
- Posts: 598
- Joined: 7 years ago
- Contact:
-
- Member
- Posts: 25
- Joined: 3 years ago
- Contact:
Hi guys, this plugin is not working with my sv, still get infected by 1 hit
- Night Fury
- Mod Developer
- Posts: 677
- Joined: 7 years ago
- Contact:
Do you have the required flags?DeVil_Raghav wrote: ↑3 years ago Hi guys, this plugin is not working with my sv, still get infected by 1 hit
-
- Member
- Posts: 25
- Joined: 3 years ago
- Contact:
Yes I haveMohamed Alaa wrote: ↑3 years agoDo you have the required flags?DeVil_Raghav wrote: ↑3 years ago Hi guys, this plugin is not working with my sv, still get infected by 1 hit
-
- Member
- Posts: 25
- Joined: 3 years ago
- Contact:
Hi Raheem, bro this plugin is not working with me I have all the requied flags of vip as i am the owner of the sv , I tried to reinstall the plugin but still get infected with one hit, please help .
I guees is working just with latest version zombie escape 1.5
-
- Member
- Posts: 25
- Joined: 3 years ago
- Contact:
-
- Member
- Posts: 25
- Joined: 3 years ago
- Contact:
hello, I have tried installing new version but still get infected with one hit what should I do?
code I use =
when put any player Kevlar + Helmet, and zombies attack for human have 100 AP not infect after become 0 AP
you understand me,i'm weak in english
you understand me,i'm weak in english
- Night Fury
- Mod Developer
- Posts: 677
- Joined: 7 years ago
- Contact:
Just make sure you have the required flags cause it's working fine for me and everyone else using it I think.
If you can, post any errors.
If you can, post any errors.
No Need Flag of VIP, in Zombie Plaguue or Zombie Escape v2.7 any player can pickup Kevlar + Helmet but when zombie damage player (damage is default of knife)Mohamed Alaa wrote: ↑3 years ago Just make sure you have the required flags cause it's working fine for me and everyone else using it I think.
If you can, post any errors.
100 85 70 50 25 0 - infect
it's work very good !DeVil_Raghav wrote: ↑3 years agohello, I have tried installing new version but still get infected with one hit what should I do?
code I use =
#include <zombie_escape> #include <ze_vip> // Sound new const g_szArmorSound[] = "player/bhit_helmet-1.wav" // Cvars new g_pCvarArmorAmount public plugin_init() { register_plugin("[ZE] Armor","1.0","Raheem") // Cvars g_pCvarArmorAmount = register_cvar("ze_human_armor_amount", "100") } public ze_user_humanized(id) { set_entvar(id, var_armorvalue, get_pcvar_float(g_pCvarArmorAmount)) } public ze_user_infected_pre(iVictim, iInfector, iDamage) { if (!(ze_get_vip_flags(id) & VIP_A)) return HC_CONTINUE; if (iInfector != 0) { new iArmor = floatround(get_entvar(iVictim, var_armorvalue)) if (iArmor > 0) { emit_sound(iVictim, CHAN_BODY, g_szArmorSound, 1.0, ATTN_NORM, 0, PITCH_NORM) if (iArmor - iDamage > 0) { set_entvar(iVictim, var_armorvalue, float(iArmor - iDamage)) } else { set_entvar(iVictim, var_armorvalue, 0.0) } return HC_SUPERCEDE; } } return HC_CONTINUE; }
Create an account or sign in to join the discussion
You need to be a member in order to post a reply
Create an account
Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute
Sign in
Who is online
Users browsing this forum: No registered users and 7 guests