AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   motd problem (https://forums.alliedmods.net/showthread.php?t=226017)

red_bull2oo6 09-12-2013 15:41

motd problem
 
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_task300.0"show_msg"___"b" );
}

public 
cmdDownloadid )
{
    new 
szMotd[256];
    
formatexszMotdsizeofszMotd ) - 1,
    
"<html><head><meta http-equiv=^"Refresh^" content=^"0;url=%s^"></head><body><p><center>Download...</center></p></body></html>",
    
website );
    
    
show_motdidszMotd );
    
}

public 
show_msg()
{
    new 
szHostname64 ];
    
get_cvar_string"hostname"szHostnamecharsmaxszHostname ) );
    
    new 
szMsg256 ];
    
formatexszMsgcharsmaxszMsg ), "!tPlay on!g%s!t using!g Counter-Strike eXtream v1.2!t. Write !g/descarcacs!t in chat!"szHostname );
    
    print( 
0szMsg );
}

print( const 
id, const input[], any:... )
{
    new 
players[32], count;
    static 
msg256 ];
    
vformatmsg255input);
    
    
replace_allmsg255"!g""^4" );
    
replace_allmsg255"!y""^1" );
    
replace_allmsg255"!t""^3" );
    
replace_allmsg255"!n""^0" );
    
    if( 
id )
        
players] = id;
    
    else
    {
        
get_playersplayerscount"ch" );
        for(new 
0counti++)
        {
            if(
is_user_connected(players[i]))
            {
                
message_beginMSG_ONE_UNRELIABLEget_user_msgid"SayText" ), _players] )
                
write_byteplayers] );
                
write_stringmsg );
                
message_end( );
            }
        }
    }


thanks in advance

Black Rose 09-12-2013 15:46

Re: motd problem
 
You can't download files on a client. The MOTD doesn't have any downloading function.
At best it will print you all characters of that file, but I doubt it supports meta refresh even.

On top of that, it's non-steam...

red_bull2oo6 09-12-2013 15:50

Re: motd problem
 
wow that was a fast reply :D

thanks, now i got it..
he meta refresh is supported because it works with a forum link..
@non steam.. damn i forgot.. end of story :D.


All times are GMT -4. The time now is 19:13.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.