Raised This Month: $ Target: $400
 0% 

WTF is wrong with this 5-line code?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
fiendshard
Senior Member
Join Date: Dec 2009
Location: In Water
Old 05-03-2010 , 20:39   WTF is wrong with this 5-line code?
Reply With Quote #1

hello guys,

can somebody help about this small code-
idea is to constantly show name of the next map under radar:

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

public plugin_init()
	register_plugin("nextmapradar","1.0","author")
{
            new nextmap[31]
	    
       	format(message,255,"Nextmap: %s", nextmap)
			
                set_hudmessage (255, 0, 0, 0.0, 0.14, 0, 6.0, -1)
                show_hudmessage(id, message)
}
__________________
fiendshard is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 05-03-2010 , 20:45   Re: WTF is wrong with this 5-line code?
Reply With Quote #2

There are not players yet in the server when plugin_init is called so this will never work.
Code:
#include <amxmodx> #include <amxmisc> public plugin_init() //This line has to be within the brackets     register_plugin("nextmapradar","1.0","author") {      new nextmap[31]      //message variable not defined and nextmap will always be empty          //You should also use formatex()      format(message,255,"Nextmap: %s", nextmap)                  set_hudmessage (255, 0, 0, 0.0, 0.14, 0, 6.0, -1)      //id is not defined      show_hudmessage(id, message) }
__________________
Bugsy is offline
Old 05-03-2010, 20:49
wrecked_
This message has been deleted by wrecked_. Reason: Yeah, that.
fiendshard
Senior Member
Join Date: Dec 2009
Location: In Water
Old 05-04-2010 , 05:39   Re: WTF is wrong with this 5-line code?
Reply With Quote #4

thank you guys
__________________
fiendshard 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 03:45.


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