Available [ReQ] New Idea (Armor)

Unpaid Requests, Public Plugins
Turnedo
Member
Member
Morocco
Posts: 15
Joined: 6 years ago
Contact:

[ReQ] New Idea (Armor)

#1

Post by Turnedo » 6 years ago

Hi Escapers-Zone DEV team !
I have a nice idea !
Why not add anti-enfection armor ?
Like if a player get armor , the armor must protect him from enfection .
It will be good and help escapers from enfecting by zombies :)

johnnysins2000
Veteran Member
Veteran Member
Paraguay
Posts: 678
Joined: 7 years ago
Location: Paraguay
Contact:

#2

Post by johnnysins2000 » 6 years ago

I already suggested Some Idea like this

But it is a bad idea

Many have requested this


IN Original Ze mod The Ant infection armor does not protect you

Just 1 hit and Boom your infect

So make sure To Fun fast as u can

This idea u suggested will turn the mod to zombie Plague a little
Nobody Is That Busy If They Make Time :roll:

Turnedo
Member
Member
Morocco
Posts: 15
Joined: 6 years ago
Contact:

#3

Post by Turnedo » 6 years ago

Yes , but anti-infection armor help escapers who have !
I think it's a good idea [mention]Raheem[/mention]

User avatar
Raheem
Mod Developer
Mod Developer
Posts: 2214
Joined: 7 years ago
Contact:

#4

Post by Raheem » 6 years ago

Hmm, In ZE Mod the armor is useless not like in ZP.

If you like this so much ok no problem it will need me to edit the core and make new forward it's: player_infected_pre()

And then add the armor system, Ok soon i'll release this edits here.
He who fails to plan is planning to fail

Turnedo
Member
Member
Morocco
Posts: 15
Joined: 6 years ago
Contact:

#5

Post by Turnedo » 6 years ago

Ok Bro <3 !
It's already good idea for help humans escape and protect hem some times !!

User avatar
Raheem
Mod Developer
Mod Developer
Posts: 2214
Joined: 7 years ago
Contact:

#6

Post by Raheem » 6 years ago

Ok, I do it and there is new plugin for this and a edit in the core. This cvar: ze_human_armor_amount 100 tells the amount to be given for all players at round start.

Download:
  • Armor.zip
    [ZE] Armor Protection
    (21.69 KiB) Downloaded 558 times
    Armor.zip
    [ZE] Armor Protection
    (21.69 KiB) Downloaded 558 times
He who fails to plan is planning to fail

johnnysins2000
Veteran Member
Veteran Member
Paraguay
Posts: 678
Joined: 7 years ago
Location: Paraguay
Contact:

#7

Post by johnnysins2000 » 6 years ago

Raheem wrote: 6 years ago Ok, I do it and there is new plugin for this and a edit in the core. This cvar: ze_human_armor_amount 100 tells the amount to be given for all players at round start.

Download:
  • Armor.zip
I think it is better if u can make it for VIPs only

Can u ?
Nobody Is That Busy If They Make Time :roll:

User avatar
Raheem
Mod Developer
Mod Developer
Posts: 2214
Joined: 7 years ago
Contact:

#8

Post by Raheem » 6 years ago

Ok, Here it's now if player have VIP_A he will get the armor and this plugin will apply for him, Means if he is normal player and get armor for example from ground so it will be useless he should have VIP_A flag so it can be effective for him.

Code:
    1. #include <ze_vip>
    2.  
    3. // Sound
    4. new const g_szArmorSound[] = "player/bhit_helmet-1.wav"
    5.  
    6. // Cvars
    7. new g_pCvarArmorAmount
    8.  
    9. public plugin_init()
    10. {
    11.     register_plugin("[ZE] Armor","1.0","Raheem")
    12.    
    13.     // Cvars
    14.     g_pCvarArmorAmount = register_cvar("ze_human_armor_amount", "100")
    15. }
    16.  
    17. public ze_user_humanized(id)
    18. {
    19.     set_entvar(id, var_armorvalue, get_pcvar_float(g_pCvarArmorAmount))
    20. }
    21.  
    22. public ze_user_infected_pre(iVictim, iInfector, iDamage)
    23. {
    24.     if (!(ze_get_vip_flags(id) & VIP_A))
    25.         return HC_CONTINUE;
    26.    
    27.     if (iInfector != 0)
    28.     {
    29.         new iArmor = floatround(get_entvar(iVictim, var_armorvalue))
    30.        
    31.         if (iArmor > 0)
    32.         {
    33.             emit_sound(iVictim, CHAN_BODY, g_szArmorSound, 1.0, ATTN_NORM, 0, PITCH_NORM)
    34.            
    35.             if (iArmor - iDamage > 0)
    36.             {
    37.                 set_entvar(iVictim, var_armorvalue, float(iArmor - iDamage))
    38.             }
    39.             else
    40.             {
    41.                 set_entvar(iVictim, var_armorvalue, 0.0)
    42.             }
    43.            
    44.             return HC_SUPERCEDE;
    45.         }
    46.     }
    47.    
    48.     return HC_CONTINUE;
    49. }
