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

How to make dhud message?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
GlobalPlague
Senior Member
Join Date: Feb 2016
Location: Pluto
Old 11-18-2021 , 04:02   How to make dhud message?
Reply With Quote #1

I added "#include <dhudmessage>" where the other includes are added, at the top of the plugin's code.

Then, I changed this:

Code:
	set_hudmessage(0, 255, 0, HUD_MODE_X, HUD_MODE_Y, 0, 6.0, HOLD_TIME, 0.0, 0.0, -1)
	ShowSyncHudMsg(0, g_SyncHud, "Assassin has %d health points!", get_user_health(id))
To this:
Code:
	set_dhudmessage(0, 255, 0, HUD_MODE_X, HUD_MODE_Y, 0, 6.0, HOLD_TIME, 0.0, 0.0, -1)
	set_dhudmessage(0, g_SyncHud, "Assassin has %d health points!", get_user_health(id))
Here is what the compiler said:

// C:\Mod\cstrike\addons\amxmodx\scripting\healt h_reminder_nem.sma(61) : warning 213: tag mismatch
// C:\Mod\cstrike\addons\amxmodx\scripting\healt h_reminder_nem.sma(62) : error 035: argument type mismatch (argument 3)


The lines I edited are line 61 and line 62.

What did I do wrong?
GlobalPlague is offline
iceeedr
Veteran Member
Join Date: Apr 2017
Location: Brazil
Old 11-18-2021 , 08:32   Re: How to make dhud message?
Reply With Quote #2

Quote:
Originally Posted by GlobalPlague View Post
I added "#include <dhudmessage>" where the other includes are added, at the top of the plugin's code.

Then, I changed this:

Code:
	set_hudmessage(0, 255, 0, HUD_MODE_X, HUD_MODE_Y, 0, 6.0, HOLD_TIME, 0.0, 0.0, -1)
	ShowSyncHudMsg(0, g_SyncHud, "Assassin has %d health points!", get_user_health(id))
To this:
Code:
	set_dhudmessage(0, 255, 0, HUD_MODE_X, HUD_MODE_Y, 0, 6.0, HOLD_TIME, 0.0, 0.0)
	set_dhudmessage(0, "Assassin has %d health points!", get_user_health(id))
Here is what the compiler said:

// C:\Mod\cstrike\addons\amxmodx\scripting\healt h_reminder_nem.sma(61) : warning 213: tag mismatch
// C:\Mod\cstrike\addons\amxmodx\scripting\healt h_reminder_nem.sma(62) : error 035: argument type mismatch (argument 3)


The lines I edited are line 61 and line 62.

What did I do wrong?
Code:
set_dhudmessage(0, 255, 0, HUD_MODE_X, HUD_MODE_Y, 0, 6.0, HOLD_TIME, 0.0, 0.0)
show_dhudmessage(0, "Assassin has %d health points!", get_user_health(id)
__________________


Quote:
Originally Posted by fysiks View Post
Please stop trying to help. You appear to just be posting random stuff. Wait until you actually understand more about AMX Mod X and how the game works.
https://iceeedr.com.br/

Last edited by iceeedr; 11-18-2021 at 08:33.
iceeedr is offline
Send a message via Skype™ to iceeedr
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 11-18-2021 , 15:34   Re: How to make dhud message?
Reply With Quote #3

You really need to start looking at the include files and the natives you are using. They have a list of parameters, you have to respect that. There is no magic way of knowing how to write native calls but it's not hard either, please look at the include files and see what parameters ars needed and in which order.
If you did that, you'd already have your answer.
__________________
HamletEagle 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