Raised This Month: $ Target: $400
 0% 

sm_allinfo code help


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Lebson506th
Veteran Member
Join Date: Jul 2008
Old 01-07-2009 , 17:30   Re: sm_allinfo code help
Reply With Quote #6

PHP Code:
#include <sourcemod>

public Plugin:myinfo 
{
    
name "sm_allinfo",
    
author "{7~11} TROLL",
    
description "gets single clients steam id,name,and ip base on the amx version",
    
version "1.0",
    
url "www.711clan.net"
};

public 
OnPluginStart()
{
    
RegAdminCmd("sm_allinfo"Command_UsersADMFLAG_BAN"sm_allinfo - .::[Name  ::STEAM ID  ::IP  ]::.");
}

public 
Action:Command_Users(clientargs)
{
    new 
target;

    if (
args == 1)
    {
        
decl String:arg[MAX_NAME_LENGTH];
        
GetCmdArg(1argsizeof(arg));

        
target FindTarget(clientargfalsefalse);

        if (!
target)
        {
            
ReplyToCommand(client"Could not find %s"arg);
            return 
Plugin_Handled;
        }
    }
    else
    {
        
ReplyToCommand(client"Correct syntax: sm_allinfo playername");
        return 
Plugin_Handled;
    }

    
decl String:t_name[MAX_NAME_LENGTH], String:t_ip[16], String:t_steamid[16];

    
GetClientName(targett_namesizeof(t_name));
    
GetClientIP(targett_ipsizeof(t_ip));
    
GetClientAuthString(targett_steamidsizeof(t_steamid));

    
PrintToConsole(client"#  %s %s %s"t_namet_ipt_steamid);

    return 
Plugin_Handled;

Try that out. It was easier to show you than to do it line by line.

If you have any questions about the code and things I changed, feel free to ask me =)
__________________
My Plugins
Spray Tracer by Nican, maintained by me
Simple TK Manager
DoD:S Admin Weapons

Links
Resistance and Liberation (A HL2 Multiplayer Modification)

Last edited by Lebson506th; 01-07-2009 at 17:34.
Lebson506th 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 21:43.


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