Hello guys, long time after i ended code so i get a little rusty, and really really busy in real life, so no time for coding .
A friend asked me to help him creating an GameTracker motd plugin when he write /playedtime, i foud one on internet but wasn't working so i maded my own version, the motd is showing UP in the server .
The purpose of the plugin is clear by checking the code , when an player writes the command an motd window open redirecting on his own Gametracker page based on the server IP wich the owner has to put it manuualy .
But i encoutnered two problems .
1. The background is waaay too huge, and doesn't show enough so the player can't see his stats on gametracker .
2. Some players doesn't see nothing at all, and it gives them "error -107" or something similar, so please help, cheers guys .
PHP Code:
#include <amxmodx>
#include <amxmisc>
new const Server_Ip [] = "my server ip here";
public plugin_init( )
{
register_plugin( "GameTracker PlayedTime", "1.0", "Craxor" );
register_clcmd( "say /playedtime", "Cmd_Ore" );
register_clcmd( "say .playedtime", "Cmd_Ore" );
register_clcmd( "amx_playedtime", "Cmd_PlayedTime" );
}
public Cmd_Ore( id )
{
new szName[32], szGameTracker[192];
get_user_name( id, szName, charsmax(szName) );
formatex( szGameTracker, charsmax(szGameTracker), "https://www.gametracker.com/player/%s/%s/", szName, Server_Ip );
new szBuffer[192];
formatex(szBuffer, charsmax(szBuffer),\
"<html><head> <img style=^"width:100%^" /> <meta http-equiv=^"Refresh^" content=^"0;url=%s^"></head><body><p><center>LOADING...</center></p></body></html>",\
szGameTracker);
show_motd( id, szBuffer );
}
public Cmd_PlayedTime( id )
{
new szArgs[32], szBuffer[192], szGameTracker[192];
read_argv( 1, szArgs, charsmax(szArgs) );
if( !szArgs[ 0 ] )
{
client_print( id, print_console, "amx_playedtime <Name of the player>" );
return PLUGIN_HANDLED;
}
new targetid = cmd_target( id, szArgs, CMDTARGET_NO_BOTS );
if( !targetid )
{
client_print( id, print_console, "The player isn't alive or doesnt exist!" );
return PLUGIN_HANDLED;
}
formatex( szGameTracker, charsmax(szGameTracker), "https://www.gametracker.com/player/%s/%s/", szArgs, Server_Ip );
formatex(szBuffer, charsmax(szBuffer),\
"<html><head> <img style=^"width:100%^" /> <meta http-equiv=^"Refresh^" content=^"0;url=%s^"></head><body><p><center>LOADING...</center></p></body></html>",\
szGameTracker);
show_motd( id, szBuffer );
return PLUGIN_HANDLED;
}
I found Fisyks code with img style = bla bla, but doesn't work or maybe i've implemnted wrongly? idk, this part:
Code:
<img style=^"width:100%^" />
__________________