hello guys! This time i want to help me to edit the statsx in this way:
I want the command:
PHP Code:
register_clcmd("say /stats", "cmdStats", 0, "- display players stats (menu/MOTD)")
Works for 2 things:
1.Which brings by default, which is to show the menu with the players on the server
2.This is where i want to help me, what i achieve is that the command work in this way:
say /stats "name"
Where the word "name", is the name of the player which you are going to see their stats
The problem is that i have not succeeded in doing so, do it here:
PHP Code:
// Player stats menu.
public cmdStats(id)
{
if (!SayStatsAll)
{
client_print(id, print_chat, "%L", id, "DISABLED_MSG")
return PLUGIN_HANDLED
}
showStatsMenu(id, g_izUserMenuPosition[id] = 0)
return PLUGIN_CONTINUE
}
You try this way and not worked:
PHP Code:
// Player stats menu.
public cmdStats(id)
{
if (!SayStatsAll)
{
client_print(id, print_chat, "%L", id, "DISABLED_MSG")
return PLUGIN_HANDLED
}
showStatsMenu(id, g_izUserMenuPosition[id] = 0)
new arg[32]
read_args(arg, 31)
remove_quotes(arg)
new player = cmd_target(id, arg, CMDTARGET_OBEY_IMMUNITY | CMDTARGET_ALLOW_SELF)
format_stats(id, g_sBuffer)
get_user_name(player, t_sName, MAX_NAME_LENGTH)
show_motd(id, g_sBuffer, t_sName)
return PLUGIN_CONTINUE
}