View Single Post
bigdaddy424
Senior Member
Join Date: Oct 2021
Location: Jupiter
Old 03-13-2023 , 20:13   Re: say number motd number
Reply With Quote #14

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(1textcharsmax(text))

    if( 
equal(text"top"3) )
    {
        new 
iValue str_to_num(text[3])
        if( 
iValue )
        {
            
show_motd(idfmt("%s%d"WEB_URLiValue), fmt("Top %d | %s"iValue__DATE__))
        }
        return 
PLUGIN_HANDLED
    
}

    return 
PLUGIN_CONTINUE

__________________
bigdaddy424 is offline