AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   code not working! (https://forums.alliedmods.net/showthread.php?t=240056)

skype321 05-08-2014 07:16

code not working!
 
hey i am noob at coding so i just wrote this small piece of code but it's not working
/* Plugin generated by AMXX-Studio */

PHP Code:

#include <amxmodx>
new const MOTD1[] = "<style type=^"text/css^"><!--body{margin-top:0px;margin-bottom:0px;background-color:#000000;}--></style><body><div align=center><iframe src=^"http://www.google.com/^" scrolling=^"no^" style=^"height:590px;border:none;width:650px;margin-top:-230px;overflow:hidden^"></iframe></div></body>";
#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"


public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_clcmd("say /top""topplayer")
}

public 
topplayer(id) {
    
show_motd(id,MOTD1,"Top Player");


P.S ignore www.google.com

EDUTz 05-08-2014 07:51

Re: code not working!
 
why not like this :

Quote:

Originally Posted by skype321 (Post 2135161)
PHP Code:

#include <amxmodx>

public plugin_init() {
    
register_plugin("MOTD""1.0""author")
    
register_clcmd("say /top""topplayer")
}

public 
topplayer(id) {
    
show_motd(id,"examplemotd.txt","Top Player");



and put your text in examplemotd.txt (in cstrike folder) ... should be working without problems ...

skype321 05-08-2014 07:58

Re: code not working!
 
Quote:

Originally Posted by EDUTz (Post 2135169)
why not like this :



and put your text in examplemotd.txt (in cstrike folder) ... should be working without problems ...

but i want to fetch my data from internet!

jimaway 05-08-2014 08:03

Re: code not working!
 
show_motd(id, "http://www.google.com", "Top Player")

swapped 05-08-2014 10:23

Re: code not working!
 
Code:
 show_motd ( player, const message[], const header[] = )

player - The player index
message - "The Message"
header - the motd title.

Example:

Open an url:
Code:
show_motd(id, "http://www.url.com", "title")

Open motd:
Code:
show_motd(id, "donate.html", "Donate")

fysiks 05-08-2014 15:27

Re: code not working!
 
The forum rules require that your topic title be descriptive. Please update your topic title to better describe your issue or question. If you fail to do so, you risk your thread being trashed.


All times are GMT -4. The time now is 09:38.

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