Quote:
Originally Posted by Grim_
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.
|
I just noticed your message grim thanks .. ill try that and yeah i was looking into djson I was thinking about it I still might i converted to sscanf the other night i might change file systems probably soon