Raised This Month: $51 Target: $400
 12% 

Grenade no effect if armor is above 500


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
HowToRuski
Senior Member
Join Date: Feb 2019
Location: Hungary
Old 04-07-2021 , 11:31   Grenade no effect if armor is above 500
Reply With Quote #1

Hello, so i cant figure it out how do i make that if armor is above 500 the infection bomb wont do anything to a player. Also the glow doesnt seem to appear for me... What im doing wrong? Can someone help? Thanks in advance.

Infection grenade -
PHP Code:
while ((victim engfunc(EngFunc_FindEntityInSpherevictimoriginFNADE_EXPLOSION_RADIUS)) != 0)
    {
        
// Only effect alive non-spawnprotected humans
        
if (!is_user_valid_alive(victim) || g_zombie[victim] || g_nodamage[victim])
            continue;
            
        static 
Float:armor
        pev
(victimpev_armorvaluearmor)
        
        
// If he has above 500 reduce it - it also infects a player with it, idk why
        
if (get_user_armor(victim) <= 500)
        {
        
set_pev(victimpev_armorvaluefloat(min(pev(victimpev_armorvalue)-5000)))
        
fm_set_rendering(victimkRenderFxGlowShell02550kRenderNormal25);
        
set_task(5.0"remove_armor_glow"victim__"b")
        }
            
        
        
/* Last human is killed
        if (fnGetHumans() == 1)
        {
            ExecuteHamB(Ham_Killed, victim, attacker, 0)
            continue;
        }*/
        
        // Infected victim's sound
        
ArrayGetString(grenade_infect_playerrandom_num(0ArraySize(grenade_infect_player) - 1), soundcharsmax(sound))
        
emit_sound(victimCHAN_VOICEsound1.0ATTN_NORM0PITCH_NORM)
        
        
// Turn into zombie
        
zombieme(victimattacker0011)
    } 
Here is the glow what should appear but it doesnt.
PHP Code:
public remove_armor_glow(id)
{
        
fm_set_rendering(idkRenderFxGlowShell000kRenderNormal25);


Last edited by HowToRuski; 04-07-2021 at 11:32.
HowToRuski is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 19:44.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode