Page 2 of 2

Re: [ReQ] New Idea (Armor)

Posted: 15 Aug 2018, 19:05
by czirimbolo
can someone make it working for VIPS only? Because all players have this ARMOR

Re: [ReQ] New Idea (Armor)

Posted: 15 Aug 2018, 21:19
by sPe3doN
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;
}

Re: [ReQ] New Idea (Armor)

Posted: 15 Aug 2018, 22:02
by czirimbolo
Its The same code like before? If yes, its not working

Re: [ReQ] New Idea (Armor)

Posted: 15 Aug 2018, 23:30
by Raheem
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
    }

Re: [ReQ] New Idea (Armor)

Posted: 16 Aug 2018, 09:42
by czirimbolo
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

Re: [ReQ] New Idea (Armor)

Posted: 16 Aug 2018, 10:57
by Night Fury
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
Check the updated code.

Re: [ReQ] New Idea (Armor)

Posted: 16 Aug 2018, 15:58
by czirimbolo
Working fine! THanks

Re: [ReQ] New Idea (Armor)

Posted: 28 Jun 2020, 12:00
by DeVil_Raghav
Hi guys, this plugin is not working with my sv, still get infected by 1 hit

Re: [ReQ] New Idea (Armor)

Posted: 28 Jun 2020, 18:30
by Night Fury
DeVil_Raghav wrote: 3 years ago Hi guys, this plugin is not working with my sv, still get infected by 1 hit
Do you have the required flags?

Re: [ReQ] New Idea (Armor)

Posted: 29 Jun 2020, 14:07
by DeVil_Raghav
Mohamed Alaa wrote: 3 years ago
DeVil_Raghav wrote: 3 years ago Hi guys, this plugin is not working with my sv, still get infected by 1 hit
Do you have the required flags?
Yes I have

Re: [ReQ] New Idea (Armor)

Posted: 03 Jul 2020, 11:36
by DeVil_Raghav
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 :P, I tried to reinstall the plugin but still get infected with one hit, please help :).

Re: [ReQ] New Idea (Armor)

Posted: 05 Jul 2020, 12:42
by BandiT
I guees is working just with latest version zombie escape 1.5

Re: [ReQ] New Idea (Armor)

Posted: 07 Jul 2020, 13:06
by DeVil_Raghav
BandiT wrote: 3 years ago I guees is working just with latest version zombie escape 1.5
Ohk, thanks bro I will try to install new version

Re: [ReQ] New Idea (Armor)

Posted: 11 Jul 2020, 14:11
by DeVil_Raghav
BandiT wrote: 3 years ago I guees is working just with latest version zombie escape 1.5
hello, I have tried installing new version but still get infected with one hit what should I do?

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

Re: [ReQ] New Idea (Armor)

Posted: 15 Jul 2020, 16:55
by z0h1r-LK
Thanks so much for Plugin <3 <3

Re: [ReQ] New Idea (Armor)

Posted: 15 Jul 2020, 17:01
by z0h1r-LK
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 :D

Re: [ReQ] New Idea (Armor)

Posted: 17 Jul 2020, 19:44
by Night Fury
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.

Re: [ReQ] New Idea (Armor)

Posted: 18 Jul 2020, 14:17
by z0h1r-LK
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.
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)
100 85 70 50 25 0 - infect

Re: [ReQ] New Idea (Armor)

Posted: 18 Jul 2020, 15:46
by z0h1r-LK
DeVil_Raghav wrote: 3 years ago
BandiT wrote: 3 years ago I guees is working just with latest version zombie escape 1.5
hello, I have tried installing new version but still get infected with one hit what should I do?

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