What's new

Solved Default Fog & Instant Weapon Switching?

Twain

Twain

Kamehameha!
Messages
707
Reaction score
257
Points
190
Hey, i used to use this for the default fog(it looked normal because i only tested it on rust, but when i moved over to other maps i saw the contrast :biggrin:): SV(-1, 0, "d 13 0 0.01 0 0 0 0 0 0");
so i was wondering if there is a way to set the default fog no matter on which map you are?
Also i wanted to know if there is a way how you can instantly give someone/switch to a weapon without the "giving"-animation where it takes like 3 to 5 seconds till the weapon is actually useable. so i want it like when you hit the option it instantly gives you the weapon and it is useanle(if this is even possible).
Thanks in advance
(also if someone would like to help me with my menu: pm me here or on skype, because i still have around 5 problems i cant fix myself :S)
 
XeSao

XeSao

Banned
Messages
19
Reaction score
13
Points
55
I would recommend to use SV_GetConfigstring when u connect to the game.
So it would be like this

C:
//The definition for SV_GetConfigstring would be this one:
void (__cdecl *SV_GetConfigstring)(int index, char *buffer, int bufferSize) = (void(*)(int, char *, int))0x82255A08;

char *getDefaultFog()
{
   char buffer[0x400];
   SV_GetConfigstring(0xD, buffer, 0x400);
   return buffer;
}

Then store the output in a char array of a struct or something
And then when you want to set it to default you can do this

C:
void (__cdecl *SV_SetConfigstring)(int index, const char *val) = (void(*)(int, const char *))0x822568A8;

SV_SetConfigstring(0xD, defaultFog);



Edit:
For instant switching I would think of doing it by memory editing like we used to do it on mw3 before they found GiveWeapon..

(Not to sure about this one!)
C:
*(int *)(playerState() + 0x2B4) = G_GetWeaponIndexForName("deserteaglegold_mp");
 
Last edited:
Upvote 0
Top Bottom
Login
Register