Quote:
Originally Posted by teame06
get_playersnum() << Only return the number of players in the server unless you specify the first parameter it then it will include the number of player in and connecting to the server.
Let say get_playersnum() return 5 but let say player 1 is in slot 1, player 2 is in slot 3, player 3 is in slot 5, and player 4 is in slot 9, and player 5 is in slot 10.
That for loop will only go out to 4. Skippign player 3, 4, 5. Also player id start from 1 not 0. If you use use on some depending on the native it will throw an error.
So use get_players() or get_maxplayers().
|
I'm well aware as I have used those other functions before; when I wrote this I was in a rush and just grabbed the function off the top of my head without any real pre-thought but I remembered I should be using get_players() but didn't want/have the time to fix it.
@ Voi - what do you mean? Do you want the player to type something like /amidead and the plugin to check if their dead and if they are, tell them? Or do you want it to automatically tell everyone when they die that they died (not like that's completely obvious or anything :-)).
Slmclarengt
__________________