[L4D2] HUD Server Logo
2 Attachment(s)
Note:
The included script is not an .sp file, but a .nut. That's because left 4 dead 2 does not support the HUD synchronization object created by sourcemod and the user messages through the StartMessage function. Valve launched the L4D2 EMS (Left 4 Dead 2 Expanded Mutation System) which now includes methods to make a controllable "HUD" scripted to make simple text-based UIs for your game modes. More information in: https://developer.valvesoftware.com/.../Appendix:_HUD Info This VScript allows a text on the screen (HUD) to be displayed with some settings. Images Attachment 166565 VScript File Code:
HUDTable <-- HUDTable: Table that defines your in-game HUD - Fields: This contains whichever of these you want - though you _need_ a slot and at least one data element!
- g_ModeScript: Global reference to the Mode Script scope. Does load the script when set/change the game mode. - HUDPlace (slot, x, y, w, h) (Optional): If you want to configure the text box: make it larger because the text is not complete or change its position on the screen. * Note: x,y,w,h are all 0.0-1.0 screen relative coordinates (actually, a bit smaller than the screen, but anyway).
Flags Values: Code:
HUD_FLAG_PRESTR/POSTST: do you want a string/value pair to start(pre) or end(post) with the static string (default is PRE)https://developer.valvesoftware.com/...-Hud_slots.jpg * The name of the file has to be the name of its game mode. If your server is coop, the file should be called coop.nut, if it is versus: versus.nut, and so on for other game modes. Installation:
|
Re: [L4D2] HUD Server Logo
Good Job
|
Re: [L4D2] HUD Server Logo
good job ....
|
Re: [L4D2] HUD Server Logo
(in-before-valve-patch) nice work :)
|
Re: [L4D2] HUD Server Logo
Hello, im trying execute this script but it doesnt work. The hud does work when i put it in the versus.nut, just doesnt work when i put it in myscript.nut and then try to execute it via command.
The script: Code:
ModeHUD <-Code:
Any ideas? |
Re: [L4D2] HUD Server Logo
Can't seem to get it to work at all, is the method still relevant?
|
Re: [L4D2] HUD Server Logo
not work l4d2
|
Re: [L4D2] HUD Server Logo
Quote:
just deleted admin command addons from steam workshop :D |
Re: [L4D2] HUD Server Logo
zaviier you're right,
I remember having this kind of problem when I had some SteamWorkshop addons installed, and actually it was the "Admin Command" that caused that wrong behavior. This is because this addon modifies/creates some ".nut" files and the "coop.nut" file is one of them, so even if you create one by hand, it will be replaced by the addon, in other words, your text logo will never show. |
Re: [L4D2] HUD Server Logo
The method indeed still works as described by zaviier and Marttt.
I was actually wondering if anyone could tell me how possible it is to make a "Rounds restarted:" counter? Is there a variable that would be responsible for that? Simply just to count how many rounds are restarted. |
Re: [L4D2] HUD Server Logo
You could try reading this part on the docs:
https://developer.valvesoftware.com/.../Appendix:_HUD PHP Code:
Is possible to use my [L4D2] Scripted HUD plugin to achieve that through SM. Although it has some limitations, I know that on SM1.11 they are adding more support to some stuff that EMS script needs so probably in some months that could be improved. |
Re: [L4D2] HUD Server Logo
Quote:
I was actually thinking about using your addon instead since there's nothing that interferes with the .nut gamemode files on my server. How would one go about tracking restarts through this plugin and SM though? I'm clueless either way. :| UPD: Thanks to Marttt for the replies and pointers. I'm afraid I'm absolutely clueless about scripting, so I'll try to post this in plugin requests. |
Re: [L4D2] HUD Server Logo
There are several ways, if is a coop game you can get the number of rounds with this
PHP Code:
Probably is possible to get it through vscript aswell but I don't have the knowledge. This kind of question is kinda unrelated to the OP topic so maybe its better to ask in the scripting area. |
Re: [L4D2] HUD Server Logo
any example for get hostname and add to hud line?
there is Convars.GetStr("hostname") but idk |
Re: [L4D2] HUD Server Logo
Probably something like this:
local hostname = Convars.GetStr("hostname"); and use it inside the hud |
Re: [L4D2] HUD Server Logo
Quote:
Code:
local hostname = Convars.GetStr("hostname");Code:
local hostname = Convars.GetStr("hostname"); |
| All times are GMT -4. The time now is 23:41. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.