PDA

View Full Version : img in motd


Debesėlis
11-30-2010, 09:45
Why doesn`t show img?

new g_WebSite;

public plugin_init ( ) {
g_WebSite = register_cvar( "amx_website", "www.--.com" );
}
// get your pcvar value as a string
new szURL[33];
get_pcvar_string(g_WebSite, szURL, 32);
iLen += formatex( sBuffer[ iLen ], CharsMax( sBuffer ) - iLen, "<center><img src='http://%s/images/image_01.jpg'></img></center><br>", szURL);

Exolent[jNr]
11-30-2010, 13:06
You have an unnecessary space in the img tag and also img has no closing tag.

iLen += formatex( sBuffer[ iLen ], CharsMax( sBuffer ) - iLen, "<center><img src='http://%s/images/image_01.jpg'></center><br>", szURL);

Try printing the variable to make sure the website is right.

log_amx( "website: %s", sBuffer );

Debesėlis
11-30-2010, 13:21
good thank you.

fysiks
11-30-2010, 18:22
I didn't think single quotes worked in HTML for parameters.