AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Zombie Count (https://forums.alliedmods.net/showthread.php?t=338189)

ALonsoVIP4141 06-15-2022 18:00

Zombie Count
 
Hello ,
I want to know how to quantify the amount of first zombie in zombie plague 5.0 + the nemesis count


For example:
if members is 32/32. turn 4 nemesis or 4 zombies or with %

Supremache 06-15-2022 18:29

Re: Zombie Count
 
Quote:

Originally Posted by ALonsoVIP4141 (Post 2781749)
Hello ,
I want to know how to quantify the amount of first zombie in zombie plague 5.0 + the nemesis count


For example:
if members is 32/32. turn 4 nemesis or 4 zombies or with %

Try to create custom stock like this:
PHP Code:

GetZombieNum( )
{
    new 
iPlayer32 ], iNumiCount;
    
get_playersiPlayeriNum )
    
    for( new 
iiNumi++ )
    {
        if( 
NativeofZombie) )
        {
            
iCount++;
        }
    }
    
    return 
iCount;



ALonsoVIP4141 06-15-2022 18:41

Re: Zombie Count
 
Quote:

Originally Posted by Supremache (Post 2781750)
Try to create custom stock like this:
PHP Code:

GetZombieNum( )
{
    new 
iPlayer32 ], iNumiCount;
    
get_playersiPlayeriNum )
    
    for( new 
iiNumi++ )
    {
        if( 
NativeofZombie) )
        {
            
iCount++;
        }
    }
    
    return 
iCount;




I DON'T KNOW HOW TO DO IT :)
Explain more if you want and its like multi infection :)

lexzor 06-15-2022 19:11

Re: Zombie Count
 
Quote:

Originally Posted by Supremache (Post 2781750)
Try to create custom stock like this:
PHP Code:

GetZombieNum( )
{
    new 
iPlayer32 ], iNumiCount;
    
get_playersiPlayeriNum )
    
    for( new 
iiNumi++ )
    {
        if( 
NativeofZombie) )
        {
            
iCount++;
        }
    }
    
    return 
iCount;



i don t think someone could explain more than that. if that is a request, post it in the specific forum

Supremache 06-16-2022 09:06

Re: Zombie Count
 
There is already exists natives in that mod
Quote:

/**
* Returns number of alive zombies.
*
* @return Zombie count.
*/
native zp_get_zombie_count()

/**
* Returns number of alive humans.
*
* @return Human count.
*/
native zp_get_human_count()

/**
* Returns number of alive nemesis.
*
* @return Nemesis count.
*/
native zp_get_nemesis_count()

/**
* Returns number of alive survivors.
*
* @return Survivor count.
*/
native zp_get_survivor_count()
PHP Code:

client_print0print_chat"Zombie: %i | Human: %i | Nemesis: %i | Survivor: %i"zp_get_zombie_count( ), zp_get_human_count( ), zp_get_nemesis_count( ), zp_get_survivor_count( ) ) 

Also if you want to do it using custom stock try this
PHP Code:

GetZombieCount( )
{
    new 
iPlayer32 ], iNumiCount;
    
get_playersiPlayeriNum )
    
    for( new 
iiNumi++ )
    {
        if( 
zp_get_user_zombie) ) // Is user zombie
        
{
            
iCount++;
        }
    }
    
    return 
iCount// Returns the number called from the loop



ALonsoVIP4141 06-16-2022 10:54

Re: Zombie Count
 
Quote:

Originally Posted by lexzor (Post 2781752)
i don t think someone could explain more than that. if that is a request, post it in the specific forum

I Just learner in zp 50 and i don't know where to put this code this is it :D


All times are GMT -4. The time now is 21:23.

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