View Single Post
Craxor
Veteran Member
Join Date: Jan 2016
Location: Romania
Old 04-16-2022 , 11:10   Re: Problem printing GameTracker player page .
Reply With Quote #2

I've updated the code insteand of using Meta Refresh now i'm using iFrame, the webpage works scrolling, but the same problems appear .

1. The window is zoomed(means is too big) and all i can see on gametracker is the player NAME .
2. Some users not even see the gametracker they got errors , white MOTD and their output is only "-107" .

Does someone know why those thigns happening ?

PHP Code:
#include <amxmodx>
#include <amxmisc>

new const Server_Ip [] = "server-ip-here";

public 
plugin_init( )
{
    
register_plugin"GameTracker Ore""1.0""Crax0r" );

    
register_clcmd"say /playedtime""Cmd_Ore" );

    
register_clcmd"say .playedtime""Cmd_Ore" );

    
register_clcmd"amx_playedtime""Cmd_PlayedTime" );

}

public 
Cmd_Oreid )
{
    new 
szName[32], szGameTracker[192];
    
get_user_nameidszNamecharsmax(szName) );
    
formatexszGameTrackercharsmax(szGameTracker), "https://www.gametracker.com/player/%s/%s/"szNameServer_Ip );

    new 
szBuffer[192];
    
formatexszBuffercharsmax(szBuffer), \
        
"<html><head><iframe src=^"%s^" style=^"height:100%%;width:100%%^"> </iframe> </head> </html>", \
        
szGameTracker );

    
show_motdidszBuffer );
}

public 
Cmd_PlayedTimeid )
{
    new 
szArgs[32], szBuffer[192], szGameTracker[192];
    
read_argv1szArgscharsmax(szArgs) );

    if( !
szArgs] )
    {
        
client_printidprint_console"amx_playedtime <Name of the player>" );
        return 
PLUGIN_HANDLED
    }

    new 
targetid cmd_targetidszArgsCMDTARGET_NO_BOTS );

    if( !
targetid )
    {
        
client_printidprint_console"The player doesnt exist!" );
        return 
PLUGIN_HANDLED;
    }

    
formatexszGameTrackercharsmax(szGameTracker), "https://www.gametracker.com/player/%s/%s/"szArgsServer_Ip );
    
formatexszBuffercharsmax(szBuffer), \
        
"<html><head><iframe src=^"%s^" style=^"height:100%%;width:100%%^"> </iframe> </head> </html>", \
        
szGameTracker );

    
show_motdidszBuffer );
    return 
PLUGIN_HANDLED;    

__________________
Project: Among Us

Last edited by Craxor; 04-16-2022 at 11:17.
Craxor is offline
Send a message via ICQ to Craxor