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

[REQ]Flags Menu


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ApoziX
Member
Join Date: Sep 2018
Old 09-20-2018 , 21:07   [REQ]Flags Menu
Reply With Quote #1

Hello,

I need a plugin that will show on menu online users that got Flag T

By typing command !tlist

Thanks for helpers +rep !
__________________
Looking To Start A TF2 Community
My Discord | My Steam
ApoziX is offline
Cruze
Veteran Member
Join Date: May 2017
Old 09-21-2018 , 00:33   Re: [REQ]Flags Menu
Reply With Quote #2

In chat?
__________________
Taking paid private requests! Contact me
Cruze is offline
ApoziX
Member
Join Date: Sep 2018
Old 09-21-2018 , 07:43   Re: [REQ]Flags Menu
Reply With Quote #3

Quote:
Originally Posted by Cruze View Post
In chat?
No sir, Menu
__________________
Looking To Start A TF2 Community
My Discord | My Steam
ApoziX is offline
ThatKidWhoGames
Veteran Member
Join Date: Jun 2013
Location: IsValidClient()
Old 09-21-2018 , 08:03   Re: [REQ]Flags Menu
Reply With Quote #4

PHP Code:
#include <sourcemod>

public void OnPluginStart()
{
    
RegConsoleCmd("sm_tlist"Command_Callback);
}

public 
Action Command_Callback(int clientint args)
{
    
Menu menu = new Menu(Menu_Handler);
    
menu.SetTitle("Users with flag T:");
    
char name[32];
    
int count;
    for (
int i 1<= MaxClientsi++)
    {
        if (
IsClientInGame(i) && CheckCommandAccess(i"sm_admin"ADMFLAG_CUSTOM6))
        {
            
GetClientName(inamesizeof(name));
            
menu.AddItem(""nameITEMDRAW_DISABLED);
            
count++;
        }
    }

    if (!
count)
        
menu.AddItem("""No users found with flag T!"ITEMDRAW_DISABLED);

    
menu.Display(clientMENU_TIME_FOREVER);
    return 
Plugin_Handled;
}

public 
int Menu_Handler(Menu menuMenuAction actionint param1int param2)
{
    if (
action == MenuAction_End)
        
delete menu;

    return 
0;

Attached Files
File Type: sp Get Plugin or Get Source (tlist.sp - 133 views - 879 Bytes)

Last edited by ThatKidWhoGames; 09-21-2018 at 08:07.
ThatKidWhoGames is offline
ApoziX
Member
Join Date: Sep 2018
Old 09-21-2018 , 08:40   Re: [REQ]Flags Menu
Reply With Quote #5

Quote:
Originally Posted by ThatKidWhoGames View Post
PHP Code:
#include <sourcemod>

public void OnPluginStart()
{
    
RegConsoleCmd("sm_tlist"Command_Callback);
}

public 
Action Command_Callback(int clientint args)
{
    
Menu menu = new Menu(Menu_Handler);
    
menu.SetTitle("Users with flag T:");
    
char name[32];
    
int count;
    for (
int i 1<= MaxClientsi++)
    {
        if (
IsClientInGame(i) && CheckCommandAccess(i"sm_admin"ADMFLAG_CUSTOM6))
        {
            
GetClientName(inamesizeof(name));
            
menu.AddItem(""nameITEMDRAW_DISABLED);
            
count++;
        }
    }

    if (!
count)
        
menu.AddItem("""No users found with flag T!"ITEMDRAW_DISABLED);

    
menu.Display(clientMENU_TIME_FOREVER);
    return 
Plugin_Handled;
}

public 
int Menu_Handler(Menu menuMenuAction actionint param1int param2)
{
    if (
action == MenuAction_End)
        
delete menu;

    return 
0;

Thank you very much +rep
__________________
Looking To Start A TF2 Community
My Discord | My Steam
ApoziX is offline
ThatKidWhoGames
Veteran Member
Join Date: Jun 2013
Location: IsValidClient()
Old 09-21-2018 , 12:10   Re: [REQ]Flags Menu
Reply With Quote #6

Quote:
Originally Posted by ApoziX View Post
Thank you very much +rep
You're welcome!
ThatKidWhoGames 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 07:04.


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