Raised This Month: $ Target: $400
 0% 

get_players and IF function problem


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
MasterKy
Junior Member
Join Date: Aug 2009
Old 08-26-2009 , 13:52   get_players and IF function problem
Reply With Quote #1

hello, i want to do this "IF" read if the terrorist player count is 1
the terrorist team, in the game, have more of 1 player but this print the message!
plz help me =/

PHP Code:
public Players(){
new 
iPlayers32 ];
new 
iPlayerCount;

get_players iPlayers iPlayerCount "a" "TERRORIST" );
if(
iPlayerCount 1){
client_printprint_chat "Only 1 for finish!" iPlayerCount );
}

i have entered it with == but dont work too:
PHP Code:
if(iPlayerCount == 1){ 

Last edited by MasterKy; 08-26-2009 at 14:05.
MasterKy is offline
MasterKy
Junior Member
Join Date: Aug 2009
Old 08-26-2009 , 14:59   Re: get_players and IF function problem
Reply With Quote #2

anyone?
MasterKy is offline
|PJ| Shorty
Veteran Member
Join Date: Aug 2005
Location: Bavaria, Germany
Old 08-26-2009 , 18:18   Re: get_players and IF function problem
Reply With Quote #3

PHP Code:
get_players iPlayers iPlayerCount "ae" "TERRORIST" ); 
but as you can see here: http://www.amxmodx.org/funcwiki.php?go=func&id=174

Quote:
Note: "e" flag can return incorrect results (for cstrike/czero at least).
and this is correct:
PHP Code:
if(iPlayerCount == 1
__________________
There are only 10 types of people in the world:
Those who understand binary, and those who donīt.
|PJ| Shorty is offline
Send a message via ICQ to |PJ| Shorty Send a message via AIM to |PJ| Shorty Send a message via MSN to |PJ| Shorty Send a message via Yahoo to |PJ| Shorty Send a message via Skype™ to |PJ| Shorty
Alucard^
AMXX Moderator: Others
Join Date: Sep 2007
Location: Street
Old 08-26-2009 , 18:35   Re: get_players and IF function problem
Reply With Quote #4

http://forums.alliedmods.net/showpos...72&postcount=7
__________________
Approved Plugins - Steam Profile

Public non-terminated projects:
All Admins Menu, HLTV parameters, Subnick,
Second Password (cool style), InfoZone,
Binary C4 plant/defuse, and more...

Private projects:
NoSpec (+menu), NV Surf Management,
PM Adanved System, KZ longjump2, and more...
Alucard^ is offline
Send a message via Skype™ to Alucard^
MasterKy
Junior Member
Join Date: Aug 2009
Old 08-27-2009 , 17:03   Re: get_players and IF function problem
Reply With Quote #5

thanks but my function dont have the flag "e"
this do not read the if
it print the message wich any value =/
plz help me !

This is the warning in the compiler:
possibly unintended assignment

Last edited by MasterKy; 08-27-2009 at 17:11.
MasterKy is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 08-27-2009 , 17:14   Re: get_players and IF function problem
Reply With Quote #6

PHP Code:
public Players(){
    new 
iPlayers32 ];
    new 
iPlayerCount;
    
    
get_players iPlayers iPlayerCount "ae" "TERRORIST" );
    if(
iPlayerCount == 1){
        
client_printprint_chat "Only 1 for finish!" );
    }

__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] 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 14:59.


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