SA-MP Forums Archive
Save, edit and load data from .ini files - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Save, edit and load data from .ini files (/showthread.php?tid=608314)



Save, edit and load data from .ini files - Noris - 30.05.2016

I'd like to make these type of features in my script.

A faction list functions which will show all factions or all the content in the
.ini file. The format of the contents inside the .ini should be like this.

1. FactionName | Leader: EditableIn.INIOnly | Members: %d

/factions - it will load the .ini content and sendclientmessage it to player
/accept invite - This will increase or add +1 value into Members: %d integer so it should be 1, and once repeated again will add +1 value and it's now 2
/quitfaction - This will decrease or subtract -1 value ino Members: %d integer so it should be 1 , and once repeated again will subtract or decrease -1 value and it's now 0.

Example:
I typed /factions and the contents of .ini is

LSPD | Leader: Max Moe Foe | Members : 69
FBI | Leader: Donald Trump | Members : 23
SA GOV | Leader: Brock Ubama | Members : 10

THE leader variable could be only edited inside .ini

If my faction is LSPD then I /quitfaction it will subtract or decrease -1 value to the Members integers then it should be now
LSPD | Leader: Max Moe Foe | Members: 68

If my faction is LSPD then I /accept invite it will add or increase +1 value to the Members integers then it's should be now
LSPD | Leader: Max Moe Foe | Members: 69

THANK YOU VERY VERY MUCH


Re: Save, edit and load data from .ini files - IceBilizard - 30.05.2016

Its wrong section this section is only for help at fixing bugs and errors.


Re: Save, edit and load data from .ini files - Noris - 30.05.2016

Quote:
Originally Posted by IceBilizard
Посмотреть сообщение
Its wrong section this section is only for help at fixing bugs and errors.
Scripting HELP

Go back to 4th grade and learn how to listen to your teacher bro.


Re: Save, edit and load data from .ini files - BornHuman - 30.05.2016

I did a tutorial awhile back about how to create dynamic groups using DINI.

https://sampforum.blast.hk/showthread.php?tid=543930


Re: Save, edit and load data from .ini files - Noris - 30.05.2016

Quote:
Originally Posted by BornHuman
Посмотреть сообщение
I did a tutorial awhile back about how to create dynamic groups using DINI.

https://sampforum.blast.hk/showthread.php?tid=543930
Thank you so much, will look on it


Re: Save, edit and load data from .ini files - BornHuman - 30.05.2016

Quote:
Originally Posted by Noris
Посмотреть сообщение
Thank you so much, will look on it
Please note that it was created nearly two years ago, and I know much more about scripting now than I did then. If you have any problems with the code, let me know via PM and I'll help you out.


BornHuman - Noris - 31.05.2016

Quote:
Originally Posted by BornHuman
Посмотреть сообщение
Please note that it was created nearly two years ago, and I know much more about scripting now than I did then. If you have any problems with the code, let me know via PM and I'll help you out.
I could not able to figure out myself the exact codes for what i need in this topic

Bump

Bum pity dump


Re: Save, edit and load data from .ini files - Stinged - 31.05.2016

http://forum.sa-mp.com/announcement.php?f=12


Re: Save, edit and load data from .ini files - Noris - 31.05.2016

Quote:
Originally Posted by Stinged
Посмотреть сообщение
I cant see those codes there.


Re: Save, edit and load data from .ini files - Noris - 31.05.2016

I need help bro