Hello,
I have a problem with getting a SteamID from GetCmdArg. For example, I enter to the server console:
sm_cmd STEAM_1:0:00000 6 and I get output
Steamid: STEAM_1 | Days: :
PHP Code:
#include <sourcemod>
public OnPluginStart()
{
RegAdminCmd("sm_cmd", cmd, ADMFLAG_ROOT);
}
public Action cmd(client, args)
{
if(!GetClientOfUserId(client)) //Command only for console
{
char cmd_steamid[128];
GetCmdArg(1, cmd_steamid, sizeof(cmd_steamid));
char cmd_days[128];
GetCmdArg(2, cmd_days, sizeof(cmd_days));
PrintToServer("Steamid: %s | Days: %s", cmd_steamid, cmd_days);
}
}
I don't know what's wrong. Thanks for help.
__________________