He who fails to plan is planning to fail

User avatar
Spir0x
Veteran Member
Veteran Member
Tunisia
Posts: 641
Joined: 7 years ago
Location: Tunisia
Contact:

#9

Post by Spir0x » 6 years ago

Raheem this armor auto for vips or will appear in buy menu ?

User avatar
Raheem
Mod Developer
Mod Developer
Posts: 2214
Joined: 7 years ago
Contact:

#10

Post by Raheem » 6 years ago

Auto
He who fails to plan is planning to fail

Dark Shadow
Member
Member
India
Posts: 12
Joined: 6 years ago
Contact:

#11

Post by Dark Shadow » 6 years ago

Hi ZE DEV TEAM i am getting error with this plugin cant compile this plugin for vips only can anyone compile that plugin for me :)

User avatar
Spir0x
Veteran Member
Veteran Member
Tunisia
Posts: 641
Joined: 7 years ago
Location: Tunisia
Contact:

#12

Post by Spir0x » 6 years ago

Take:

just dont forget the plugin includes and vip include.

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_select_item_pre(id, itemid) 
{
    // Player Not VIP?
    if (!(ze_get_vip_flags(id) & VIP_A))
        return PLUGIN_HANDLED
   
}

public ze_user_infected_pre(iVictim, iInfector, iDamage)
{
	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;
}

Dark Shadow
Member
Member
India
Posts: 12
Joined: 6 years ago
Contact:

#13

Post by Dark Shadow » 6 years ago

SORRY BUT ITS NOT WORKING AT ALL ARMOR IS COMING BUT STILL WE GET INFECTED

User avatar
Spir0x
Veteran Member
Veteran Member
Tunisia
Posts: 641
Joined: 7 years ago
Location: Tunisia
Contact:

#14

Post by Spir0x » 6 years ago

Then it's not my fault or code.. speak with raheem he created this plugin i just converted it to only vips.

User avatar
Night Fury
Mod Developer
Mod Developer
Posts: 677
Joined: 7 years ago
Contact:

#15

Post by Night Fury » 6 years ago

Armor wasn't included in the mod. This plugin just adds armor amount but it has no effect. If you want armor to be effective, you need to edit ze_core. If the hit function, before turning the player into zombie, check the victim has any armor value. If the vicitim has, easily decrease it. Then check if there is no armor (armor = 0), INFECT! MOHA..
Want your own mod edition? PM me.
Accepting private projects.
Discord: Fury#7469
Image

User avatar
Raheem
Mod Developer
Mod Developer
Posts: 2214
Joined: 7 years ago
Contact:

#16

Post by Raheem » 6 years ago

Jack GamePlay wrote: 6 years ago Armor wasn't included in the mod. This plugin just adds armor amount but it has no effect. If you want armor to be effective, you need to edit ze_core. If the hit function, before turning the player into zombie, check the victim has any armor value. If the vicitim has, easily decrease it. Then check if there is no armor (armor = 0), INFECT! MOHA..
This forward: ze_user_infected_pre(iVictim, iInfector, iDamage) already included in 1.2 version. So you can hook pre infection and know also damage so this is used in this plugin i write... :shock: :o :D
He who fails to plan is planning to fail

karan
Mod Tester
Mod Tester
India
Posts: 122
Joined: 6 years ago
Location: India
Contact:

#17

Post by karan » 5 years ago

hello ZE DEV TEAM we are getting problem with this plugins since we updated the mod to 1.3 players who has armor getting killed any solution
Image

User avatar
Raheem
Mod Developer
Mod Developer
Posts: 2214
Joined: 7 years ago
Contact:

#18

Post by Raheem » 5 years ago

Oh, i forget something. I'll update the V1.3 with 2 fixes soon.
He who fails to plan is planning to fail

User avatar
Raheem
Mod Developer
Mod Developer
Posts: 2214
Joined: 7 years ago
Contact:

#19

Post by Raheem » 5 years ago

karan wrote: 5 years ago hello ZE DEV TEAM we are getting problem with this plugins since we updated the mod to 1.3 players who has armor getting killed any solution
Fixed, please update your core with latest one here: viewtopic.php?f=6&t=6

Thank you for reporting this.
He who fails to plan is planning to fail

karan
Mod Tester
Mod Tester
India
Posts: 122
Joined: 6 years ago
Location: India
Contact:

#20

Post by karan » 5 years ago

:D
Image

Post Reply

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

Register

Sign in

Who is online

Users browsing this forum: No registered users and 5 guests