Posts: 534
Threads: 265
Joined: Jul 2014
Hi,
I want to load a specific number from database:
I have a file like:
Код:
0.ini
1.ini
2.ini
3.ini
4.ini
5.ini
6.ini
And there is many, but how to load a specific file, when i want to load
format( STRING, 20,"wac/%d.ini", MYVARIABLE[ playerid ] );
INI_Load(STRING);
Код:
INI:whatineedwritehere?[](name[], value[])
{
}
Posts: 1,176
Threads: 114
Joined: May 2012
Reputation:
0
If I'm not wrong, INI loads these variables into an enum (which we use as "PlayerInfo[playerid][pEnum]"). When you want to load from someone's file, you just have to use PlayerInfo[playerid][pEnum], and it is going to use that variable.
Note, you have to replace pEnum with your own variable.
Posts: 534
Threads: 265
Joined: Jul 2014
No.. I ask how i need to know what file loading and i can get a what i need...
Posts: 534
Threads: 265
Joined: Jul 2014
10.11.2014, 14:55
(
Последний раз редактировалось Banditukas; 10.11.2014 в 15:25.
)
Because i'am what to check if file exist instantly load because i want to write everything to one string.
Код:
new BIGMIAU[ 2000 ];
new i = 0;
for( i = 0; i < MAX_PLAYERS; i ++)
{
if( IsPlayerConnected( i ) )
{
format( String[ playerid ], 30,"offers/%d.ini", MIAU[ playerid ] );
if(fexist(String[ playerid ]))
{
// HERE I NEED TO A LOAD WHAT IS IN offers/%d.ini FILE
// BECAUSE
format( BIGMIAU, 1999,"%s%d. %s %s .. other parametres", BIGMIAU, MIAU[ playerid ], ... );
}
MIAU[ playerid ] ++;
}
}
ShowPlayerDialog(playerid,,, BIGMIAU );