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
Code:
int counterX = 0; public void OnAddonFrame(ServerClient Client) { if (counterX == 2*1000 / AddonFrameInterval) { counterX = 0; foreach (ServerClient client in GetClients()) { TellClient(Client.ClientNum, client.ClientNum.ToString() + " - " + client.Name, true); } } }
OnChatSay
Code:
if (Message == "!list") { counterX = 2 * 1000 / AddonFrameInterval; }
[Image: 24gu1a8.png]
Reply

#2
You forgot the counterX++;
C++/Obj-Cdeveloper. Neko engine wip
Steam: Click
Reply

#3
Where do i add that?

This is what i have now
OnAddonFrame
Code:
int counterX = 0; // Red please move this i cant because its laggy teamviewer D; public void OnAddonFrame(ServerClient Client) // And this { if (counterX == 2*1000 / AddonFrameInterval) { counterX++; foreach (ServerClient client in GetClients()) { TellClient(Client.ClientNum, client.ClientNum.ToString() + " - " + client.Name, true); counterX = 0; } } }
OnChatSay
Code:
if (Message == "!list") { counterX = 2 * 1000 / AddonFrameInterval; }
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
Code:
int counterX = 0; // Red please move this i cant because its laggy teamviewer D; public void OnAddonFrame(ServerClient Client) // And this { if (counterX == 2*1000 / AddonFrameInterval) { counterX++; foreach (ServerClient client in GetClients()) { TellClient(Client.ClientNum, client.ClientNum.ToString() + " - " + client.Name, true); counterX = 0; } } }

OnChatSay
Code:
if (Message == "!list") { counterX = 2 * 1000 / AddonFrameInterval; }
Please help
[Image: 24gu1a8.png]
Reply

#6
(01-06-2013, 18:48)koro35 Wrote:
Code:
if (counterX == 2*1000 / AddonFrameInterval) { counterX++; foreach (ServerClient client in GetClients()) { /**/ } }

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:
Code:
if (counterX == 2*1000 / AddonFrameInterval) { counterX++; foreach (ServerClient client in GetClients()) { /**/ } }

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
Code:
foreach (ServerClient client in GetClients()) { /**/ }
That i know Big Grin
[Image: 24gu1a8.png]
Reply

#10
on chat say
Code:
foreach (ServerClient client in GetClients()) { if (counterX >= 1000 / AddonFrameInterval) { TellClient(Client.ClientNum, client.ClientNum.ToString() + " - " + client.Name, true); counterX = 0; } }
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 8,251 11-07-2013, 13:41
Last Post: Nekochan
  Player can write Fl0w_.JACKDAN 2 5,136 09-19-2013, 16:36
Last Post: Fl0w_.JACKDAN
  Help Server not in list, but people join 99IRock 8 8,960 07-17-2013, 21:26
Last Post: clacki
  [CoD 4] Trying to set a player -- DidUknowiPwn 7 8,291 07-03-2013, 21:58
Last Post: Pozzuh
  [Release] Black Ops Single Player/Zombie Trainer V3.6 Craig87 52 101,661 07-01-2013, 15:12
Last Post: explosivebanana55
  List of models that can be spawned? (Looking for C4 model) akillj 5 6,726 06-27-2013, 13:35
Last Post: Yamato
Video Preview AIZombies eXtreme 2.0 / Zombie Player (Music Player) DidUknowiPwn 4 8,078 06-24-2013, 16:37
Last Post: DidUknowiPwn
  [Request] mw3 all map list ( aslo DLC) raminr63 5 17,641 06-18-2013, 19:50
Last Post: mn_acer1
Big Grin Killstreaks HUD list Puffiamo 9 12,583 06-18-2013, 18:42
Last Post: RaZ
  "VEH_LinkCommonChecks: Player already has an owner" - After long games akillj 4 5,414 06-07-2013, 11:38
Last Post: akillj

Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2026 Melroy van den Berg.