Available [ReQ] New Idea (Armor)

Unpaid Requests, Public Plugins
czirimbolo
Veteran Member
Veteran Member
Poland
Posts: 598
Joined: 7 years ago
Contact:

#21

Post by czirimbolo » 5 years ago

can someone make it working for VIPS only? Because all players have this ARMOR
Image

User avatar
sPe3doN
Senior Member
Senior Member
Algeria
Posts: 258
Joined: 7 years ago
Contact:

#22

Post by sPe3doN » 5 years ago

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;
}
Image

czirimbolo
Veteran Member
Veteran Member
Poland
Posts: 598
Joined: 7 years ago
Contact:

#23

Post by czirimbolo » 5 years ago

Its The same code like before? If yes, its not working
Image

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

#24

Post by Raheem » 5 years ago

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

czirimbolo
Veteran Member
Veteran Member
Poland
Posts: 598
Joined: 7 years ago
Contact:

#25

Post by czirimbolo » 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
Image

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

#26

Post by Night Fury » 5 years ago

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.
Want your own mod edition? PM me.
Accepting private projects.
Discord: Fury#7469
Image

czirimbolo
Veteran Member
Veteran Member
Poland
Posts: 598
Joined: 7 years ago
Contact:

#27

Post by czirimbolo » 5 years ago

Working fine! THanks
Image

DeVil_Raghav
Member
Member
India
Posts: 25
Joined: 3 years ago
Contact:

#28

Post by DeVil_Raghav » 3 years ago

Hi guys, this plugin is not working with my sv, still get infected by 1 hit

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

#29

Post by Night Fury » 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?
Want your own mod edition? PM me.
Accepting private projects.
Discord: Fury#7469
Image

DeVil_Raghav
Member
Member
India
Posts: 25
Joined: 3 years ago
Contact:

#30

Post by DeVil_Raghav » 3 years ago

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

DeVil_Raghav
Member
Member
India
Posts: 25
Joined: 3 years ago
Contact:

#31

Post by DeVil_Raghav » 3 years ago

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 :).

BandiT
Member
Member
Romania
Posts: 59
Joined: 4 years ago
Contact:

#32

Post by BandiT » 3 years ago

I guees is working just with latest version zombie escape 1.5

DeVil_Raghav
Member
Member
India
Posts: 25
Joined: 3 years ago
Contact:

#33

Post by DeVil_Raghav » 3 years ago

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

DeVil_Raghav
Member
Member
India
Posts: 25
Joined: 3 years ago
Contact:

#34

Post by DeVil_Raghav » 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. }

User avatar
z0h1r-LK
Mod Developer
Mod Developer
Morocco
Posts: 477
Joined: 5 years ago
Location: The Red City ❤
Contact:

#35

Post by z0h1r-LK » 3 years ago

Thanks so much for Plugin <3 <3

User avatar
z0h1r-LK
Mod Developer
Mod Developer
Morocco
Posts: 477
Joined: 5 years ago
Location: The Red City ❤
Contact:

#36

Post by z0h1r-LK » 3 years ago

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

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

#37

Post by Night Fury » 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.
Want your own mod edition? PM me.
Accepting private projects.
Discord: Fury#7469
Image

User avatar
z0h1r-LK
Mod Developer
Mod Developer
Morocco
Posts: 477
Joined: 5 years ago
Location: The Red City ❤
Contact:

#38

Post by z0h1r-LK » 3 years ago

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

User avatar
z0h1r-LK
Mod Developer
Mod Developer
Morocco
Posts: 477
Joined: 5 years ago
Location: The Red City ❤
Contact:

#39

Post by z0h1r-LK » 3 years ago

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 !

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 7 guests