Saving help
#2

I don't see what C++ has to do with any of this.

1. As you are new to scripting with SA:MP, don't use the dini library. It is very outdated, inefficient, and no longer supported. Search for one of the newer includes such as Y_INI.

2. You may want to do some checks to make sure the files are actually there before reading/writing values to them. I'm not sure if dini does this internally.

3. To make them spawn at the specified position on first log-in (assuming the only code for that is above) check if the file exists under OnPlayerSpawn. If it doesn't, then that is their first spawn, and set the position. If it does exist, read the value from the file and set it. This requires saving the values under OnPlayerDisconnect, which I believe you already do.
Reply


Messages In This Thread
Saving help - by xXRealLegitXx - 01.03.2013, 01:37
Re: Saving help - by Bakr - 01.03.2013, 01:48
Re: Saving help - by Denying - 01.03.2013, 13:56

Forum Jump:


Users browsing this thread: 1 Guest(s)