Raised This Month: $ Target: $400
 0% 

2 terroist alive


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ironskillz1
AlliedModders Donor
Join Date: Jul 2012
Location: Sweden
Old 09-11-2013 , 13:35   2 terroist alive
Reply With Quote #1

I need to check if its 2 or more terroist alive

Im using this code but it doesnt seem to work.. :/?

Even if its like 15 terroist alive the message prints

Code:
	new players[32], num;
	get_players( players, num, "ae", "TERRORIST" );		
	if( num <= 1 )
	{
                ColorChat( 0, GREY, "%s Hello!", g_szPrefix );
		return PLUGIN_HANDLED;
	}
__________________
I have many private and unique plugins for Jailbreak and Hide'N'Seek. PM me for more info.

Pm me.

Check out my roulette site.
ironskillz1 is offline
Send a message via Skype™ to ironskillz1
~Ice*shOt
Veteran Member
Join Date: Mar 2009
Location: Lithuania
Old 09-11-2013 , 13:55   Re: 2 terroist alive
Reply With Quote #2

PHP Code:
new Players[32], Num
get_players
(PlayersNum"ae""TERRORIST")

if (
Num >= 2)
        
client_print(03"There's two or more terrorists alive!"
~Ice*shOt is offline
Send a message via Skype™ to ~Ice*shOt
^SmileY
Veteran Member
Join Date: Jan 2010
Location: Brazil [<o>]
Old 09-11-2013 , 14:38   Re: 2 terroist alive
Reply With Quote #3

(Num >= 2)

>>

(Num > 1)

__________________
Projects:

- See my Git Hub: https://github.com/SmileYzn
PHP Code:
set_pcvar_num(pCvar, !get_pcvar_num(pCvar)); 
^SmileY is offline
Send a message via MSN to ^SmileY Send a message via Skype™ to ^SmileY
~Ice*shOt
Veteran Member
Join Date: Mar 2009
Location: Lithuania
Old 09-11-2013 , 14:51   Re: 2 terroist alive
Reply With Quote #4

could be too
~Ice*shOt is offline
Send a message via Skype™ to ~Ice*shOt
Old 09-12-2013, 08:07
LordOfNothing
This message has been deleted by ConnorMcLeod. Reason: troll, or posting random confusing code, or posting for posts count
~Ice*shOt
Veteran Member
Join Date: Mar 2009
Location: Lithuania
Old 09-12-2013 , 08:22   Re: 2 terroist alive
Reply With Quote #5

Quote:
Originally Posted by ironskillz1 View Post
I need to check if its 2 or more terroist alive
What are you doing?

Btw, why you're checking is player alive or not, if you are 'a' flag in get players?

Last edited by ~Ice*shOt; 09-12-2013 at 08:24.
~Ice*shOt is offline
Send a message via Skype™ to ~Ice*shOt
ironskillz1
AlliedModders Donor
Join Date: Jul 2012
Location: Sweden
Old 09-12-2013 , 09:11   Re: 2 terroist alive
Reply With Quote #6

You guys didnt understand my question but anyways i think another plugin fucked get_players up

So you dont need to post in this topic anymore
__________________
I have many private and unique plugins for Jailbreak and Hide'N'Seek. PM me for more info.

Pm me.

Check out my roulette site.
ironskillz1 is offline
Send a message via Skype™ to ironskillz1
jimaway
Heeeere's Jimmy!
Join Date: Jan 2009
Location: Estonia
Old 09-12-2013 , 10:54   Re: 2 terroist alive
Reply With Quote #7

Quote:
Originally Posted by LordOfNothing View Post
PHP Code:
new Players[32], Num 
get_players
(PlayersNum"ae""TERRORIST"
 
if (
Num 2
   if(
is_user_alive(Num)
   {
 
client_print(0print_chat"There's two terrorists alive!"
   } 
only 2
Num is the amount of players returned by get_players, not an player id. also you need double = in if statements
jimaway is offline
mottzi
Veteran Member
Join Date: May 2010
Location: Switzerland
Old 09-13-2013 , 02:18   Re: 2 terroist alive
Reply With Quote #8

Ive had this issue, when get_players using ae flag returning wrong data, too. I dont know what could cause such a 'bug'. Ive solved it in simply looping with get_maxplayers...

Does anybody have additional information?
mottzi is offline
Send a message via MSN to mottzi
Decompiler
>:)
Join Date: Mar 2013
Old 09-13-2013 , 02:40   Re: 2 terroist alive
Reply With Quote #9

The flag "e" in get_players is bugged. This is supposed to fix it, but I had no luck with it when I tried it a while ago.
__________________
Decompiling maps, decompiling plugins, stealing code, replacing authors name. I do it all .
Decompiler is offline
Reply


Thread Tools
Display Modes

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 19:03.


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