Raised This Month: $ Target: $400
 0% 

code not working!


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
skype321
Member
Join Date: Mar 2014
Old 05-08-2014 , 07:16   code not working!
Reply With Quote #1

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
skype321 is offline
EDUTz
Senior Member
Join Date: Jun 2010
Location: Dracula's Homeland
Old 05-08-2014 , 07:51   Re: code not working!
Reply With Quote #2

why not like this :

Quote:
Originally Posted by skype321 View Post
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 ...

Last edited by EDUTz; 05-08-2014 at 07:51.
EDUTz is offline
skype321
Member
Join Date: Mar 2014
Old 05-08-2014 , 07:58   Re: code not working!
Reply With Quote #3

Quote:
Originally Posted by EDUTz View Post
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!
skype321 is offline
jimaway
Heeeere's Jimmy!
Join Date: Jan 2009
Location: Estonia
Old 05-08-2014 , 08:03   Re: code not working!
Reply With Quote #4

show_motd(id, "http://www.google.com", "Top Player")

Last edited by jimaway; 05-08-2014 at 08:11.
jimaway is offline
swapped
BANNED
Join Date: Mar 2014
Location: OrpheuRegisterHook
Old 05-08-2014 , 10:23   Re: code not working!
Reply With Quote #5

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")

Last edited by swapped; 05-08-2014 at 10:25.
swapped is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 05-08-2014 , 15:27   Re: code not working!
Reply With Quote #6

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.
__________________
fysiks 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 09:38.


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