 |
|
Member
|

05-05-2022
, 15:34
Re: Help with HudMessage
|
#5
|
Quote:
Originally Posted by kww
And what will you do with those lines later?
you put
in your config file, then in plugin you open this file, read the line, format it and show to player via show_hudmessage(). Users will see
What's else?
you can read line by line...
|
Doesn't work. You can see https://i.imgur.com/cQ1R4DR.png
There is my code
Spoiler
PHP Code:
#include <amxmodx>
public plugin_init() {
register_plugin("Welcome Hud Message", "1.3", "Nobi13 http://www.amxx-bg.info")
}
public WelcomeHudMessage(id) {
new file = fopen("addons/amxmodx/configs/whm.ini", "rt");
if(file) {
new msg[128]
while(!feof(file)) {
fgets(file, msg, charsmax(msg))
set_hudmessage(0, 80, 255, -1.0, 0.18, 2, 3.0, 15.0, 0.1, 1.5, false)
show_hudmessage(id,msg)
}
fclose(file)
} else {
log_amx("Could not open file!")
}
}
public client_putinserver(id) {
set_task(10.0, "WelcomeHudMessage",id) //After how many seconds to be showed
}
|
|
|
|