fmt was introduced in amxx 1.9
PHP Code:
#include <amxmodx>
#define WEB_URL "https://google.com/search?q="
public plugin_init()
{
register_clcmd("say", "hook_say")
}
public hook_say(id)
{
new text[8]
read_argv(1, text, charsmax(text))
if( equal(text, "top", 3) )
{
new iValue = str_to_num(text[3])
if( iValue > 0 )
{
show_motd(id, fmt("%s%d", WEB_URL, iValue), fmt("Top %d | %s", iValue, __DATE__))
}
return PLUGIN_HANDLED
}
return PLUGIN_CONTINUE
}
__________________