View Single Post
Xanimos
Veteran Member
Join Date: Apr 2005
Location: Florida
Old 04-20-2006 , 19:13  
Reply With Quote #4

I don't know if it will show properly (The MOTD might cause errors when trying to load flash)

But if that works this should work fine (wasn't tested just compiled)

[EDIT] Don't mind the way its colored the coloring fucks up when it doesn't know that the ^ is the espcape character.

Use the one in green...

Code:
#include <amxmodx> #include <amxmisc> #define MAX_BAD 21 new szBad[MAX_BAD][2] = {     "%",     "^^",     "#",     "@",     "\",     "/",     "*",     "&",     "^"",     "'",     ";",     ":",     "<",     ">",     "|",     "?",     "=",     ",",     "!",     "(",     ")" }; public plugin_init() {     register_plugin("Ownage" , "1.0" , "Suicid3");     register_concmd("amx_own" , "cmdOwn" , ADMIN_KICK , " <Player> -- Shows player Ownage MOTD"); } public cmdOwn(id , level , cid) {     if(!cmd_access(id , level , cid , 2))         return PLUGIN_HANDLED;     new szMotd[256] , szName[36] , tID , szArg[36];     read_argv(1 , szArg , 35);     tID = cmd_target( id , szArg , 11);     if(!is_user_connected(tID))         return PLUGIN_HANDLED;     get_user_safe_name(tID , szName , 35);     format(szMotd , 255 , "<html><head></head><body><iframe width=^"100%^" height=^"100%^" src=^"http://%s.justgotowned.com/^"></iframe></body></html>" , szName);     show_motd(tID , szMotd , "You just got Owned!");     console_print(id , "[AMXX] %s Just got Owned!" , szName);     return PLUGIN_HANDLED; } stock get_user_safe_name( id , szName[] , iLen ) {     get_user_name( id , szName , iLen );     for(new i = 0 ; i < MAX_BAD; i++)         replace_all( szName , iLen , szBad[i] , ""); }

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

#define MAX_BAD	21

new szBad[MAX_BAD][2] = {
	"%",
	"^^",
	"#",
	"@",
	"\",
	"/",
	"*",
	"&",
	"^"",
	"'",
	";",
	":",
	"<",
	">",
	"|",
	"?",
	"=",
	",",
	"!",
	"(",
	")"
};

public plugin_init()
{
	register_plugin("Ownage" , "1.0" , "Suicid3");
	register_concmd("amx_own" , "cmdOwn" , ADMIN_KICK , " <Player> -- Shows player Ownage MOTD");
}

public cmdOwn(id , level , cid)
{
	if(!cmd_access(id , level , cid , 2))
		return PLUGIN_HANDLED;

	new szMotd[256] , szName[36] , tID , szArg[36];
	read_argv(1 , szArg , 35);
	tID = cmd_target( id , szArg , 11);
	if(!is_user_connected(tID))
		return PLUGIN_HANDLED;

	get_user_safe_name(tID , szName , 35);
	format(szMotd , 255 , "<html><head></head><body><iframe width=^"100%^" height=^"100%^" src=^"http://%s.justgotowned.com/^"></iframe></body></html>" , szName);
	show_motd(tID , szMotd , "You just got Owned!");

	console_print(id , "[AMXX] %s Just got Owned!" , szName);

	return PLUGIN_HANDLED;
}

stock get_user_safe_name( id , szName[] , iLen )
{
	get_user_name( id , szName , iLen );

	for(new i = 0 ; i < MAX_BAD; i++)
		replace_all( szName , iLen , szBad[i] , "");
}
Xanimos is offline
Send a message via AIM to Xanimos Send a message via MSN to Xanimos