Raised This Month: $ Target: $400
 0% 

About Link Up the .ini Files to Plugins


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Ghosted
Veteran Member
Join Date: Apr 2015
Location: Georgia
Old 11-24-2018 , 08:43   Re: About Link Up the .ini Files to Plugins
Reply With Quote #9

Code:
ReadFile(PathToFile[])
{
new File = fopen(PathToFile, "rt");
new Buffer[128], A[128], B[128];
while (!feof(File))
{
fgets(File, Buffer, charsmax(Buffer));

if (!Buffer[0] || Buffer[0] == '#')
continue;

remove_quotes(Buffer);
strtok(Buffer, A, charsmax(A), B, charsmax(B), '=');
trim(A);
trim(B);

//A=Key
//B=Value
}

fclose(File);
}
/not tested/
/i have not implemented sections, i think that is too much for simple ini files/
__________________

[MOD] CS Weapon Mod V1.7.1
[MM] MetaMod-C V1.0
[MOD] CS NPC Mod (5%)


Probably Left AM

Last edited by Ghosted; 11-24-2018 at 08:46.
Ghosted 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 07:33.


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