Saving spawn pos
#8

Quote:
Originally Posted by SmiT
Посмотреть сообщение
My bad, it should be "INI_WriteFloat" -

pawn Код:
INI_WriteFloat( File,"PosX", P[ 0 ] );
INI_WriteFloat( File,"PosX", P[ 1 ] );
INI_WriteFloat( File,"PosX", P[ 2 ] );
That code writes to "PosX" for all 3 co-ordinates?

You'll also need:
pawn Код:
new Float:rot;
GetPlayerFacingAngle(playerid, rot);
INI_WriteFloat(File, "PosRot", rot);
for the player's rotation/facing angle.

or, an addition to SmiT's code: (with fixed tag names)
pawn Код:
new
    Float: P[4]
;
GetPlayerPos(playerid, P[0], P[1], P[2]);
GetPlayerFacingAngle(playerid, P[3]);

INI_WriteFloat(File,"PosX", P[0]);
INI_WriteFloat(File,"PosY", P[1]);
INI_WriteFloat(File,"PosZ", P[2]);
INI_WriteFloat(FIle, "PosRot", P[3]
Reply


Messages In This Thread
Saving spawn pos - by Vic1990 - 27.11.2011, 05:39
Re: Saving spawn pos - by Joshb93 - 27.11.2011, 07:44
Re: Saving spawn pos - by Vic1990 - 27.11.2011, 07:55
Re: Saving spawn pos - by Joshb93 - 27.11.2011, 07:56
Re: Saving spawn pos - by SmiT - 27.11.2011, 07:58
Re: Saving spawn pos - by Vic1990 - 27.11.2011, 09:34
Re: Saving spawn pos - by SmiT - 27.11.2011, 09:35
Re: Saving spawn pos - by Ash. - 27.11.2011, 09:39
Re: Saving spawn pos - by Vic1990 - 27.11.2011, 09:43
Re: Saving spawn pos - by Ash. - 27.11.2011, 09:56

Forum Jump:


Users browsing this thread: 1 Guest(s)