Author Topic: Getting all the Client objects Clientside?  (Read 2031 times)

Right, so I want to call a specific function, (function being client-side) but have it use all the other clients in the server, once I join it/when someone else joins. (Basically, Client C Joins the server. I want to to then basically go through the ClientGroup and find everyone and then call a function with their client object. I only need the Name, BL ID, and Clan poperties accessable.) Server-side, this would be simple. So is there a client-side function I can modify that is activated whenever someone joins any server?

The clientgroup simset is available on clientside too, just look at tree();.

Isn't ClientGroup empty clientside?

Try looping through ServerConnection for "GameConnection" objects and displaying their info every time your GUI is opened.
« Last Edit: June 21, 2007, 12:41:37 PM by Space Guy »

Badspot

  • Administrator
iterate through the player list gui thing. 

iterate through the player list gui thing. 

Did so, but is there any way to get the clans as well?


iterate through the player list gui thing. 

Did so, but is there any way to get the clans as well?
MasterCE told me to post this code:
Code: [Select]
%procvar = getsubstr(%text,strstr(%text, "\c3")+1, strlen(%text));
%provar = getsubstr(%procvar, strstr(%procvar, "\c7"),strlen(%procvar));
%name = strreplace(%procvar, %provar,"");
%words = strreplace(%text, getsubstr(%text,0,strstr(%text,":")+1),"");
He said he used it to get names using:
Code: [Select]
function onChatMessage(%message, %voice, %pitch)
{
   // Chat goes to the chat HUD.
   if (getWordCount(%message)) {
      newChatHud_addLine(%message);
      command(%message);
   }
}

function onServerMessage(%message)
{
   // Server messages go to the chat HUD too.
   if (getWordCount(%message)) {
      newChatHud_addLine(%message);
      command(%message);
   }
}
"The player would have to talk for these to be set, of course, but....convert the first code to what you need, it should be able to get the clantags. Just set it so some variable clientside as you want, you could use the playergui to find out who's who or whatever."