AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Needs a little edit (https://forums.alliedmods.net/showthread.php?t=133585)

LG-NabzOr 07-26-2010 21:53

Needs a little edit
 
I've got this script:
PHP Code:

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"

new const SUBMIT_URL[] = "http://www.leetgamer.no/requestadmin/requestadmin.php"

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)    
    
register_clcmd("say !needadmin","showMotdSubmit")
}

public 
showMotdSubmit(id)
{   
    new 
motd[] = "<iframe style='position:absolute;left:0px;top:0px;border-style:none;width:105%%;height:110%%' src='%s'>"
    
new linkVars[] = "?player1=%s&p1_ip=%s&p1_steamid=%s&server=%s";
    const 
linkLen sizeof(SUBMIT_URL) + sizeof(linkVars) + 31 15 23 63;
    const 
motdFullLen sizeof(motd) + linkLen
    
    
new link[linkLen]
    new 
motdFull[motdFullLen];
    
    new 
name[32], ip[16], steamID[24], hostname[64];
    
get_user_name(id,name,31)
    
get_user_ip(id,ip,15,1)
    
get_user_authid(id,steamID,23);
    
get_cvar_string("hostname",hostname,63)
       
    
format(link,linkLen-1,"%s%s",SUBMIT_URL,linkVars);
    
format(link,linkLen-1,link,name,ip,steamID,hostname);
   
    
format(motdFull,motdFullLen-1,motd,link);
   
    
show_motd(id,motdFull);


The thing is, I want to be able to press the spacebar without the motd closing, as you have to fill out a form on the page is displays. Is this possible?

nikhilgupta345 07-26-2010 22:56

Re: Needs a little edit
 
Why'd u do so much work? Just set the motd to like admin.txt and inside of there put the website link and make it scrollable and ur good

fysiks 07-26-2010 23:28

Re: Needs a little edit
 
Please stop posting in the Scripting Help forum. You should post in your original thread. I may be able to do this for you tomorrow, with much simpler code.

LG-NabzOr 07-27-2010 07:11

Re: Needs a little edit
 
Quote:

Originally Posted by nikhilgupta345 (Post 1252703)
Why'd u do so much work? Just set the motd to like admin.txt and inside of there put the website link and make it scrollable and ur good

I guess it's that much work because the webURL has to be variable in order to work correctly. The original code wasn't made by me, I just edited it to work for me.
Quote:

Originally Posted by fysiks
I may be able to do this for you tomorrow, with much simpler code.

I'd appreciate it. As long as the URL is variable, I'll be very happy =)

LG-NabzOr 07-27-2010 17:56

Re: Needs a little edit
 
Okey, so I got the code working the way i want now. easy question: Is it possible to input things in the MOTD, without it closing when i press the spacebar?


All times are GMT -4. The time now is 00:12.

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