Raised This Month: $ Target: $400
 0% 

Help with HudMessage


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
lexzor
Veteran Member
Join Date: Nov 2020
Old 05-05-2022 , 18:41   Re: Help with HudMessage
Reply With Quote #10

"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:
new iFile fopeng_szFile"rt" ); 
here, native fopen return file pointer (it s like a identifier for the specified file, if you want to see what fopen parameters do, you can read here: https://www.amxmodx.org/api/file/fopen)

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

Last edited by lexzor; 05-05-2022 at 18:43.
lexzor is offline
 



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