Help with HudMessage
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> |
Re: Help with HudMessage
You must use ^n in text to divide the text into separates link.
Example: Code:
Welcome to our server!^nType 'm' to choose a teamCode:
Welcome to our server! |
Re: Help with HudMessage
Quote:
|
Re: Help with HudMessage
And what will you do with those lines later?
Quote:
Quote:
Quote:
you can read line by line
Spoiler
|
Re: Help with HudMessage
Quote:
There is my code
Spoiler
|
Re: Help with HudMessage
Spoiler
|
Re: Help with HudMessage
Quote:
What is this "i"before "File" var,what mean that g_szMessage or szFile |
Re: Help with HudMessage
"i" before "File" represent a prefix before the name of the variable. you can declare variable names how you want, but using that prefixes would help you to code faster
integer -> new iFile string -> new szFile[64] float -> new Float:fFile boolean -> new bool:bFile global integer variable -> g_iFile and so on probably supremache didn t paid enough attention or he just copied the code from another plugin, but the g_szFile[128] should be szFile[128] because it s not a global variable and it is a string where the file path is stored. PHP Code:
the g_szMessage is a global variable where the message is stored after the plugin read it from the file. as you can see, he declared the variable above the plugin_init and because is not declared in a function the variable is global |
Re: Help with HudMessage
Quote:
PHP Code:
|
Re: Help with HudMessage
Quote:
And one question about the plugin, specifically about the code. Do I have to declare so many functions and variables to be able to use the functions of the .sma file in the config file, as in this case I replace the newline function (^n) with (!n) or whatever I decide except the characters that are forbidden? Can i just do this PHP Code:
|
| All times are GMT -4. The time now is 21:23. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.