yini loading / reading string
#10

Well, make 3 or more fields, depending on how many recent crimes you want to save. It's how you would do it in a database, and files are no different. Why save everything into a "big ass" string?
Simply add like pCrime# to your enumerator and the enumerator and file structure should look like:
Код:
enum pInfo
{
    pPass,
    pCash,
    pAdmin,
    pKills,
    pDeaths,
    pCrime1[24],
    pCrime2[24],
    pCrime3[24]
    // more if you want
}
new PlayerInfo[MAX_PLAYERS][pInfo];


[data]
Password = 208667266
Cash = 0
Admin = 0
Kills = 0
Deaths = 0
Crime1 = N/A
Crime2 = N/A
Crime3 = N/A
You should save and read Crime# as a string. I feel you're competent enough to script that on your own.
Reply


Messages In This Thread
yini loading / reading string - by Lajko1 - 14.07.2015, 16:16
Re: yini loading / reading string - by kloning1 - 14.07.2015, 18:09
Re: yini loading / reading string - by Lajko1 - 14.07.2015, 18:17
Re: yini loading / reading string - by kloning1 - 14.07.2015, 18:22
Re: yini loading / reading string - by Lajko1 - 14.07.2015, 19:21
Re: yini loading / reading string - by TonyVk - 14.07.2015, 19:32
Re: yini loading / reading string - by Lajko1 - 14.07.2015, 19:40
Re: yini loading / reading string - by TonyVk - 14.07.2015, 20:02
Re: yini loading / reading string - by Lajko1 - 14.07.2015, 22:10
Re: yini loading / reading string - by Virtual1ty - 14.07.2015, 22:36

Forum Jump:


Users browsing this thread: 1 Guest(s)