Raised This Month: $ Target: $400
 0% 

Best player of the map?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 07-12-2012 , 16:23   Re: Best player of the map?
Reply With Quote #2

PHP Code:
for (new i<get_maxplayers(); i++) 
Stop doing that!

1. Cache get_maxplayers() in plugin init:
Code:
new g_iMaxPlayers; public plugin_init( ) {     g_iMaxPlayers = get_maxplayers( ); }

2. Players are 1 to maxplayers, not 0 to maxplayers - 1.
Code:
for( new iPlayer = 1; iPlayer <= g_iMaxPlayers; iPlayer++ ) {     // Player loop }

Also, your message won't be seen in plugin_end() since the map is changing and it is called right before clients are disconnected and reconnected to the changed map.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] 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 15:08.


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