Posts: 242
Threads: 70
Joined: Aug 2015
Reputation:
0
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?
Posts: 242
Threads: 70
Joined: Aug 2015
Reputation:
0
Thank's for explaining this out, have a nice day
Posts: 1,506
Threads: 13
Joined: Jun 2015
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).
Put the codes under killerid == INVALID_PLAYER_ID and != and you're fine.
Posts: 6,242
Threads: 8
Joined: Jun 2008
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.