[HELP] how optimize/change this code?
Hi guys
I m using this code for set hp, speed, grav. in Gun XP Mod but i dont like this form... PHP Code:
ps: PHP Code:
|
Re: [HELP] how optimize/change this code?
I don't don't think setting maxspeed will work like that. Does your code work?
Also, your second and third case will never happen. |
Re: [HELP] how optimize/change this code?
Quote:
|
Re: [HELP] how optimize/change this code?
. . . Of all the threads I've read concerning maxspeed, that shouldn't work.
Also, Quote:
|
Re: [HELP] how optimize/change this code?
Make an array(s) containing the values for each item at each level. Then access using array[ g_PlayerLevel[ id ] ]
|
Re: [HELP] how optimize/change this code?
Quote:
PHP Code:
PHP Code:
Quote:
plz |
Re: [HELP] how optimize/change this code?
Doing it this way will reduce the amount of code because you will not need any if-statements and each native function is only used once. Just make sure that the g_PlayerLevel[] for any given player is greater than 0 and NOT greater than NumLevels. If players do have a level 0, just replace the first element (with 0 , 0.0 , 0.0 values ) in the the below g_lpLevelPowers array with level 0 values. Let me know if you have any questions.
PHP Code:
|
Re: [HELP] how optimize/change this code?
Big thanks Bugsy
I like very much this form but, how i can set: PHP Code:
|
Re: [HELP] how optimize/change this code?
Show all level numbers that you need to use.
|
Re: [HELP] how optimize/change this code?
Quote:
Anyway, thanks you help me enough with what i needed :) |
| All times are GMT -4. The time now is 11:24. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.