How to do this in y_ini?
#3

Quote:
Originally Posted by maramizo
Посмотреть сообщение
pawn Код:
INI:mine[examples](name[], value[])
{
    if (!strcmp(name, "Score"))
    {
        SetPlayerScore(playerid, value);
    }
    if (!strcmp(name, "Cash"))
    {
        SetPlayerMoney(playerid, value);
    }
    return 1;
}
So I can't do it like I just did in DINI? To simply set it under the loading?
This is how I have it now when someone logins
pawn Код:
PlayerData[playerid][pAdmin] = dini_Int(file, "Admin");
PlayerData[playerid][pPlayTime] = dini_Int(file, "PlayTime");
SetPlayerScore(playerid, dini_Int(file, "Score"));
SetPlayerMoney(playerid, dini_Int(file, "Cash"));
In Y_INI it has to be
pawn Код:
INI_Int("Admin", PlayerData[playerid][pAdmin]);
INI_Int("PlayTime", PlayerData[playerid][pPlayTime]);
INI_Int("Score", PlayerData[playerid][pScore]);
INI_Int("Cash", PlayerData[playerid][pCash]);
SetPlayerScore(playerid, PlayerData[playerid][pScore]);
SetPlayerMoney(playerid, PlayerData[playerid][pCash]);
Would this work
pawn Код:
SetPlayerScore(playerid, INI_Int("Score"));
SetPlayerMoney(playerid, INI_Int("Cash"));
Reply


Messages In This Thread
How to do this in y_ini? - by 101 - 16.12.2012, 05:43
Re: How to do this in y_ini? - by maramizo - 16.12.2012, 05:48
Re: How to do this in y_ini? - by 101 - 16.12.2012, 05:56
Re: How to do this in y_ini? - by maramizo - 16.12.2012, 06:04
Re: How to do this in y_ini? - by [HK]Ryder[AN] - 16.12.2012, 06:18

Forum Jump:


Users browsing this thread: 2 Guest(s)