Raised This Month: $ Target: $400
 0% 

Help with HudMessage


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Elusive13
Member
Join Date: Sep 2011
Old 05-04-2022 , 11:10   Help with HudMessage
Reply With Quote #1

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
  }
Elusive13 is offline
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 21:23.


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