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_Users, ADMFLAG_BAN, "sm_allinfo - .::[Name ::STEAM ID ::IP ]::.");
}
public Action:Command_Users(client, args)
{
new target;
if (args == 1)
{
decl String:arg[MAX_NAME_LENGTH];
GetCmdArg(1, arg, sizeof(arg));
target = FindTarget(client, arg, false, false);
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(target, t_name, sizeof(t_name));
GetClientIP(target, t_ip, sizeof(t_ip));
GetClientAuthString(target, t_steamid, sizeof(t_steamid));
PrintToConsole(client, "# %s %s %s", t_name, t_ip, t_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 =)
__________________