Raised This Month: $ Target: $400
 0% 

Return player name ?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Lee
AlliedModders Donor
Join Date: Feb 2006
Old 06-23-2007 , 13:49   Re: Return player name ?
Reply With Quote #1

The index is what you'd see if you were to type status in console.

Code:
    new name[32];     get_players(iPlayers, iNum);     for(new i=0; i<iNum; i++)     {         get_user_name(iPlayers[i], name, 31);         write_file(file, name);     }
Code:
//this is unnecessary as get_players() will do this for you iNum = get_playersnum();
When writing strings the len parameter is the maximum size of the buffer excluding the null terminator.

You also don't need to assign an ID to a set_tasK() unless you plan on removing it at a later stage.

Last edited by Lee; 06-23-2007 at 14:04.
Lee is offline
Reply



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 21:27.


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