Hi guys,
I am not sure how many of you went through the source, but you might have noticed that the GM commands do not work. Even after compiling with different settings, using preprocessor and what not - it still does not work.
To get this going you will need to have access to the client source and being able to compile it successfully. Make sure you can get in game and write down the UID of your account. Then go and add your UID to AdminList and set a Level. The choices are 1, 2, 3, 4 and 5 (should be familiar).
Now this is probably as far as most people got, but the actual reason that the commands do not work is related to the source misinterpreting the actual levels. The variable "m_wAdminMode" determines which level is going to be used, however - if you actually debug it, you notice that its value changes constantly, so it not reliable. If you check the actual chat functions, you will notice that it evaluates "m_wAdminMode" and then decides what to do. The values it expects are the ones set in RYLClientMain (1 ~ 5), but the actual value is way different than that - so it is obvious why it doesn't work, riite?
Now in my search of finding out why this is happening I stumbled upon a function called ParseUserLogin in AuthHandler. Here "m_wAdminMode" is set, but not in a correct way. I did, however - notice a variable called "nPlayTime". This variable can have up to 6 different values and it actually defines which admin level is used.
So if you take this in consideration - then you can fix your problems. I wrote a small function that does this for me.
If you use this function to set "g_ClientMain.m_wAdminMode" in AuthHandler then you are all set. This also fixes another bug which causes normal players to have a yellow HP-bar floating above their character. This is also caused by the source misinterpreting the difference between an admin and player char.
I know people have mentioned in the past that only a certain level will work - but this is nonsense. They all work. The only thing that is missing is that lots of ADMIN_DEV GM commands are commented out. Getting them to work is peanuts, but why would you? Most are rather useless so it is up to you what to use and what not.
Enjoy!
I am not sure how many of you went through the source, but you might have noticed that the GM commands do not work. Even after compiling with different settings, using preprocessor and what not - it still does not work.
To get this going you will need to have access to the client source and being able to compile it successfully. Make sure you can get in game and write down the UID of your account. Then go and add your UID to AdminList and set a Level. The choices are 1, 2, 3, 4 and 5 (should be familiar).
Now this is probably as far as most people got, but the actual reason that the commands do not work is related to the source misinterpreting the actual levels. The variable "m_wAdminMode" determines which level is going to be used, however - if you actually debug it, you notice that its value changes constantly, so it not reliable. If you check the actual chat functions, you will notice that it evaluates "m_wAdminMode" and then decides what to do. The values it expects are the ones set in RYLClientMain (1 ~ 5), but the actual value is way different than that - so it is obvious why it doesn't work, riite?
Now in my search of finding out why this is happening I stumbled upon a function called ParseUserLogin in AuthHandler. Here "m_wAdminMode" is set, but not in a correct way. I did, however - notice a variable called "nPlayTime". This variable can have up to 6 different values and it actually defines which admin level is used.
So if you take this in consideration - then you can fix your problems. I wrote a small function that does this for me.
Code:
/**
* NOTE: wAdminLevel to set wAdminMode is not constant.
* However, nPlayTime shows a difference in the last two digits, so we can use that to identify a GM account.
*/
unsigned getAdminLevelFromPlayTime(unsigned t_PlayTime) {
// current known levels
const unsigned int DEV = 5111813;
const unsigned int GM_LV3 = 5111812;
const unsigned int GM_LV2 = 5111811;
const unsigned int GM_LV1 = 5111810;
const unsigned int GM_SUPPORT = 5111809;
const unsigned int PLAYER = 5111808;
switch (t_PlayTime) {
case DEV: return ADMIN_DEV;
case GM_LV3: return ADMIN_L3;
case GM_LV2: return ADMIN_L2;
case GM_LV1: return ADMIN_L1;
case GM_SUPPORT: return SUPPORTER;
default: return ADMIN_NONE;
}
}
If you use this function to set "g_ClientMain.m_wAdminMode" in AuthHandler then you are all set. This also fixes another bug which causes normal players to have a yellow HP-bar floating above their character. This is also caused by the source misinterpreting the difference between an admin and player char.
I know people have mentioned in the past that only a certain level will work - but this is nonsense. They all work. The only thing that is missing is that lots of ADMIN_DEV GM commands are commented out. Getting them to work is peanuts, but why would you? Most are rather useless so it is up to you what to use and what not.
Enjoy!
Attachments
You must be registered for see attachments list