AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Zombie Plague Mod (https://forums.alliedmods.net/forumdisplay.php?f=126)
-   -   Subplugin Submission [T] List of Modified + Requested Plugins (https://forums.alliedmods.net/showthread.php?t=243959)

zmd94 01-31-2016 05:34

Re: [T] List of Modified + Requested Plugins
 
Nice. ;)

ifx 02-20-2016 05:12

Re: [ZP] List of Modified + Requested Plugin (16/10/2014)
 
Quote:

Originally Posted by zmd94 (Post 2213815)
New update!

[ZP] Addon: Frag Leader.

There are 2 types of frag leader plugin:

1. ap_leader_v2.sma will give AP bonus to the frag leader at every end of the round.

2. ap_leader_v3.sma will give AP bonus to the frag leader at every end of the map.

What can you edit:
PHP Code:

    cvar_bonus register_cvar("zp_leader_bonus""1"// Enable the bonus for the frag leader
    
cvar_apamount register_cvar("zp_ap_amount""10"// Amount of AP given to the frag leader 


hello my friend. thanx u so much for ur plugins!

i have one little problem with it. can u make small change, that ammo pack gives not the frag leader but most dmg dealer at the end of the every current round?

cause in our server we have some players, who have top frags in scoreboard and they can just stand idle and give ammopack on every round, cause they already top frags

or change system that should give ammopacks not the top frag leader at all to the top frag leader in every current round.

thankx so much! <3

ps. we use zp 4.3

plazma 02-20-2016 19:16

Re: [T] List of Modified + Requested Plugins
 
Quote:

Originally Posted by plazma
I want to kill humans when touch it, not only last human, understand? no infection humans only kill.

thanks :)

PHP Code:

// Infection Bomb Explosion
infection_explode(ent)
{
    
// Round ended (bugfix)
    
if (g_endround) return;
    
    
// Get origin
    
static Float:originF[3]
    
pev(entpev_originoriginF)
    
    
// Make the explosion
    
create_blast(originF)
    
    
// Infection nade explode sound
    
static sound[64]
    
ArrayGetString(grenade_infectrandom_num(0ArraySize(grenade_infect) - 1), soundcharsmax(sound))
    
emit_sound(entCHAN_WEAPONsound1.0ATTN_NORM0PITCH_NORM)
    
    
// Get attacker
    
static attacker
    attacker 
pev(entpev_owner)
    
    
// Collisions
    
static victim
    victim 
= -1
    
    
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;
        
        
// Last human is killed
        
if (fnGetHumans() == 1)
        {
            
ExecuteHamB(Ham_Killedvictimattacker0)
            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(victimattacker0110)
    }
    
    
// Get rid of the grenade
    
engfunc(EngFunc_RemoveEntityent)




zmd94 02-24-2016 04:46

Re: [T] List of Modified + Requested Plugins
 
So, problem solved?

plazma 02-24-2016 18:32

Re: [T] List of Modified + Requested Plugins
 
Quote:

Originally Posted by zmd94 (Post 2396220)
So, problem solved?

No but i want to make it what I say in last post.

zmd94 02-25-2016 22:49

Re: [T] List of Modified + Requested Plugins
 
Plazma, just change below:
Code:

    while ((victim = engfunc(EngFunc_FindEntityInSphere, victim, originF, NADE_EXPLOSION_RADIUS)) != 0)
    {
        // Only effect alive non-spawnprotected humans
        if (!is_user_valid_alive(victim) || g_zombie[victim] || g_nodamage[victim])
            continue;
       
        // Last human is killed
        if (fnGetHumans() == 1)
        {
            ExecuteHamB(Ham_Killed, victim, attacker, 0)
            continue;
        }
       
        // Infected victim's sound
        ArrayGetString(grenade_infect_player, random_num(0, ArraySize(grenade_infect_player) - 1), sound, charsmax(sound))
        emit_sound(victim, CHAN_VOICE, sound, 1.0, ATTN_NORM, 0, PITCH_NORM)
       
        // Turn into zombie
        zombieme(victim, attacker, 0, 1, 1, 0)
    }

-->
Code:

    while ((victim = engfunc(EngFunc_FindEntityInSphere, victim, originF, NADE_EXPLOSION_RADIUS)) != 0)
    {
        // Only effect alive non-spawnprotected humans
        if (!is_user_valid_alive(victim) || g_zombie[victim] || g_nodamage[victim])
            continue;
       
        ExecuteHamB(Ham_Killed, victim, attacker, 0)
    }

Ifx, just try below code:
Code:

#include <amxmodx>
#include <zombieplague>
#include <hamsandwich>
#include <cstrike>

new cvar_bonus, cvar_apamount
new iMaxPlayers

new Float:g_fValue[33]

public plugin_init()
{
    register_plugin("[ZP] Addon: Frag Leader", "1.0", "Kis2e")
   
    cvar_bonus = register_cvar("zp_leader_bonus", "1") // Enable the bonus for the frag leader
    cvar_apamount = register_cvar("zp_ap_amount", "10") // Amount of AP given to the frag leader
   
    RegisterHam(Ham_TakeDamage, "player", "fw_TakeDamage")
   
    iMaxPlayers = get_maxplayers()
}

public zp_round_ended()
{
    set_task(0.1, "iLeader")
}

public fw_TakeDamage(Victim, Inflictor, Attacker, Float:Values, Values_bits)
{
    if(is_user_alive(Attacker) && !zp_get_user_zombie(Attacker))
    {
        g_fValue[Attacker] += Values   
    }
}

public iLeader()
{
    new iFrags
    new iLeader = GetLeader_Frags(iFrags)
    new Players = UsersGetPlaying()
    new iPlayers[32], iNum, Others
    new szName[32]
    get_user_name( iLeader, szName, 31 )
    get_players( iPlayers, iNum, "ch" )

    for ( new i = 0; i < iNum; i++ )
        Others = g_fValue[i]
       
    if ( Players == 0 )
        return;
           
    else if ( iFrags == Others )
        return;
           
    else
       
    set_hudmessage(random_num(10,255), random(256), random(256), -1.0, 0.20, 0, 6.0, 12.0, 0.0, 0.0, -1)
    show_hudmessage(0, "The damage leader is %s with %.f damage", szName, iFrags )
       
    if ( get_pcvar_num(cvar_bonus) )
    {
        zp_set_user_ammo_packs(iLeader, zp_get_user_ammo_packs(iLeader) + get_pcvar_num(cvar_apamount))
        client_print(iLeader, print_chat, "[ZP] %s, you have recieved %d AP bonus as the frags leader", szName, get_pcvar_num(cvar_apamount))
    }
   
    new id
    for ( id = 1; id <= iMaxPlayers; id++ )
    {
        if ( is_user_connected(id) )
        {
            g_fValue[id] = 0
        }
    }
}

GetLeader_Frags( &iFrags )
{
    new iPlayers[32], iNum, id, i, iLeader, iFrag
    get_players( iPlayers, iNum, "ch" )
   
    for ( i = 0; i < iNum; i++ )
    {
        id = iPlayers[i]
        iFrag = g_fValue[id]
       
        if ( iFrag > iFrags )
        {
            iFrags = iFrag
            iLeader = id
        }
    }
    return iLeader;
}

UsersGetPlaying()
{
    static iPlaying, id
    iPlaying = 0
   
    for ( id = 1; id <= iMaxPlayers; id++ )
    {
        if ( is_user_connected(id) )
        {
            if ( get_user_team(id) == 1 || get_user_team(id) == 2 )
                iPlaying++
        }
    }
   
    return iPlaying;
}


sayantan 04-17-2018 12:50

Re: [ZP] List of Modified + Requested Plugin (12/9/2014)
 
where i need to reput this?

zmd94 05-05-2018 23:19

Re: [T] List of Modified + Requested Plugins
 
Report what?


All times are GMT -4. The time now is 15:12.

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