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:
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:
Status: Offline
Joined: Dec 30, 201212Year Member
Posts: 3,778
Reputation Power: 3016
Which game are you talking about?
- 0useful
- 0not useful
#3. Posted:
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
- 0useful
- 0not useful
#4. Posted:
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.
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.
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.
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));
- 1useful
- 0not useful
#5. Posted:
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?
- 0useful
- 0not useful
#6. Posted:
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.
- 2useful
- 0not useful
#7. Posted:
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
- 0useful
- 0not useful
#8. Posted:
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.
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.
- 0useful
- 0not useful
#9. Posted:
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
- 0useful
- 0not useful
#10. Posted:
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
- 0useful
- 0not useful
You are viewing our Forum Archives. To view or take place in current topics click here.