Save, edit and load data from .ini files
#1

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
Reply


Messages In This Thread
Save, edit and load data from .ini files - by Noris - 30.05.2016, 15:18
Re: Save, edit and load data from .ini files - by IceBilizard - 30.05.2016, 16:50
Re: Save, edit and load data from .ini files - by Noris - 30.05.2016, 17:12
Re: Save, edit and load data from .ini files - by BornHuman - 30.05.2016, 17:18
Re: Save, edit and load data from .ini files - by Noris - 30.05.2016, 17:23
Re: Save, edit and load data from .ini files - by BornHuman - 30.05.2016, 17:25
BornHuman - by Noris - 31.05.2016, 12:57
Re: Save, edit and load data from .ini files - by Stinged - 31.05.2016, 13:13
Re: Save, edit and load data from .ini files - by Noris - 31.05.2016, 13:41
Re: Save, edit and load data from .ini files - by Noris - 31.05.2016, 18:47

Forum Jump:


Users browsing this thread: 1 Guest(s)