Blockland Forums > Modification Help
Does every client have a number?
<< < (3/5) > >>
Reinforcements:

--- Quote from: DYLANzzz on September 06, 2010, 12:35:46 PM ---And I think he wants to have a numerical value for everyone (like 0 1 2 3 and not 3605, 11240, 18043, etc etc)

--- End quote ---
yes, thats exactly what I want! :D

--- Quote from: Syntax on September 06, 2010, 12:40:48 PM ---Well, I'm thinking he means, if your the 300th player to join his server, your ''server id'' would be 300, which is what i made.

It writes a players ''server id'' to a text file, and I use %client.getServerId(); to get the client's ''server id''.

If I'm wrong OP, tell me.

--- End quote ---
is that(in bold) a standard function, or did you make it yourself?
Syntax:

--- Quote from: Reinforcements on September 06, 2010, 12:49:02 PM ---yes, thats exactly what I want! :Dis that(in bold) a standard function, or did you make it yourself?

--- End quote ---

Made that myself.
Reinforcements:

--- Quote from: Syntax on September 06, 2010, 12:49:37 PM ---Made that myself.

--- End quote ---
Actualy, now that I think of it. That wont work... Let me explain exactly what I want.

I make a server, my "clientNumber" is 0(I'm the host). Someone else joins, they have a "client number" of 1. Yet another player joins, he has a "client number" of 2. Then the guy with the client number of 1 leaves the server. Now the guy with the client number of 2 gets "shifted down" to 1. This is what I was trying to do, but now that I think of it...I think theres a better way to accomplish what I'm trying to do.

If any of you have ever RP-ed, you may know that trying to pick out the message that the person that your RP-ing with could be easier...So I'm making a mod s everyone talks in one color. Now that I think of it, I think it would be better to assign a variable to the client when he joins my server. A variable that would be used to determine the color they talk in(a hex number). That way, if your used to "so-and-so" talking in blue and someone leaves and the numbers get shifted, the color wont change.(if the client has their own "color" variable). I appreciate you guys posting to help me by the way ^_^. Do you think this is a better way of doing it?
Syntax:

--- Quote from: Reinforcements on September 06, 2010, 01:03:34 PM --- Actualy, now that I think of it. That wont work... Let me explain exactly what I want.

I make a server, my "clientNumber" is 0(I'm the host). Someone else joins, they have a "client number" of 1. Yet another player joins, he has a "client number" of 2. Then the guy with the client number of 1 leaves the server. Now the guy with the client number of 2 gets "shifted down" to 1. This is what I was trying to do, but now that I think of it...I think theres a better way to accomplish what I'm trying to do.

If any of you have ever RP-ed, you may know that trying to pick out the message that the person that your RP-ing with could be easier...So I'm making a mod s everyone talks in one color. Now that I think of it, I think it would be better to assign a variable to the client when he joins my server. A variable that would be used to determine the color they talk in(a hex number). That way, if your used to "so-and-so" talking in blue and someone leaves and the numbers get shifted, the color wont change.(if the client has their own "color" variable). I appreciate you guys posting to help me by the way ^_^. Do you think this is a better way of doing it?

--- End quote ---

Oh, lol, you should probably use the color hex way.
Reinforcements:

--- Quote from: Syntax on September 06, 2010, 01:07:47 PM ---Oh, lol, you should probably use the color hex way.

--- End quote ---
How would you get a random hex number?
Navigation
Message Index
Next page
Previous page

Go to full version