Raised This Month: $ Target: $400
 0% 

Mini Help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Krle
Senior Member
Join Date: Jul 2011
Location: Serbia, Nis
Old 09-27-2011 , 14:56   Mini Help
Reply With Quote #1

My infinite level goes like this

player_level[id] * 2 * 75...
So experience for levels goes like this

150, 300, 450, 600...

I want it to be like this...
150, 300, 600, 1200...

But i tought about, like making global variable
new levelratio[33] = 75

And check if player level'd up and then do next

if(player_level[id] ++)
{
levelratio[id] ++
}

but im not shure this would work
__________________

Sorry about my BAD English
Krle is offline
Send a message via MSN to Krle
Erox902
Veteran Member
Join Date: Jun 2009
Location: Never Never Land
Old 09-27-2011 , 15:23   Re: Mini Help
Reply With Quote #2

if(player_level[id] ++)
Well no this will definetly not work,
it says itself you cannot check ++/-- or anything like that in an if statement.
Erox902 is offline
Krle
Senior Member
Join Date: Jul 2011
Location: Serbia, Nis
Old 09-27-2011 , 15:28   Re: Mini Help
Reply With Quote #3

So anyway to do it, exept of writing millions of numbers in const?
__________________

Sorry about my BAD English
Krle is offline
Send a message via MSN to Krle
Erox902
Veteran Member
Join Date: Jun 2009
Location: Never Never Land
Old 09-27-2011 , 16:17   Re: Mini Help
Reply With Quote #4

how do you loop the experince to know when to level up?
just add levelratio[id] ++ in that loop instead of just level up?
Erox902 is offline
Krle
Senior Member
Join Date: Jul 2011
Location: Serbia, Nis
Old 09-27-2011 , 16:44   Re: Mini Help
Reply With Quote #5

ok i found this
level * 10 * (level / 2)

->

1 * 10 * 1 / 2 = 5
2 * 10 * 2 / 2 = 20
3 * 10 * 3 / 2 = 45
4 * 10 * 4 / 2 = 80
5 * 10 * 5 / 2 = 125
6 * 10 * 6 / 2 = 180
7 * 10 * 7 / 2 = 245
8 * 10 * 8 / 2 = 320
9 * 10 * 9 / 2 = 405
10 * 10 * 10 / 2 = 500
11 * 10 * 11 / 2 = 605
12 * 10 * 12 / 2 = 720
13 * 10 * 13 / 2 = 845
14 * 10 * 14 / 2 = 980
15 * 10 * 15 / 2 = 1125
16 * 10 * 16 / 2 = 1280
17 * 10 * 17 / 2 = 1445
18 * 10 * 18 / 2 = 1620
19 * 10 * 19 / 2 = 1805
20 * 10 * 20 / 2 = 2000

Works

Thanks, anyway
__________________

Sorry about my BAD English
Krle is offline
Send a message via MSN to Krle
D.Moder
I uploaded 2 great gameplay plugins here
Join Date: Sep 2009
Location: Sin city
Old 09-27-2011 , 23:24   Re: Mini Help
Reply With Quote #6

use this is better:

#define XPREQ(%1) (150 * power(2, %1))
__________________
Creator of COD-Life (Half COD, Half Life)
https://forums.alliedmods.net/showthread.php?t=261162
twitter: @D_Moder_61216
D.Moder is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 19:34.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode