Raised This Month: $ Target: $400
 0% 

get_players alternative


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Mlk27
Veteran Member
Join Date: May 2008
Old 06-24-2009 , 03:43   get_players alternative
Reply With Quote #1

Any idea how I can replace get_players to get accurate players team? In some mods that often switch players team, get_players always fail to return their current team correctly

Code:
stock show_chat(iClient, szMsg[]) {     if (msgSayText == -1)         msgSayText = get_user_msgid("SayText")     if (msgSayText)     {         new iNum, iPlayers[32], iPlayer         if (is_user_alive(iClient))             get_players(iPlayers, iNum, "ch")         else             get_players(iPlayers, iNum, "bch")         for (new i=0; i < iNum; i++)         {             iPlayer = iPlayers[i]             message_begin(MSG_ONE, msgSayText, {0, 0, 0}, iPlayer)             write_byte(iPlayer)             write_string(szMsg)             message_end()         }     } }
Mlk27 is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 06-24-2009 , 03:55   Re: get_players alternative
Reply With Quote #2

Loop through all players and use cs_get_user_team().
__________________
Arkshine is offline
Mlk27
Veteran Member
Join Date: May 2008
Old 06-24-2009 , 04:11   Re: get_players alternative
Reply With Quote #3

I want to make this work with CZ too
Mlk27 is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 06-24-2009 , 04:34   Re: get_players alternative
Reply With Quote #4

CS = CZ. It's the same game.
__________________

Last edited by Arkshine; 06-24-2009 at 04:36.
Arkshine is offline
SnoW
Veteran Member
Join Date: Oct 2008
Location: Finland WisdomNuggets: 8
Old 06-24-2009 , 05:02   Re: get_players alternative
Reply With Quote #5

Quote:
Originally Posted by arkshine View Post
CS = CZ. It's the same game.
Wrong. Counter Strike is different game than Condition Zero, but obviously cs_get_user_team works on both games.
SnoW is offline
Send a message via MSN to SnoW
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 06-24-2009 , 05:31   Re: get_players alternative
Reply With Quote #6

It's the same dll and engine. It's the same.
__________________
Arkshine is offline
SnoW
Veteran Member
Join Date: Oct 2008
Location: Finland WisdomNuggets: 8
Old 06-24-2009 , 06:32   Re: get_players alternative
Reply With Quote #7

Quote:
Originally Posted by arkshine View Post
It's the same dll and engine. It's the same.
There's much same in them like dll and engine, but it's a different game. Valve kind of just made some new skins, bots, changed the name and sells the same game, somehow it's still different. At least I'd say that. Well it doesn't matter.
SnoW is offline
Send a message via MSN to SnoW
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 06-24-2009 , 06:36   Re: get_players alternative
Reply With Quote #8

It does matter and it's the same game. I don't talking about trivial stuff like skins and such, but the engine, how it works, it's the same as CS. ( Except some things are disabled in CS )
__________________
Arkshine is offline
SnoW
Veteran Member
Join Date: Oct 2008
Location: Finland WisdomNuggets: 8
Old 06-24-2009 , 06:41   Re: get_players alternative
Reply With Quote #9

Okay, so you mean with a game engine, dll and basic stuff. I mean with a game the whole CD you buy from a store or the packet you buy from steam. Obviously there's different things in them and for me it's different, but for you if the engine and dll is the same the game is same.
SnoW is offline
Send a message via MSN to SnoW
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 06-24-2009 , 19:04   Re: get_players alternative
Reply With Quote #10

Quote:
Originally Posted by SnoW View Post
Okay, so you mean with a game engine, dll and basic stuff. I mean with a game the whole CD you buy from a store or the packet you buy from steam. Obviously there's different things in them and for me it's different, but for you if the engine and dll is the same the game is same.
He's a coder, he doesn't care about the superficial things lol .
__________________
fysiks 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 15:29.


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