Raised This Month: $ Target: $400
 0% 

action thru register_concmd to dead players


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
slmclarengt
Veteran Member
Join Date: Jul 2004
Location: The Cookie Jar... or Pul
Old 05-13-2007 , 13:38   Re: action thru register_concmd to dead players
Reply With Quote #5

Quote:
Originally Posted by teame06 View Post
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
__________________
But we don’t beat the Reaper by living longer. We beat the Reaper by living well. -Dr. Randy Pausch, R.I.P.

Come play WC3:FT on BnD Clan Server! You know you want to: Connect to WC3:FT BnD - go ahead click me!
slmclarengt is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 06:42.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode