AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   Solved PrintHintTextToAll to make a HUD (https://forums.alliedmods.net/showthread.php?t=319218)

s0o 10-19-2019 16:02

PrintHintTextToAll to make a HUD
 
Hello !

I want to do a HUD like this : https://ibb.co/s9ZnznJ (don't care about the red circle, I take the screen from another post)

but I don't know how. Can someone help me please ?

I've already make this (I begin in SourcePawn developpement and I think that a bad code sry :p) :

Spoiler

Chrissy 10-19-2019 18:29

Re: PrintHintTextToAll to make a HUD
 
Use "\n" it means next line.

Code:

                                char sHintText[128];

                                FormatEx(sHintText, sizeof(sHintText), "<font face='Stratum2'><font size='30'>  Current Spell</font></font>\n");
                                FormatEx(sHintText, sizeof(sHintText), "%s<font size='20'>  %s</font></font>", sHintText, sCurrentSpell);
                               
                                PrintHintText(i, sHintText);


hleV 10-21-2019 02:45

Re: PrintHintTextToAll to make a HUD
 
I believe you should be using Format instead of FormatEx if you're reusing output buffer as input parameter.

s0o 10-21-2019 12:20

Re: PrintHintTextToAll to make a HUD
 
Thanks guys ! I just create a Timer and function for the PrintHintTextToAll and that works xd


All times are GMT -4. The time now is 01:11.

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