Load Saved position
#8

I don't know why you are using PVars and variables to get and set the data, the only code that is actually needed would be:
pawn Код:
// Reading and applying the information from the file
SetPlayerPos( playerid, dini_Float( file, "LocX" ), dini_Float( file, "LocY" ), dini_Float( file, "LocZ" ) );
SetPlayerFacingAngle( playerid, dini_Float( file, "LocA" ) );
SetPlayerInterior( playerid, dini_Int( file, "LocI" ) );
// Saving the information to the file
new Float:X, Float:Y, Float:Z, Float: A;
GetPlayerPos( playerid, X, Y, Z );
GetPlayerFacingAngle( playerid, A );
dini_FloatSet( file, "LocX", X );
dini_FloatSet( file, "LocY", Y );
dini_FloatSet( file, "LocZ", Z );
dini_FloatSet( file, "LocA", A );
dini_IntSet( file, "LocI", GetPlayerInterior( playerid ) );
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: 2 Guest(s)