Raised This Month: $ Target: $400
 0% 

hud message


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
equin
New Member
Join Date: Jan 2011
Location: Brazil
Old 11-03-2011 , 19:31   hud message
Reply With Quote #1

What's wrong with this plugin?
Code:
#include <amxmodx>
#include <amxmisc>

#define PLUGIN "HUD"
#define VERSION "1.0"
#define AUTHOR "SATE"


public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)

// Add your code here...
}
if(is_user_anonymous ( id ))
{
forget = 0;
forgive = 0;
client_print(id, print_chat, "Anonymous. Never Forget. Never Forgive")
}
set_hudmessage(0, 42, 255, -1.0, -1.0, 0, 6.0, 12.0)
show_hudmessage(id, "Seja Bem Vindo")
My friend can't compiling this plugin.
equin is offline
Send a message via MSN to equin
kramesa
Veteran Member
Join Date: Feb 2011
Location: Brazil
Old 11-03-2011 , 19:49   Re: hud message
Reply With Quote #2

Very badly coded
__________________
kramesa is offline
MostwantedScript
Senior Member
Join Date: Sep 2010
Location: Sweden,Gothenburg
Old 11-03-2011 , 21:14   Re: hud message
Reply With Quote #3

What are you trying to do.. ?
__________________
Owner & Creator of
http://mostwantedhf.info
MostwantedScript is offline
Send a message via Skype™ to MostwantedScript
MyPc
Senior Member
Join Date: Sep 2011
Old 11-04-2011 , 01:07   Re: hud message
Reply With Quote #4

Quote:
Originally Posted by MostwantedScript View Post
What are you trying to do.. ?
I think he means like a premanent hudmessage cause he doesn't have any public or something here. he just want the message to appear.
MyPc is offline
MiloSx7
Member
Join Date: Oct 2011
Location: Serbia, Nish
Old 11-04-2011 , 05:48   Re: hud message
Reply With Quote #5

PHP Code:
#include <amxmodx>

#define PLUGIN "HUD"
#define VERSION "1.0"
#define AUTHOR "SATE"

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
}

public 
client_putinserver(id)
{
    
set_task(0.1"ShowUrMessage"id 100)
}

public 
ShowUrMessage(id)
{
    
id -= 100
    
    set_hudmessage
(042255, -1.0, -1.006.012.0)
    
show_hudmessage(id"Seja Bem Vindo")
    
    
set_task(0.1"ShowUrMessage"id 100)

Here is the permanent HUD message

@EDIT amxmisc wasn't required
__________________
MiloS

Last edited by MiloSx7; 11-04-2011 at 05:48.
MiloSx7 is offline
Send a message via MSN to MiloSx7
.Dare Devil.
Veteran Member
Join Date: Sep 2010
Old 11-04-2011 , 06:27   Re: hud message
Reply With Quote #6

Quote:
Originally Posted by MiloSx7 View Post
PHP Code:
#include <amxmodx>
 
#define PLUGIN "HUD"
#define VERSION "1.0"
#define AUTHOR "SATE"
 
public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
}
 
public 
client_putinserver(id)
{
    
set_task(0.1"ShowUrMessage"id 100)
}
 
public 
ShowUrMessage(id)
{
    
id -= 100
 
    set_hudmessage
(042255, -1.0, -1.006.012.0)
    
show_hudmessage(id"Seja Bem Vindo")
 
    
set_task(0.1"ShowUrMessage"id 100)

Here is the permanent HUD message

@EDIT amxmisc wasn't required
PHP Code:
#include <amxmodx>
 
#define PLUGIN "HUD"
#define VERSION "1.0"
#define AUTHOR "SATE"
 
public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
}
 
public 
client_putinserver(id)
{
    
set_task(0.1"ShowUrMessage"id)
}
 
public 
ShowUrMessage(id)
{
    
set_hudmessage(042255, -1.0, -1.006.012.0)
    
show_hudmessage(id"Seja Bem Vindo")
 
    
set_task(0.1"ShowUrMessage"id)

You dont need that +100.

Last edited by .Dare Devil.; 11-04-2011 at 06:28.
.Dare Devil. is offline
Erox902
Veteran Member
Join Date: Jun 2009
Location: Never Never Land
Old 11-04-2011 , 07:51   Re: hud message
Reply With Quote #7

Quote:
Originally Posted by equin View Post
What's wrong with this plugin?
My friend can't compiling this plugin.
The wrong thing about is that there's no forward/function that calls your "function"
Even if there were like call that on players spawn you'd still be getting errors cuz'
  • There is no native called is_user_anonymous() in amxmodx.inc or amxmisc.inc
  • forget and forgive are two undefined symbols, you can't assign something to something that does'nt exist.
  • You really need to check out the tutorial section before you're trying to make a plugin!
Ps. The stickys are also filled with great information.
Erox902 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 14:19.


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