Raised This Month: $ Target: $400
 0% 

last terrorist help


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 10-06-2009 , 09:01   Re: last terrorist help
Reply With Quote #5

If the function worked properly then that would obviously be the fastest and easiest way. The problem is that passing flags with get_players() does not always return valid results; I tested the function with various flags and got mixed results. On one occassion, passing "ae" to the function would return players as normal (alive,team) then the next day, identical plugin\code, it would always return 0 players even though there were players that matched the passed criteria. The function should not be used with flags if it is not always going to work consistently. This is why I called it with no flags and did the alive\team checking manually.

http://www.amxmodx.org/funcwiki.php?go=func&id=174

Quote:
"We don't really support get_players() with flags anymore. It was a bad idea and if it was our choice, it would have never been added to the original AMX Mod." - BAILOPAN
And that code is incorrect, untested
PHP Code:
new iPlayers[32] , iT;
get_playersiPlayers iT "ae" "TERRORIST" );
    
if ( 
iT == )
{
    
menu_handleriPlayers[0] , menuitem);
}
else
{
    
client_printiPlayers[0] , print_chat "You cannot use that command." );

__________________

Last edited by Bugsy; 10-06-2009 at 09:15.
Bugsy is offline
 



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 22:41.


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