Thread: [Subplugin Submission] [ZP] Extra Item:Snark Infector (UPDATE 14.06.09)
View Single Post
zhulo
Senior Member
Join Date: Jun 2010
Location: Slovakia
Old 03-05-2012 , 15:20   Re: [ZP] Extra Item:Snark Infector (UPDATE 14.06.09)
Reply With Quote #386

In the first place, the entity should be the flashbang (becouse the hegrenade is already defined as infection bomb and it could make some problems togeather)

PHP Code:
new const gWeaponCommand [] = "weapon_flashbang";
new const 
gWeaponIndex      CSW_FLASHBANG
2. All the snarks should be removed on round end, becoude there were crash on the new round when the snark was still on the map

PHP Code:
public zp_round_ended(){
    new 
Snark = -1;
        
    while ( ( 
Snark find_ent_by_classSnarkgSnarkClassName ) ) != NULL_ENT )
    {
        
CSqueak_Killed Snark0false );
    }
        
    for ( new 
Player 1Player <= gMaxClientsPlayer++ )
    {
        
CheckAndRemoveWeapon Player );
        
gHasSnarkPlayer } = false;
    }

3.

PHP Code:
public fw_PlayerKilled(victimattackershouldgib)
{
    
//player die
    
is_alive[victim] = false
    
    
if (gHasSnark    victim })
        
CheckAndRemoveWeapon victim ); 
    
    
gHasSnark    victim } = false;
    
gWeaponActivevictim } = false;
    
gJustThrown  victim } = false;
    
gPlayerAmmo  victim } = get_pcvar_numpCvarAmmo );

3. This should be removed (the whole radius damage in the plugin, it caused some problems...) :

PHP Code:
stock UTIL_RadiusDamage 
I solved this plugin for about a year ago and I do not remember exactly how it was, but the things I wrote here, should be helpful.
zhulo is offline
Send a message via ICQ to zhulo Send a message via Skype™ to zhulo