Raised This Month: $ Target: $400
 0% 

Zombie Count


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 06-16-2022 , 09:06   Re: Zombie Count
Reply With Quote #1

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

__________________
Youtube.com/Supremache

Bank System [Nvault - SQL Support]
VIP System
  • If you think it's that simple, then do it yourself.

Last edited by Supremache; 06-16-2022 at 09:10.
Supremache is offline
Old 06-17-2022, 17:08
ALonsoVIP4141
This message has been deleted by ALonsoVIP4141.
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 21:23.


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