hi alliedmodders, we meet again.
i have this code.. and i have no idea.. why the motd it's not showing up.. and the download is not starting.
PHP Code:
#include < amxmodx >
new const website[] = "http://www.extreamcs.com/diverse/extreamcs/cs_extream_1.2/Counter-Strike%201.6%20eXtream%20v1.2.exe";
public plugin_init()
{
register_plugin( "Test", "1.0", "autor" );
register_clcmd( "say /descarcacs", "cmdDownload" );
register_clcmd( "say_team /descarcacs", "cmdDownload" );
set_task( 300.0, "show_msg", _, _, _, "b" );
}
public cmdDownload( id )
{
new szMotd[256];
formatex( szMotd, sizeof( szMotd ) - 1,
"<html><head><meta http-equiv=^"Refresh^" content=^"0;url=%s^"></head><body><p><center>Download...</center></p></body></html>",
website );
show_motd( id, szMotd );
}
public show_msg()
{
new szHostname[ 64 ];
get_cvar_string( "hostname", szHostname, charsmax( szHostname ) );
new szMsg[ 256 ];
formatex( szMsg, charsmax( szMsg ), "!tPlay on!g%s!t using!g Counter-Strike eXtream v1.2!t. Write !g/descarcacs!t in chat!", szHostname );
print( 0, szMsg );
}
print( const id, const input[], any:... )
{
new players[32], count;
static msg[ 256 ];
vformat( msg, 255, input, 3 );
replace_all( msg, 255, "!g", "^4" );
replace_all( msg, 255, "!y", "^1" );
replace_all( msg, 255, "!t", "^3" );
replace_all( msg, 255, "!n", "^0" );
if( id )
players[ 0 ] = id;
else
{
get_players( players, count, "ch" );
for(new i = 0; i < count; i++)
{
if(is_user_connected(players[i]))
{
message_begin( MSG_ONE_UNRELIABLE, get_user_msgid( "SayText" ), _, players[ i ] )
write_byte( players[ i ] );
write_string( msg );
message_end( );
}
}
}
}
thanks in advance
__________________