Posts: 30
Threads: 9
Joined: Nov 2015
Reputation:
0
Hello, well, how to show only for admins the death screen, and who join and disconnect from server?
Thanks in advance!
Posts: 6,242
Threads: 8
Joined: Jun 2008
Quote:
Originally Posted by Arthur Kane
Only examples.
|
Your OnPlayerDeath checks are non-existent, and GetName(killerid) will likely return a real problem.
Posts: 30
Threads: 9
Joined: Nov 2015
Reputation:
0
I mean SendDeathMessage (the death screen message).
got it?
Posts: 6,242
Threads: 8
Joined: Jun 2008
Quote:
Originally Posted by Arthur Kane
They're examples from my script. I'm just showing him how it could be done. It all works well.
|
You think it works well...
Quote:
Originally Posted by DavidSF
I mean SendDeathMessage (the death screen message).
got it?
|
You're in here asking for code, yet thing is that this isn't the place.
Arthur has thrown up an example, yet you won't use that structure to make the code what you'd like.
You'll also need to use
SendDeathMessageToPlayer , as otherwise the message will be to all.
Posts: 30
Threads: 9
Joined: Nov 2015
Reputation:
0
Okay thank you.
How to make demages logs? /dmg cmd
show 20 demages made by players..
Posts: 6,242
Threads: 8
Joined: Jun 2008
You'll have to make an array of some sort, that stores the ID of the player who caused the damage, and how much damage they did.
This will be rather advanced as it will require shifting the oldest damages up in the array, and putting them into the next on each OnPlayerTakeDamage/OnPlayerGiveDamage. Which really, may take a bit of work, and you'll need to optimize it as if you do it wrong, you'll end up lagging out the server if multiple people are fighting.
Posts: 1,506
Threads: 13
Joined: Jun 2015
@Arthur Kane, please don't throw up examples of un-optimized practices; I'm talking about the MAX_PLAYERS loop, and use optimized ones such as Player-pool size or foreach loops are available.