help me edit a script!!
I was wondering if you could help me with a script
wanted to show adding up all the hits to know how much total damage I gave script PHP Code:
|
Re: help me edit a script!!
Please use php tags when posting code.
|
Re: help me edit a script!!
Quote:
|
Re: help me edit a script!!
Here are some tips:
Define xDamage globally, as an array, sized using MAX_PLAYERS + 1. In xOnDamage, you would do xDamage[ id ] += read_data( 2 ). Set the slot value to 0 on client_disconnect(). Or at new round if that is when you want it reset. If you want to reset everyone, you can use arrayset(). |
Re: help me edit a script!!
Quote:
|
Re: help me edit a script!!
You should have posted in Suggestions/Requests if you are not trying to code this yourself.
Here's what I just said, see if you can figure out where it goes. PHP Code:
|
Re: help me edit a script!!
Quote:
PHP Code:
|
Re: help me edit a script!!
You forgot to delete xDamage in xOnDamge. "static xAttacker , xDamage" , delete ", xDamage"
And everywhere else you see xDamage in xOnDamage, you need to change it to xDamage[ xAttacker ]. This will reflect the total damage issued, not the single amount of damage. |
Re: help me edit a script!!
Quote:
PHP Code:
|
Re: help me edit a script!!
the code would look like this?
|
| All times are GMT -4. The time now is 16:57. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.