Plugin Available [ReQ] New Idea (Armor)

Unpaid Requests, Public Plugins
czirimbolo
Veteran Member
Veteran Member
Poland
Posts: 561
Joined: 3 Years Ago
Has thanked: 20 times
Been thanked: 2 times
Contact:

Re: [ReQ] New Idea (Armor)

#21

Post by czirimbolo » 1 Year 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: 220
Joined: 3 Years Ago
Has thanked: 14 times
Been thanked: 8 times
Age: 20
Contact:

#22

Post by sPe3doN » 1 Year Ago

czirimbolo wrote:
1 Year 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;
}

czirimbolo
Veteran Member
Veteran Member
Poland
Posts: 561
Joined: 3 Years Ago
Has thanked: 20 times
Been thanked: 2 times
Contact:

#23

Post by czirimbolo » 1 Year Ago

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

User avatar
Raheem
Mod Developer
Mod Developer
Egypt
Posts: 2016
Joined: 3 Years Ago
Location: Egypt
Has thanked: 34 times
Been thanked: 115 times
Age: 22
Contact:

#24

Post by Raheem » 1 Year 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
    }
Loading Raheem's signature, Please wait...
Image

czirimbolo
Veteran Member
Veteran Member
Poland
Posts: 561
Joined: 3 Years Ago
Has thanked: 20 times
Been thanked: 2 times
Contact:

#25

Post by czirimbolo » 1 Year 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
Mohamed Alaa
Mod Developer
Mod Developer
Egypt
Posts: 651
Joined: 3 Years Ago
Location: Egypt
Has thanked: 35 times
Been thanked: 51 times
Age: 20
Contact:

#26

Post by Mohamed Alaa » 1 Year Ago

czirimbolo wrote:
1 Year 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 web projects.
CS 1.6 hosting: powergamingtech.com

czirimbolo
Veteran Member
Veteran Member
Poland
Posts: 561
Joined: 3 Years Ago
Has thanked: 20 times
Been thanked: 2 times
Contact:

#27

Post by czirimbolo » 1 Year Ago

Working fine! THanks
Image

DeVil_Raghav
Member
Member
India
Posts: 8
Joined: 2 Weeks Ago
Has thanked: 2 times
Been thanked: 0
Contact:

#28

Post by DeVil_Raghav » 2 Weeks Ago

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

User avatar
Mohamed Alaa
Mod Developer
Mod Developer
Egypt
Posts: 651
Joined: 3 Years Ago
Location: Egypt
Has thanked: 35 times
Been thanked: 51 times
Age: 20
Contact:

#29

Post by Mohamed Alaa » 2 Weeks Ago

DeVil_Raghav wrote:
2 Weeks Ago
Hi guys, this plugin is not working with my sv, still get infected by 1 hit
Do you have the required flags?

[ Post made via Android ]
Want your own mod edition? PM me.
Accepting web projects.
CS 1.6 hosting: powergamingtech.com

DeVil_Raghav
Member
Member
India
Posts: 8
Joined: 2 Weeks Ago
Has thanked: 2 times
Been thanked: 0
Contact:

#30

Post by DeVil_Raghav » 1 Week Ago

Mohamed Alaa wrote:
2 Weeks Ago
DeVil_Raghav wrote:
2 Weeks 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

[ Post made via Android ]

Post Reply

Who is online

Users browsing this forum: No registered users and 12 guests