Post: c++ CL_INGAME equivalent
03-22-2015, 07:01 PM #1
-JM-
Space Ninja
(adsbygoogle = window.adsbygoogle || []).push({}); people asked me if I have cl_ingame well nope but here's how I manage to do the same thing
I just thread this function when my sprx starts

    
bool Game = false;
void INGAME()
{
int timer;
int lasttimer = 0x00;
for(;Winky Winky
{
timer = *(int*)(0x1213800 + 0x74C);
if (timer == lasttimer || timer == 0x00)
{
Game = false;
sleep(1000);
}
else
{
lasttimer = timer;
Game = true;
}
sleep(150);
}
}

I can't comment this code just use debugger to understand (can't explain to simple)


Thanks makeabce for sharing

    
#region inGame
public static bool Dvar_GetBool(string DVAR)
{
bool State;
uint Value = (uint)RPC.Call(0x4C7BF0, DVAR);
if (Value == 1)
State = true;
else
State = false;
return State;
}
public static Boolean cl_inGame()
{
bool es;
if (Dvar_GetBool("cl_ingame") == true)
{
es = true;
}
else
{
es = false;
}
return es;
}
#endregion
(adsbygoogle = window.adsbygoogle || []).push({});

The following 2 users say thank you to -JM- for this useful post:

makeabce, NickBeHaxing
03-23-2015, 04:35 AM #2
SC58
Former Staff
Originally posted by JM
people asked me if I have cl_ingame well nope but here's how I manage to do the same thing
I just thread this function when my sprx starts

    
bool Game = false;
void INGAME()
{
int timer;
int lasttimer = 0x00;
for(;Winky Winky
{
timer = *(int*)(0x1213800 + 0x74C);
if (timer == lasttimer || timer == 0x00)
{
Game = false;
sleep(1000);
}
else
{
lasttimer = timer;
Game = true;
}
sleep(150);
}
}

I can't comment this code just use debugger to understand (can't explain to simple)


Why not just use Dvar_GetBool("cl_ingame")? it works fine on bo..

0x4C7BF0 - bool Dvar_GetBool(const char *dvarName) "mp"

and zombie aswell just port it over

The following user thanked SC58 for this useful post:

FusionIsDaName
03-23-2015, 04:36 PM #3
NickBeHaxing
Stoner Zone
Originally posted by SC58 View Post
Why not just use Dvar_GetBool("cl_ingame")? it works fine on bo..

0x4C7BF0 - bool Dvar_GetBool(const char *dvarName) "mp"

and zombie aswell just port it over


I couldn't get this method working sc58. Wouldn't work in c# or c++ I tried sprx and rtm and nothing, the address wasn't returning a value I check in debugger
03-23-2015, 06:45 PM #4
-JM-
Space Ninja
Originally posted by SC58 View Post
Why not just use Dvar_GetBool("cl_ingame")? it works fine on bo..

0x4C7BF0 - bool Dvar_GetBool(const char *dvarName) "mp"

and zombie aswell just port it over


Originally posted by NBH View Post
I couldn't get this method working sc58. Wouldn't work in c# or c++ I tried sprx and rtm and nothing, the address wasn't returning a value I check in debugger


same it didn't return anything + I didn't feel like reading PPC to figure out why it didn't return
03-23-2015, 06:52 PM #5
SC58
Former Staff
Originally posted by JM
same it didn't return anything + I didn't feel like reading PPC to figure out why it didn't return


Hmm just check it out in sprx and it only seems to work on a hook not in a thread but i guess if u don't wanna hook a function then monitoring the dvar in mem when it turns true or this or whatever
03-23-2015, 07:05 PM #6
-JM-
Space Ninja
Originally posted by SC58 View Post
Why not just use Dvar_GetBool("cl_ingame")? it works fine on bo..

0x4C7BF0 - bool Dvar_GetBool(const char *dvarName) "mp"

and zombie aswell just port it over


Originally posted by SC58 View Post
Hmm just check it out in sprx and it only seems to work on a hook not in a thread but i guess if u don't wanna hook a function then monitoring the dvar in mem when it turns true or this or whatever


on a hook? my bad I'm french but I call the function I showed in this thread
    
create_thread(INGAME, 0x4AA, 0x100, "CL_Ingame");

AND C#
    
void CL_ingame()
{
Game = true;
while (Game == true)
{
timer = ReadInt32(0x1213800 + 0x74C);
if (timer == lasttimer)
{
Game = false;
}
else
{
lasttimer = timer;
Game = true;
}
}
}

and I thread it

sadly thats not the best way I wish cl_ingame was found or the bool_dvar function worked but I'm lazy atm so I'll use that till I feel like using IDA haha + people asked me how I did it
03-24-2015, 03:29 AM #7
NickBeHaxing
Stoner Zone
Originally posted by SC58 View Post
Hmm just check it out in sprx and it only seems to work on a hook not in a thread but i guess if u don't wanna hook a function then monitoring the dvar in mem when it turns true or this or whatever


This Does Work in RTM, Me And Milky4444 Are Making a C++ Menu For this Game. Thanks SC58 For the Right Dvar_GetBool Address <3
03-24-2015, 10:51 AM #8
-JM-
Space Ninja
Originally posted by NBH View Post
This Does Work in RTM, Me And Milky4444 Are Making a C++ Menu For this Game. Thanks SC58 For the Right Dvar_GetBool Address <3


What is it?
03-24-2015, 08:10 PM #9
NickBeHaxing
Stoner Zone
Originally posted by JM
What is it?


Me and milky are working on c++ rtm menu bro, all we are missing is Huds and ccapi and bang, you got stable rtm in c++
03-26-2015, 06:39 PM #10
-JM-
Space Ninja
Originally posted by NBH View Post
Me and milky are working on c++ rtm menu bro, all we are missing is Huds and ccapi and bang, you got stable rtm in c++


Good luck =D wanna see that menu

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo