Load Saved position
#6

You're going at this the wrong way, you need to set the players position according to the retrieved data - You are setting the player at default float values (0.00), so they will spawn at the farm and fall through the ground. Use of the following code should fix your problems:
pawn Код:
SetPlayerPos( playerid, dini_Float( file, "LocX" ), dini_Float( file, "LocY" ), dini_Float( file, "LocZ" ) );
SetPlayerFacingAngle( playerid, dini_Float( file, "LocA" ) );
I'm a bit confused with your code, because you are setting the players coordinates, and setting the values to the file. The code I just wrote will set the players position by the values read from the file. Is that what you were trying to achieve?

I would also suggest you look into another file system like y-ini, SII or djSon. They are much more up-to-date and are far more efficient.
Reply


Messages In This Thread
Load Saved position - by Buzzbomb - 17.11.2010, 22:28
Re: Load Saved position - by codemastermike - 17.11.2010, 23:06
Re: Load Saved position - by Buzzbomb - 17.11.2010, 23:13
Re: Load Saved position - by codemastermike - 17.11.2010, 23:36
Re: Load Saved position - by [L3th4l] - 18.11.2010, 00:18
Re: Load Saved position - by Grim_ - 18.11.2010, 00:44
Re: Load Saved position - by Buzzbomb - 18.11.2010, 00:49
Re: Load Saved position - by Grim_ - 18.11.2010, 00:56
Re: Load Saved position - by Buzzbomb - 18.11.2010, 00:56
Re: Load Saved position - by Buzzbomb - 18.11.2010, 02:09

Forum Jump:


Users browsing this thread: 1 Guest(s)