Raised This Month: $32 Target: $400
 8% 

Help for reading message from .ini


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Elusive13
Member
Join Date: Sep 2011
Old 12-25-2017 , 07:26   Help for reading message from .ini
Reply With Quote #1

Hello Guys.
I make a HudMessage plugin with effects that i want to make to read message and set effect and time to show from .ini file to can be easy for editing.
How can i do this ?
Thats my plugin
PHP Code:
#include <amxmodx>
#include <amxmisc>

public plugin_init() {
    
    
register_plugin("WHM""1.1b""Nobi13")
    return 
PLUGIN_CONTINUE 
}

public 
WelcomeHudMessage(id) {
    
   new 
Player[32]
   new 
Hostname[64]
 
   
get_user_name(id,Player,31)
   
get_cvar_string("hostname",Hostname,63)
   
   
set_hudmessage(/* RGB Color set*/060255/*Float:x =*/ -1.0/*Float:y = */0.18/* effects =*/ 1/* Float:fxtime = */ 6.0/*Float:holdtime = */15.0/*Float:fadeintime = */0.1/*Float:fadeouttime = */ 1.5/*bool:reliable =*/ false )
   
show_hudmessage(id"Welcome to %s^nEnjoy playing here %s"HostnamePlayer)
   return 
PLUGIN_CONTINUE 
}

public 
client_connect(id) {
   
set_task(10.0"WelcomeHudMessage",id//After how many seconds to be showed


Last edited by Elusive13; 12-25-2017 at 07:27.
Elusive13 is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 12-25-2017 , 07:38   Re: Help for reading message from .ini
Reply With Quote #2

fopen + fgets + fclose.
__________________
HamletEagle is offline
DarthMan
Veteran Member
Join Date: Aug 2011
Old 12-25-2017 , 07:49   Re: Help for reading message from .ini
Reply With Quote #3

Quote:
Originally Posted by Elusive13 View Post
Hello Guys.
I make a HudMessage plugin with effects that i want to make to read message and set effect and time to show from .ini file to can be easy for editing.
How can i do this ?
Thats my plugin
PHP Code:
#include <amxmodx>
#include <amxmisc>

public plugin_init() {
    
    
register_plugin("WHM""1.1b""Nobi13")
    return 
PLUGIN_CONTINUE 
}

public 
WelcomeHudMessage(id) {
    
   new 
Player[32]
   new 
Hostname[64]
 
   
get_user_name(id,Player,31)
   
get_cvar_string("hostname",Hostname,63)
   
   
set_hudmessage(/* RGB Color set*/060255/*Float:x =*/ -1.0/*Float:y = */0.18/* effects =*/ 1/* Float:fxtime = */ 6.0/*Float:holdtime = */15.0/*Float:fadeintime = */0.1/*Float:fadeouttime = */ 1.5/*bool:reliable =*/ false )
   
show_hudmessage(id"Welcome to %s^nEnjoy playing here %s"HostnamePlayer)
   return 
PLUGIN_CONTINUE 
}

public 
client_connect(id) {
   
set_task(10.0"WelcomeHudMessage",id//After how many seconds to be showed

DarthMan is offline
Reply


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 22:15.


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