y-ini help
#6

you have to define new variables and load ini data into it.
for example i have a player ini file and i want to load player money to "PlayerMoney[playerid]" Variable.
"INI_ParseFile" need call a function. so we will make it

my.ini file content:
[data]
Money = 2000

pawn Код:
new PlayerMoney[MAX_PLAYERS]; //>defining the variable

//>creating function
forward MyFunction_data(playerid,name[],value[]);
public MyFunction_data(playerid,name[],value[])
{
 INI_Int("Money",PlayerMoney[playerid]); //> Loading an integer (player money amount) from "Money" Value to PlayerMoney[playerid] variable
 return 1;
}

INI_ParseFile("my.ini", "MyFunction_%s", .bExtra = true, .extra = playerid);
Reply


Messages In This Thread
y-ini help - by Stoyanov - 08.11.2014, 19:33
Re: y-ini help - by M4D - 08.11.2014, 19:36
Re: y-ini help - by Stoyanov - 08.11.2014, 19:38
Re: y-ini help - by M4D - 08.11.2014, 19:52
Re: y-ini help - by Stoyanov - 08.11.2014, 19:53
Re: y-ini help - by M4D - 08.11.2014, 20:16
Re: y-ini help - by Stoyanov - 08.11.2014, 20:24

Forum Jump:


Users browsing this thread: 1 Guest(s)