• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help Getting list of player id's
#1
Hello ive tried to make so if i do !list i get a list appear of everyname and their id so i can do !kickc ID now this list should show everyperson 2 secounds inbetween.
Ive tried but failed this is what i have
OnAddonFrame
CSHARP Code
  1. int counterX = 0;
  2. public void OnAddonFrame(ServerClient Client)
  3. {
  4. if (counterX == 2*1000 / AddonFrameInterval)
  5. {
  6. counterX = 0;
  7. foreach (ServerClient client in GetClients())
  8. {
  9. TellClient(Client.ClientNum, client.ClientNum.ToString() + " - " + client.Name, true);
  10. }
  11. }
  12.  
  13. }

OnChatSay
CSHARP Code
  1. if (Message == "!list")
  2. {
  3. counterX = 2 * 1000 / AddonFrameInterval;
  4. }
[Image: 24gu1a8.png]
  Reply
#2
You forgot the counterX++;
C++/Obj-C developer. Neko engine wip
Steam: Click
  Reply
#3
Where do i add that?

This is what i have now
OnAddonFrame
CSHARP Code
  1. int counterX = 0; // Red please move this i cant because its laggy teamviewer D;
  2. public void OnAddonFrame(ServerClient Client) // And this
  3. {
  4. if (counterX == 2*1000 / AddonFrameInterval)
  5. {
  6. counterX++;
  7. foreach (ServerClient client in GetClients())
  8. {
  9. TellClient(Client.ClientNum, client.ClientNum.ToString() + " - " + client.Name, true);
  10. counterX = 0;
  11. }
  12. }
  13.  
  14. }

OnChatSay
CSHARP Code
  1. if (Message == "!list")
  2. {
  3. counterX = 2 * 1000 / AddonFrameInterval;
  4. }
Please help
[Image: 24gu1a8.png]
  Reply
#4
You put the ++ after whatever you're trying to increase it.
Do not take life too seriously. You will never get out of it alive.
[Image: UGPjFJa.jpg]
  Reply
#5
I know but read the post i made This is what i have now
OnAddonFrame
CSHARP Code
  1. int counterX = 0; // Red please move this i cant because its laggy teamviewer D;
  2. public void OnAddonFrame(ServerClient Client) // And this
  3. {
  4. if (counterX == 2*1000 / AddonFrameInterval)
  5. {
  6. counterX++;
  7. foreach (ServerClient client in GetClients())
  8. {
  9. TellClient(Client.ClientNum, client.ClientNum.ToString() + " - " + client.Name, true);
  10. counterX = 0;
  11. }
  12. }
  13.  
  14. }


OnChatSay
CSHARP Code
  1. if (Message == "!list")
  2. {
  3. counterX = 2 * 1000 / AddonFrameInterval;
  4. }

Please help
[Image: 24gu1a8.png]
  Reply
#6
(01-06-2013, 18:48)koro35 Wrote:
CSHARP Code
  1. if (counterX == 2*1000 / AddonFrameInterval)
  2. {
  3. counterX++;
  4. foreach (ServerClient client in GetClients())
  5. {
  6. /**/
  7. }
  8. }

This hurts my head
[Image: compiling.png][Image: aLKA8og_460sa.gif]
  Reply
#7
lol? anyone can help?
[Image: 24gu1a8.png]
  Reply
#8
(01-06-2013, 19:10)Ich1994 Wrote:
(01-06-2013, 18:48)koro35 Wrote:
CSHARP Code
  1. if (counterX == 2*1000 / AddonFrameInterval)
  2. {
  3. counterX++;
  4. foreach (ServerClient client in GetClients())
  5. {
  6. /**/
  7. }
  8. }

This hurts my head

(01-06-2013, 19:12)koro35 Wrote: lol? anyone can help?

Do you even understand what you coded there?
[Image: compiling.png][Image: aLKA8og_460sa.gif]
  Reply
#9
CSHARP Code
  1. foreach (ServerClient client in GetClients())
  2. {
  3. /**/
  4. }
That i know Big Grin
[Image: 24gu1a8.png]
  Reply
#10
on chat say
CSHARP Code
  1. foreach (ServerClient client in GetClients())
  2. {
  3. if (counterX >= 1000 / AddonFrameInterval)
  4. {
  5. TellClient(Client.ClientNum, client.ClientNum.ToString() + " - " + client.Name, true);
  6. counterX = 0;
  7. }
  8. }
And onaddonframe i have it counterX++; am i anywhere close to the right code? (this only displays one name)

Still needs help D:
[Image: 24gu1a8.png]
  Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  Help Sentry Gun kill = Player kill Snake 8 2,326 11-07-2013, 13:41
Last Post: Nekochan
  Player can write Fl0w_.JACKDAN 2 1,136 09-19-2013, 16:36
Last Post: Fl0w_.JACKDAN
  Help Server not in list, but people join 99IRock 8 2,998 07-17-2013, 21:26
Last Post: clacki
  [CoD 4] Trying to set a player -- DidUknowiPwn 7 1,913 07-03-2013, 21:58
Last Post: Pozzuh
  [Release] Black Ops Single Player/Zombie Trainer V3.6 Craig87 52 39,421 07-01-2013, 15:12
Last Post: explosivebanana55
  List of models that can be spawned? (Looking for C4 model) akillj 5 1,965 06-27-2013, 13:35
Last Post: Yamato
Video Preview AIZombies eXtreme 2.0 / Zombie Player (Music Player) DidUknowiPwn 4 2,549 06-24-2013, 16:37
Last Post: DidUknowiPwn
  [Request] mw3 all map list ( aslo DLC) raminr63 5 7,298 06-18-2013, 19:50
Last Post: mn_acer1
Big Grin Killstreaks HUD list Puffiamo 9 4,811 06-18-2013, 18:42
Last Post: RaZ
  "VEH_LinkCommonChecks: Player already has an owner" - After long games akillj 4 1,323 06-07-2013, 11:38
Last Post: akillj

Forum Jump:


Users browsing this thread: 1 Guest(s)