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

ZP50 Trigger round end


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
lolol3412
Junior Member
Join Date: Feb 2024
Old 02-28-2024 , 10:53   ZP50 Trigger round end
Reply With Quote #1

hey ive encountered some problems with zp50, i changed last human to be infected instead of killed and the gamemode is not ending i even tried to force trigger without success
i want last human after infection round to be ended
heres that part of the code (it's default)

PHP Code:
// Ham Take Damage Forward (needed to block explosion damage too)
public fw_TakeDamage(victiminflictorattackerFloat:damagedamage_type)
{
    
// Non-player damage or self damage
    
if (victim == attacker || !is_user_alive(attacker))
        return 
HAM_IGNORED;
    
    
// Prevent attacks when no game mode is active
    
if (g_CurrentGameMode == ZP_NO_GAME_MODE)
        return 
HAM_SUPERCEDE;
    
    
// Prevent friendly fire
    
if (zp_core_is_zombie(attacker) == zp_core_is_zombie(victim))
        return 
HAM_SUPERCEDE;
    
    
// Mode allows infection and zombie attacking human...
    
if (g_AllowInfection && zp_core_is_zombie(attacker) && !zp_core_is_zombie(victim))
    {
        
// Prevent infection/damage by HE grenade (bugfix)
        
if (damage_type DMG_HEGRENADE)
            return 
HAM_SUPERCEDE;
        
        
// Last human is killed to trigger round end
        
if (zp_core_get_human_count() == 1)
            return 
HAM_IGNORED;
        
        
// Infect only if damage is done to victim
        
if (damage 0.0 && GetHamReturnStatus() != HAM_SUPERCEDE)
        {
            
// Infect victim!
            
zp_core_infect(victimattacker)
            return 
HAM_SUPERCEDE;
        }
    }
    
    return 
HAM_IGNORED;

Attached Files
File Type: sma Get Plugin or Get Source (zp50_gamemodes.sma - 16 views - 16.6 KB)
lolol3412 is offline
georgik57
Veteran Member
Join Date: Oct 2008
Location: 🎧Music World
Old 03-05-2024 , 13:33   Re: ZP50 Trigger round end
Reply With Quote #2

Easy method can be done with Orpheu or with sv_restart and restoring the scores after.
Hard method is triggering a round winning game event manually.
__________________
georgik57 is offline
Send a message via MSN to georgik57 Send a message via Yahoo to georgik57 Send a message via Skype™ to georgik57
lolol3412
Junior Member
Join Date: Feb 2024
Old 03-07-2024 , 09:56   Re: ZP50 Trigger round end
Reply With Quote #3

other than orpheu ?
i dont wanna use that engine
lolol3412 is offline
Reply



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 03:14.


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