How to use Hud Instead of Print.
Guys i have this code in zp extra item bazooka
Code:
public rk_sound(player) { How to convert that into hud message instead of a printed message.But the hud to be alligned in center too. Thanks in advance. |
Re: How to use Hud Instead of Print.
set_hudmessage() and show_hudmessage(). Look at how other plugins do it if you're unsure of how to use them.
|
Re: How to use Hud Instead of Print.
Fysiks i know these commands.But i dont know how to replace the above structure with hud message.Because the hud message must appear when the bazooka is reloaded along with the sound.I have tried but i cant figure it out.Would you mind if you know,which part i should remove from the code above and which part of hud message to add so it can work.To help you i just want the hud to be centered and have a visible color hud message.
|
Re: How to use Hud Instead of Print.
It's quite simple. Replace the client_print() function with both of the aforementioned functions with the arguments filled in. If you read the documentation, you'll notice that you use a -1.0 for x and y to set the text position to center. In fact, it looks like all arguments have a default value so you don't even need to supply any arguments as a quick test. If you're unsure how to use those functions, look up how other plugins use them. If you tried to write code, post it here and we can help you with it.
|
Re: How to use Hud Instead of Print.
Ok,I Figured it out.
I just replaced the below code: Code:
public rk_sound(player) { With this code: Code:
public rk_sound(player) { 1)I downloaded the dhudmessage include file and placed it under scripting/include folder. 2)Then added at top of .sma file the below code: Code:
#include <dhudmessage> Thats all,thanks for giving me ideas. |
Re: How to use Hud Instead of Print.
You can use regular hud messages, just saying.
|
Re: How to use Hud Instead of Print.
Thanks for that too.Because the one i make was like Titan Message Size.
|
All times are GMT -4. The time now is 06:08. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.