Question With Chars
.... 1st use serch buttun.mikus wrote: My 1st question is how to edit surces to player can have 0 exp and not conection lost when enter and 2nd how edit surces to make ehat player can have 99999999999999999999 exp and char will be work ??
2cnd... thet negative exp you cant fix it.
<img src='http://img357.imageshack.us/img357/505/eyecopy7ng.gif' border='0' alt='user posted image' />
2 : You have to change all the exp variables from int to __int64...mikus wrote: My 1st question is how to edit surces to player can have 0 exp and not conection lost when enter and 2nd how edit surces to make ehat player can have 99999999999999999999 exp and char will be work ??
so it'll be coded on 64 bits and no more on 4 bits.
<a href='http://www.technohell.net' target='_blank'><b><span style='color:red'>>>> Helbreath Ressources Website Here <<<</span></b></a><br>C++ Sources, Tools, Server Files, Help on Forum, C++ Snippets, Toplist... Updated often, come visit us !
__int64 has negative as well when you overload it...
gotta use 'unsigned __int64' ;P
gotta use 'unsigned __int64' ;P
<!--QuoteBegin--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> </td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->Human knowleag belongs to THE WORLD<!--QuoteEnd--></td></tr></table><div class='signature'><!--QuoteEEnd--><br>So i highly dislike people who keep to their proud selfs... thats why i wanna share everything i got with you guys 

hum... i think there's at least 500 different places where you'll have to change var types so NO, i won't show every place where you have to change it...mikus wrote: Diuuuude do you can give line of code where is that int ??
<a href='http://www.technohell.net' target='_blank'><b><span style='color:red'>>>> Helbreath Ressources Website Here <<<</span></b></a><br>C++ Sources, Tools, Server Files, Help on Forum, C++ Snippets, Toplist... Updated often, come visit us !
To fix your negative exp bug place an if inside of the GetExp function. Just so I don't get spammed with questions i'll cover this 1 propperly.
A character's exp is stored in the data type int. Int has a range of –2,147,483,648 to 2,147,483,647. When a player's exp exceeds 2,147,483,647 it will rollover back to it's maximum negative value (–2,147,483,648) so the idea of this code is to not allow players to exceed 2,147,483,648 EXP.
Go into game.cpp and find CGame::GetExp (2.24b has 2 functions, 1 is commented. Use the one the compiler will read obviously)
Under
Paste this
I used 2100000000 just to make sure you noob servers with your 10000x exp don't bug anything and whine at me for 3 weeks straight for fucking your server. I'm pretty sure you can be maxed with 2100000000 exp. It also sets the exp back to 2100000000 so there's no luck of the draw as to who gets #1 on your top player script.
A character's exp is stored in the data type int. Int has a range of –2,147,483,648 to 2,147,483,647. When a player's exp exceeds 2,147,483,647 it will rollover back to it's maximum negative value (–2,147,483,648) so the idea of this code is to not allow players to exceed 2,147,483,648 EXP.
Go into game.cpp and find CGame::GetExp (2.24b has 2 functions, 1 is commented. Use the one the compiler will read obviously)
Under
Code: Select all
if (m_pClientList[iClientH] == NULL) return;
Code: Select all
if (m_pClientList[iClientH]->m_iExp > 2100000000)
{
m_pClientList[iClientH]->m_iExp = 2100000000;
ShowClientMsg(iClientH, " You have reached maximum experience. You cannot level any further")
return;
}
Reppin' 127.0.0.1!!!<br><br><img src='http://img502.imageshack.us/img502/1348/sig4daxbn2.jpg' border='0' alt='user posted image' /><br><br>I contend that we are both atheists. I just believe in one fewer god than you do. <br>When you understand why you dismiss all the other possible gods, you will <br>understand why I dismiss yours.<br>~ <b>Stephen Roberts</b>
Dax its not work i change it to if (m_pClientList[iClientH]->m_iExp > 99999900000000)
{
m_pClientList[iClientH]->m_iExp = 99999900000000;
ShowClientMsg(iClientH, " You have reached maximum experience. You cannot level any further")
return;
}
and i steal have exp on - in 214.............. lvl
plis help me
{
m_pClientList[iClientH]->m_iExp = 99999900000000;
ShowClientMsg(iClientH, " You have reached maximum experience. You cannot level any further")
return;
}
and i steal have exp on - in 214.............. lvl
plis help me
HelbreatH Fuck The Future
And the award of the BIGGEST 2K6 NOOB is for... Mikus !!!!mikus wrote: Dax its not work i change it to if (m_pClientList[iClientH]->m_iExp > 99999900000000)
{
m_pClientList[iClientH]->m_iExp = 99999900000000;
ShowClientMsg(iClientH, " You have reached maximum experience. You cannot level any further")
return;
}
and i steal have exp on - in 214.............. lvl
plis help me
(Applause)
Ok, i'll say it for the last time, next time i take my gun and shoot atleast 150 bullets in your fuckin' empty head...
<span style='color:red'>EXP IS STORED IN AN INTEGER VARIABLE, SO IT CAN'T BE OVER 2,147,483,647 !!!!!!!!!!
CAN YOU UNDERSTAND WHAT 2,147,483,647 MEANS ??? IT MEANS THAT 2,147,483,648 = -2,147,483,648</span>.
As another exemple, the amount of damage you can make on another player / a NPC is stored in a SHORT variable (client side only, it's an INT on server). The client shows "critical" when you do more than ~125 dmg cuz dmg goes negative then... it's the same for exp but as the variable type used to store it is bigger (int), it goes negative later.
Did you understand that you CAN'T RUN a fuckin noob server with max level over 317 ??? Or if you want to do it so, <span style='color:red'>LEARN C++ FIRST !!!!!!!!!!!!!!!!!!!!!!!!</span>
<a href='http://www.technohell.net' target='_blank'><b><span style='color:red'>>>> Helbreath Ressources Website Here <<<</span></b></a><br>C++ Sources, Tools, Server Files, Help on Forum, C++ Snippets, Toplist... Updated often, come visit us !