You are viewing our Forum Archives. To view or take place in current topics click here.
Need help I'm coding in c#
Posted:

Need help I'm coding in c#Posted:

wowcashlol
  • V5 Launch
Status: Offline
Joined: Jan 21, 201410Year Member
Posts: 32
Reputation Power: 1
Status: Offline
Joined: Jan 21, 201410Year Member
Posts: 32
Reputation Power: 1
How do I get clients when I'm host of a game
#2. Posted:
ip
  • 2 Million
Status: Offline
Joined: Dec 30, 201212Year Member
Posts: 3,778
Reputation Power: 3016
Status: Offline
Joined: Dec 30, 201212Year Member
Posts: 3,778
Reputation Power: 3016
Which game are you talking about?
#3. Posted:
wowcashlol
  • New Member
Status: Offline
Joined: Jan 21, 201410Year Member
Posts: 32
Reputation Power: 1
Status: Offline
Joined: Jan 21, 201410Year Member
Posts: 32
Reputation Power: 1
Mw2 or mw3 20202020202020202020220202020
#4. Posted:
ip
  • Gold Gifter
Status: Offline
Joined: Dec 30, 201212Year Member
Posts: 3,778
Reputation Power: 3016
Status: Offline
Joined: Dec 30, 201212Year Member
Posts: 3,778
Reputation Power: 3016
You would have to declare these within your source.
public uint Gamertag(int clientID)
        {
            return (getPlayerState(clientID) + 0x3290);
        }

        public string GetGamertag(int ClientNum)
        {
            byte[] Bytee = new byte[15];
            uint num;
            Jtag.xbCon.DebugTarget.GetMemory(Gamertag(ClientNum), 15, Bytee, out num);
            string A = new ASCIIEncoding().GetString(Bytee);
            return A;
        }


Then, the Richbox you want the gamertag of the client to go would be coded like this, whether it's a button or whatever you use.
richTextBox1.AppendText(Environment.NewLine + "0 = " + GetGamertag(0));

Using the above code, you would need to add that and edit both zeros to have it as client 1-17. So it would be like this in incremental order.
richTextBox1.AppendText(Environment.NewLine + "1 = " + GetGamertag(1));
#5. Posted:
wowcashlol
  • New Member
Status: Offline
Joined: Jan 21, 201410Year Member
Posts: 32
Reputation Power: 1
Status: Offline
Joined: Jan 21, 201410Year Member
Posts: 32
Reputation Power: 1
I think I know what you mean I add a textbox and a button and add these codes to the button right?
#6. Posted:
ip
  • Summer 2018
Status: Offline
Joined: Dec 30, 201212Year Member
Posts: 3,778
Reputation Power: 3016
Status: Offline
Joined: Dec 30, 201212Year Member
Posts: 3,778
Reputation Power: 3016
It's not as easy as that. You would need to get the coding for playerstate to set for each client. I would also give you a tip. Do not use a text box for your client list. It's the worst thing you could use.
#7. Posted:
wowcashlol
  • New Member
Status: Offline
Joined: Jan 21, 201410Year Member
Posts: 32
Reputation Power: 1
Status: Offline
Joined: Jan 21, 201410Year Member
Posts: 32
Reputation Power: 1
Oh ok thanks202020202020
#8. Posted:
ip
  • Summer 2018
Status: Offline
Joined: Dec 30, 201212Year Member
Posts: 3,778
Reputation Power: 3016
Status: Offline
Joined: Dec 30, 201212Year Member
Posts: 3,778
Reputation Power: 3016
I just updated my richTextBox to a listBox. It's far easier to do as for just a richtextbox you would need to have numericalupdowns and those are a pain and setting them as an int would be pointless as you would have to manually set them.

However, I ran into a little problem. Using listboxes won't allow you to have an all client option from what I am seeing. Unless you can convert the listbox.SelectedIndex of 1 to equal -1. Let me go test that really quick.
#9. Posted:
IDA
  • Powerhouse
Status: Offline
Joined: Sep 21, 201311Year Member
Posts: 454
Reputation Power: 26
Status: Offline
Joined: Sep 21, 201311Year Member
Posts: 454
Reputation Power: 26
Liability wrote I just updated my richTextBox to a listBox. It's far easier to do as for just a richtextbox you would need to have numericalupdowns and those are a pain and setting them as an int would be pointless as you would have to manually set them.

However, I ran into a little problem. Using listboxes won't allow you to have an all client option from what I am seeing. Unless you can convert the listbox.SelectedIndex of 1 to equal -1. Let me go test that really quick.


int clid = listBox1.SelectedIndex - 1;
yes this does work
#10. Posted:
HTTK
  • TTG Addict
Status: Offline
Joined: Jul 25, 201410Year Member
Posts: 2,496
Reputation Power: 313
Status: Offline
Joined: Jul 25, 201410Year Member
Posts: 2,496
Reputation Power: 313
I was going to ask this to xD
Jump to:
You are viewing our Forum Archives. To view or take place in current topics click here.