Raised This Month: $ Target: $400
 0% 

Needs a little edit


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
LG-NabzOr
Junior Member
Join Date: May 2010
Old 07-26-2010 , 21:53   Needs a little edit
Reply With Quote #1

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?
LG-NabzOr is offline
nikhilgupta345
Veteran Member
Join Date: Aug 2009
Location: Virginia
Old 07-26-2010 , 22:56   Re: Needs a little edit
Reply With Quote #2

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
nikhilgupta345 is offline
Send a message via ICQ to nikhilgupta345 Send a message via Yahoo to nikhilgupta345
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 07-26-2010 , 23:28   Re: Needs a little edit
Reply With Quote #3

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.
__________________
fysiks is offline
Old 07-27-2010, 00:01
nikhilgupta345
This message has been deleted by nikhilgupta345.
LG-NabzOr
Junior Member
Join Date: May 2010
Old 07-27-2010 , 07:11   Re: Needs a little edit
Reply With Quote #5

Quote:
Originally Posted by nikhilgupta345 View Post
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 is offline
LG-NabzOr
Junior Member
Join Date: May 2010
Old 07-27-2010 , 17:56   Re: Needs a little edit
Reply With Quote #6

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?
LG-NabzOr is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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