You are viewing our Forum Archives. To view or take place in current topics click here.
Question About All Client Mods (MW2 C#)
Posted:

Question About All Client Mods (MW2 C#)Posted:

Zero_Point_Five_Jr
  • TTG Addict
Status: Offline
Joined: Mar 03, 201212Year Member
Posts: 2,739
Reputation Power: 128
Status: Offline
Joined: Mar 03, 201212Year Member
Posts: 2,739
Reputation Power: 128

Ok so im leaning about Client mods for my tools and i was basically trying to figure it out but im a bit stuck. I noticed that alot of the mods in MW2 are set out like this:

Jtag.Call(0x82254940, -1, 0, "s DVARGOESHERE");


what i also noticed ias that the -1 stands for which client it would be sent to. So -1 is all clients (I think) so would i just changethe code like this to change clients or is it different?


Jtag.Call(0x82254940, -1, 0, "s DVARGOESHERE");
Jtag.Call(0x82254940, 0, 0, "s DVARGOESHERE");
Jtag.Call(0x82254940, 1, 0, "s DVARGOESHERE");
Jtag.Call(0x82254940, 2, 0, "s DVARGOESHERE");


You get the point :P


#2. Posted:
xotakey
  • New Member
Status: Offline
Joined: Nov 14, 201310Year Member
Posts: 44
Reputation Power: 1
Status: Offline
Joined: Nov 14, 201310Year Member
Posts: 44
Reputation Power: 1
youre right, change that for each client
#3. Posted:
Nissan
  • Ultra Gifter
Status: Offline
Joined: Sep 20, 201211Year Member
Posts: 2,136
Reputation Power: 312
Status: Offline
Joined: Sep 20, 201211Year Member
Posts: 2,136
Reputation Power: 312
Zero_Point_Five_Jr wrote

Ok so im leaning about Client mods for my tools and i was basically trying to figure it out but im a bit stuck. I noticed that alot of the mods in MW2 are set out like this:

Jtag.Call(0x82254940, -1, 0, "s DVARGOESHERE");


what i also noticed ias that the -1 stands for which client it would be sent to. So -1 is all clients (I think) so would i just changethe code like this to change clients or is it different?


Jtag.Call(0x82254940, -1, 0, "s DVARGOESHERE");
Jtag.Call(0x82254940, 0, 0, "s DVARGOESHERE");
Jtag.Call(0x82254940, 1, 0, "s DVARGOESHERE");
Jtag.Call(0x82254940, 2, 0, "s DVARGOESHERE");


You get the point :P




Yes or you can use a numericupdown for the clients


int clients = (int)numericUpDown.Value;


then where -1 is put clients
#4. Posted:
DFM
  • Challenger
Status: Offline
Joined: May 14, 201410Year Member
Posts: 196
Reputation Power: 11
Status: Offline
Joined: May 14, 201410Year Member
Posts: 196
Reputation Power: 11
-1 is all and the clients online is set from 0 to 17
#5. Posted:
Uhm
  • Resident Elite
Status: Offline
Joined: Aug 07, 201112Year Member
Posts: 272
Reputation Power: 18
Status: Offline
Joined: Aug 07, 201112Year Member
Posts: 272
Reputation Power: 18
As he said above, just use the numericUpDown.Value in the -1 spot, and that will be which client you are choosing. Mw2 and maybe others is -1 through 17. Make sure in the numericupdown properties box you change the min to -1 and max to 17. -1 is all clients, and the rest is so on and so forth. You should have a Get Clients addon in your tool right?
#6. Posted:
Botch
  • TTG Senior
Status: Offline
Joined: Aug 31, 201211Year Member
Posts: 1,553
Reputation Power: 65
Status: Offline
Joined: Aug 31, 201211Year Member
Posts: 1,553
Reputation Power: 65
For mods involving server commands and dvars, -1 is used to send these commands to all of the clients (presumably because setting -1 as all clients is easier than sending individual messages to each client).

However, this is not the case for all mods. Remember that. If you need any more help, feel free to contact me on Skype @ botch.botch
Jump to:
You are viewing our Forum Archives. To view or take place in current topics click here.