Raised This Month: $12 Target: $400
 3% 

Hudmessage info..


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
wEight
BANNED
Join Date: Jan 2015
Old 04-21-2015 , 15:27   Hudmessage info..
Reply With Quote #1

PHP Code:
#include <amxmodx>

new const PLUGIN[] = "HudMSG";
new const 
VERSION[] = "1.0";
new const 
AUTHOR[] = "wEight";

public 
plugin_init()
{
register_plugin(PLUGINVERSIONAUTHOR);
}

public 
client_putinserver()
{
new 
szSteamId[35];
get_user_authididszSteamId34 );
new 
health[6];
get_user_health(idhealth5);
new 
pingloss;
get_user_ping(idpingloss);
new 
nextmap[32];
get_cvar_string("amx_nextmap"nextmap31);
set_hudmessage(1272122550.00.216.01.0) ;
show_hudmessage(0"Tvoj steam: %s^nHealth: %s^nTvoj ping:%s|%s^nSledeca mapa: %s"szSteamIdhealthpinglossnextmap);
set_task(0.9"client_putinserver");

Code:
sdasdasd.sma(15) : error 017: undefined symbol "id"
sdasdasd.sma(15) : warning 215: expression has no effect
sdasdasd.sma(15) : warning 215: expression has no effect
sdasdasd.sma(15) : error 001: expected token: ";", but found ")"
sdasdasd.sma(15) : error 029: invalid expression, assumed zero
sdasdasd.sma(15) : fatal error 107: too many error messages on one line
How 2 fix it?
wEight is offline
wickedd
Veteran Member
Join Date: Nov 2009
Old 04-21-2015 , 15:37   Re: Hudmessage info..
Reply With Quote #2

To fix that error
Code:
public client_putinserver()


Code:
public client_putinserver( id ) 
However, your plugin will not work. What are you trying to do?
__________________
Just buy the fucking game!!!!
I hate No-Steamers and lazy ass people.
wickedd is offline
Jhob94
AMX Mod X Donor
Join Date: Jul 2012
Location: Siiiiiiiiuu
Old 04-21-2015 , 15:37   Re: Hudmessage info..
Reply With Quote #3

client_putinserver() -> client_putinserver(id)

get_user_health(id, health, 5) Are you serious? First, the native works like: get_user_health(id). And really that you are trying to get user health at client authorized? Probably he won't be alive yet.

Health: %s -> Health: %d

set_task(0.9, "client_putinserver"); -> set_task(0.9, "client_putinserver", id) // Anyway, it's not a good idea to loop client_putinserver
__________________
Jhob94 is offline
EpicKiller
Senior Member
Join Date: Jun 2014
Location: Constanta, Romania
Old 04-21-2015 , 15:39   Re: Hudmessage info..
Reply With Quote #4

First, you need to pass "id" as a parameter of client_putinserver. Second, get_user_health is a one-parameter function, it's "get_user_health(1%)". So you can create a pointer variable, "new iHealth = get_user_health(id);" instead of what you've done. And third, just as a piece of advice, you'd better use charsmax instead of sizeof-1.


EDIT: Sorry, didn't get to see your posts, guys.
__________________
~ Swiftly and with style ~

Last edited by EpicKiller; 04-21-2015 at 15:41.
EpicKiller is offline
Send a message via Yahoo to EpicKiller Send a message via Skype™ to EpicKiller
wEight
BANNED
Join Date: Jan 2015
Old 04-22-2015 , 02:27   Re: Hudmessage info..
Reply With Quote #5

Do they really need to have g_, sz, I,.. ?
wEight is offline
EpicKiller
Senior Member
Join Date: Jun 2014
Location: Constanta, Romania
Old 04-22-2015 , 04:33   Re: Hudmessage info..
Reply With Quote #6

Quote:
Originally Posted by wEight View Post
Do they really need to have g_, sz, I,.. ?
No, they don't need to. I guess it's a matter of organizing personal preference.
__________________
~ Swiftly and with style ~
EpicKiller is offline
Send a message via Yahoo to EpicKiller Send a message via Skype™ to EpicKiller
Reply


Thread Tools
Display Modes

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 15:48.


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