[REQUEST] Position save
#2

use dini include
pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
  new str[256], plname[MAX_PLAYER_NAME];
  GetPlayerName(playerid, plname, sizeof(plname));
  format(str, sizeof(str), "%s.ini", plname);  
  new Float:X, Y, Z;
  GetPlayerPos(playerid, X, Y, Z);
  dini_FloatSet(str, "X", X);
  dini_FloatSet(str, "Y", Y);
  dini_FloatSet(str, "Z", Z);
  return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
  new str[256], plname[MAX_PLAYER_NAME];
  GetPlayerName(playerid, plname, sizeof(plname));
  format(str, sizeof(str), "%s.ini", plname);    
  GetPlayerPos(playerid, dini_Float(str, "X"), dini_Float(str, "Y"), dini_Float(str, "Z"));
  return 1;
}
Reply


Messages In This Thread
[REQUEST] Position save - by Ray.Delahunt - 21.07.2009, 19:49
Re: [REQUEST] Position save - by James_Alex - 21.07.2009, 20:00
Re: [REQUEST] Position save - by Ray.Delahunt - 21.07.2009, 21:15
Re: [REQUEST] Position save - by James_Alex - 21.07.2009, 21:16
Re: [REQUEST] Position save - by Jamould - 21.07.2009, 21:26
Re: [REQUEST] Position save - by Ray.Delahunt - 21.07.2009, 21:34
Re: [REQUEST] Position save - by Jamould - 21.07.2009, 22:12
Re: [REQUEST] Position save - by Ray.Delahunt - 22.07.2009, 09:53
Re: [REQUEST] Position save - by Mauka4 - 23.07.2009, 12:43

Forum Jump:


Users browsing this thread: 1 Guest(s)