About saving position
#6

ah you want a saving position function ?
try this
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 OnPlayerRequestSpawn(playerid)
{
  new str[256], plname[MAX_PLAYER_NAME];
  GetPlayerName(playerid, plname, sizeof(plname));
  format(str, sizeof(str), "%s.ini", plname);    
  SetPlayerPos(playerid, dini_Float(str, "X"), dini_Float(str, "Y"), dini_Float(str, "Z"));
  return 1;
}
Reply


Messages In This Thread
About saving position - by pierhs - 22.07.2009, 21:00
Re: About saving position - by James_Alex - 22.07.2009, 21:01
Re: About saving position - by pierhs - 22.07.2009, 21:05
Re: About saving position - by James_Alex - 22.07.2009, 21:20
Re: About saving position - by pierhs - 22.07.2009, 21:34
Re: About saving position - by James_Alex - 22.07.2009, 21:36
Re: About saving position - by _ASUS_ - 23.07.2009, 00:12
Re: About saving position - by Joe Staff - 23.07.2009, 00:13
Re: About saving position - by _ASUS_ - 23.07.2009, 00:17
Re: About saving position - by pierhs - 23.07.2009, 05:34

Forum Jump:


Users browsing this thread: 6 Guest(s)