Raised This Month: $ Target: $400
 0% 

asdasd


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
OnePL
BANNED
Join Date: May 2012
Location: GB
Old 03-22-2014 , 00:08   Re: GetPlayers Bugging
Reply With Quote #9

PHP Code:
#include <amxmodx>

#define USE_GETPLAYERS // uncommented - get_players, commented - loop for

public plugin_init() register_clcmd("say /status""clcmd_status");

public 
clcmd_status(id) {
    
client_print(id3"Alive TT: %i, Alive CT: %i, All TT: %i, All CT: %i"GetPlayers(11), GetPlayers(12), GetPlayers(01), GetPlayers(02));
}

#if defined USE_GETPLAYERS

stock GetPlayers(aliveteam) {
    new 
players[32], num;
    
get_players(playersnumalive "aceh" "ceh"team == "TERRORIST" "CT");
    return 
num;
}

#else

stock GetPlayers(aliveteam) {
    static 
maxplmaxpl get_maxplayers();
    for(new 
1<= maxpli++) {
        if(!
is_user_connected(i) || get_user_team(i) != team) continue;
        if(
alive && !is_user_alive(i)) continue;

        
i++;
    }
    return 
i;
}

#endif 

Last edited by OnePL; 03-22-2014 at 00:10.
OnePL is offline
Send a message via ICQ to OnePL Send a message via AIM to OnePL Send a message via Yahoo to OnePL Send a message via Skype™ to OnePL
 



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 05:54.


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