Hello. I started making a message that reads the text from a separate file. After doing this, I found that the message could not be divided into separate lines in the text file (messages.ini). How do I fix this?
Code:
#include <amxmodx>
public plugin_init() {
register_plugin("Welcome Hud Message", "1.3", "Nobi13")
}
public WelcomeHudMessage(id) {
new file = fopen("addons/amxmodx/configs/messages.ini", "rt");
new msg[1001]
set_hudmessage(/* RGB Color set*/0, 80, 255, /*Float:x =*/ -1.0, /*Float:y = */0.18, /* effects =*/ 2, /* Float:fxtime = */ 3.0, /*Float:holdtime = */15.0, /*Float:fadeintime = */0.1, /*Float:fadeouttime = */ 1.5, /*bool:reliable =*/ false )
fgets(file, msg, charsmax(msg))
fclose(file)
show_hudmessage(id,msg)
}
public client_putinserver(id) {
set_task(10.0, "WelcomeHudMessage",id) //After how many seconds to be showed
}