Raised This Month: $ Target: $400
 0% 

.ini


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Temptation
Member
Join Date: Jan 2010
Old 06-12-2010 , 09:17   .ini
Reply With Quote #1

Guys, I was wondering how do I make something like in a .ini ?

Example: map.ini

Can someone give me some examples ?

Like I have a plugin which there doesn't have cvar, it changes it cvar from the .ini itself.
Temptation is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 06-12-2010 , 09:26   Re: .ini
Reply With Quote #2

Do you need to edit this ini manually (notepad or w\e) or are you just looking for an external storage method. Easiest would be to use nvault but with that you cannot modify (without an nvault app) I can also show you have to store info in an ini file.
__________________
Bugsy is offline
Temptation
Member
Join Date: Jan 2010
Old 06-12-2010 , 10:56   Re: .ini
Reply With Quote #3

Quote:
Originally Posted by Bugsy View Post
Do you need to edit this ini manually (notepad or w\e) or are you just looking for an external storage method. Easiest would be to use nvault but with that you cannot modify (without an nvault app) I can also show you have to store info in an ini file.
I want you to show me how to store info in an ini file. just like in zombieplague the weapon menu.
Temptation is offline
Alucard^
AMXX Moderator: Others
Join Date: Sep 2007
Location: Street
Old 06-12-2010 , 09:59   Re: .ini
Reply With Quote #4

http://forums.alliedmods.net/showpos...2&postcount=59

That request is fasted coded so maybe don't work, but compile fine... and also is just an example about getting .ini info or creating the file... you have to know also that .ini, .txt, .log or whatever text format is the same thing, the same method.

Also this is only one method, you have another like using fopen, fclose, fgets, fputs.

Just see file.inc
__________________
Approved Plugins - Steam Profile

Public non-terminated projects:
All Admins Menu, HLTV parameters, Subnick,
Second Password (cool style), InfoZone,
Binary C4 plant/defuse, and more...

Private projects:
NoSpec (+menu), NV Surf Management,
PM Adanved System, KZ longjump2, and more...
Alucard^ is offline
Send a message via Skype™ to Alucard^
Alucard^
AMXX Moderator: Others
Join Date: Sep 2007
Location: Street
Old 06-12-2010 , 22:31   Re: .ini
Reply With Quote #5

I said you...

Code:
write_file(file[], "something");

for example
__________________
Approved Plugins - Steam Profile

Public non-terminated projects:
All Admins Menu, HLTV parameters, Subnick,
Second Password (cool style), InfoZone,
Binary C4 plant/defuse, and more...

Private projects:
NoSpec (+menu), NV Surf Management,
PM Adanved System, KZ longjump2, and more...
Alucard^ is offline
Send a message via Skype™ to Alucard^
Temptation
Member
Join Date: Jan 2010
Old 06-13-2010 , 03:34   Re: .ini
Reply With Quote #6

Quote:
Originally Posted by Alucard^ View Post
I said you...


Code:
write_file(file[], "something");



for example
No, I doesn meant like that.

I don't understand the part which how the zombieplague weapon menu.

is like I don't know how the put the WEAPON_MENU = weapon_m4a1 in the .ini file.
Temptation is offline
Alucard^
AMXX Moderator: Others
Join Date: Sep 2007
Location: Street
Old 06-13-2010 , 03:40   Re: .ini
Reply With Quote #7

You need to say something more specific... i hate zombie plague so i don't know what you are talking. Show me an example.
__________________
Approved Plugins - Steam Profile

Public non-terminated projects:
All Admins Menu, HLTV parameters, Subnick,
Second Password (cool style), InfoZone,
Binary C4 plant/defuse, and more...

Private projects:
NoSpec (+menu), NV Surf Management,
PM Adanved System, KZ longjump2, and more...
Alucard^ is offline
Send a message via Skype™ to Alucard^
Temptation
Member
Join Date: Jan 2010
Old 06-13-2010 , 05:45   Re: .ini
Reply With Quote #8

Quote:
Originally Posted by Alucard^ View Post
You need to say something more specific... i hate zombie plague so i don't know what you are talking. Show me an example.
There a file called zombieplague.ini:

Code:
[Buy Menu Weapons]
PRIMARY = weapon_galil , weapon_famas , weapon_m4a1 , weapon_ak47 , weapon_sg552 , weapon_aug , weapon_scout , weapon_m3 , weapon_xm1014 , weapon_tmp , weapon_mac10 , weapon_ump45 , weapon_mp5navy , weapon_p90 , weapon_awp , weapon_m249 , weapon_sg550 , weapon_g3sg1
SECONDARY = weapon_glock18 , weapon_usp , weapon_p228 , weapon_deagle , weapon_fiveseven , weapon_elite
ADDITIONAL ITEMS = weapon_hegrenade , weapon_flashbang , weapon_smokegrenade
How do I do this ?

As in just edit in here. to make the changes. Rather than edit in the source code.
Temptation is offline
Alucard^
AMXX Moderator: Others
Join Date: Sep 2007
Location: Street
Old 06-13-2010 , 10:57   Re: .ini
Reply With Quote #9

Like i said, you can do it with natives that i mentioned (in file.inc)....

Here an example:

Code:
public Function() {     new fileName[192];     get_configsdir(fileName, 191);         add(fileName, 191, "/coolname.ini");         new szLine[192], Data1[32], Data2[32], Data3[32];     new iLine, iLen;         while(read_file(fileName, iLine++, szLine, 191, iLen) )     {         parse(szLine, Data1, 31, Data2, 31, Data3, 31);                 // menu_additem() or whatever you want to add     } }
__________________
Approved Plugins - Steam Profile

Public non-terminated projects:
All Admins Menu, HLTV parameters, Subnick,
Second Password (cool style), InfoZone,
Binary C4 plant/defuse, and more...

Private projects:
NoSpec (+menu), NV Surf Management,
PM Adanved System, KZ longjump2, and more...
Alucard^ is offline
Send a message via Skype™ to Alucard^
Reply



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 14:54.


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