OnPlayerDeath Callback !
#1

I wonder one important thing while making a DM open world server, is there any possible cases that a server could crash with too much codes under onplayerdeath callback?
Reply
#2

Nope.
Reply
#3

Thank's for explaining this out, have a nice day
Reply
#4

You just have to put the right checks at the right place and make sure to add a if statement which checks for the playerid (the ID of the player who is killed) to be less than the MAX_PLAYERS amount because many hacks now push invalid IDs except for INVALID_PLAYER_ID, which is 65535, such as passing ID 101, 102 etc when your server is of 100 slots (just an example).
Reply
#5

Put the codes under killerid == INVALID_PLAYER_ID and != and you're fine.
Reply
#6

Could bad code, doing unnecessary things, not weigh down the callback?

Pretty sure you can overload the callback, same as many others.

Just show proper logic, and thoughtful process, and you should be fine. Don't check shit you don't need to. And don't fret about using timers, and the like.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)