Raised This Month: $32 Target: $400
 8% 

Get all players's names to a menu


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
uurbyrkdr
Senior Member
Join Date: Apr 2015
Old 12-26-2015 , 20:04   Get all players's names to a menu
Reply With Quote #1

How can i do this?
uurbyrkdr is offline
Dr. Greg House
Professional Troll,
Part-Time Asshole
Join Date: Jun 2010
Old 12-26-2015 , 20:08   Re: Get all players's names to a menu
Reply With Quote #2

https://sm.alliedmods.net/api/index.php?fastload=show&id=148
__________________
Santa or Satan?

Watch out when you're paying people for private requests! Most stuff already exists and you can hardly assess the quality of what you'll get, and if it's worth the money.

Last edited by Dr. Greg House; 12-26-2015 at 20:08.
Dr. Greg House is offline
KissLick
Veteran Member
Join Date: Nov 2012
Location: void
Old 12-27-2015 , 09:28   Re: Get all players's names to a menu
Reply With Quote #3

The easiest way is to search Google, SM forum, SM API site (not necessary in this order).
__________________
Plugins: TeamGames
Includes: Menu stocks, ColorVariables, DownloadTableConfig

> No help through PM, make a topic.
KissLick is offline
Phil25
AlliedModders Donor
Join Date: Feb 2015
Old 12-29-2015 , 04:11   Re: Get all players's names to a menu
Reply With Quote #4

I usually do it the 'manual' way. That way, you could include some additonal functionality.

PHP Code:
new Handle:hMenu CreateMenu(Manager);

SetMenuTitle(hMenu"Wierdos on this Server:");

AddMenuItem(hMenu"mark""Mark All");
AddMenuItem(hMenu"unmark""Unmark All");

new 
String:sClientIndex[4], sClientName[MAX_NAME_LENGTH+8];
for(new 
1<= MaxClientsi++){    //Loop through all the client indexes

    
if(!IsClientInGame(i) || IsFakeClient(i)) continue; //Skip the ones which aren't actual players

    
IntToString(isClientIndexsizeof(sClientIndex));
    
Format(sClientNamesizeof(sClientName), "%s %N"bIsWierdo[i] ? "[✓]" "[  ]"client);

    
AddMenuItem(hMenusClientIndexsClientName);


Just a heads up, the above is untested.

Last edited by Phil25; 12-29-2015 at 04:13.
Phil25 is offline
uurbyrkdr
Senior Member
Join Date: Apr 2015
Old 01-01-2016 , 15:48   Re: Get all players's names to a menu
Reply With Quote #5

Quote:
Originally Posted by Phil25 View Post
I usually do it the 'manual' way. That way, you could include some additonal functionality.

PHP Code:
new Handle:hMenu CreateMenu(Manager);

SetMenuTitle(hMenu"Wierdos on this Server:");

AddMenuItem(hMenu"mark""Mark All");
AddMenuItem(hMenu"unmark""Unmark All");

new 
String:sClientIndex[4], sClientName[MAX_NAME_LENGTH+8];
for(new 
1<= MaxClientsi++){    //Loop through all the client indexes

    
if(!IsClientInGame(i) || IsFakeClient(i)) continue; //Skip the ones which aren't actual players

    
IntToString(isClientIndexsizeof(sClientIndex));
    
Format(sClientNamesizeof(sClientName), "%s %N"bIsWierdo[i] ? "[✓]" "[  ]"client);

    
AddMenuItem(hMenusClientIndexsClientName);


Just a heads up, the above is untested.
it's works, thank you!
uurbyrkdr is offline
Reply


Thread Tools
Display Modes

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 12:42.


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