[HELP] Dini Exists
#2

I don't understand why you use "else if" ? Why not just a simple "else" ?

Anyway try this:

pawn Код:
new
        PlayerName[MAX_PLAYER_NAME],
        File[256]
;
GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
format(File, sizeof(File), "CarSys/Users/%s.ini", PlayerName);
if(dini_Exists(File))
{
    PlayerInfo[playerid][CarID] = dini_Int(File,"CarID");
    PlayerInfo[playerid][OwnCar] = dini_Int(File,"OwnCar");
}
else
{
    dini_Create(File);
    dini_IntSet(File,"CarID",0);
    dini_IntSet(File,"OwnCar",0);
}
Reply


Messages In This Thread
[HELP] Dini Exists - by sTreTcheD - 08.07.2010, 13:05
Re: [HELP] Dini Exists - by Miikkel - 08.07.2010, 13:12
Re: [HELP] Dini Exists - by sTreTcheD - 08.07.2010, 13:55

Forum Jump:


Users browsing this thread: 2 Guest(s)