Spawn Help
#2

Save player x,y,z positions then load when player logged in

like
pawn Код:
SStats(playerid)
{
  new Float:cx,Float:cy,Float:cz,weap,ammo;
  new Float:x,Float:y,Float:z,Float:armour;
  GetPlayerPos(playerid, x, y, z);
  dini_IntSet(Pos(playerid),"X1",floatround(x));
  dini_IntSet(Pos(playerid),"Y1",floatround(y));
  dini_IntSet(Pos(playerid),"Z1",floatround(z));
  return 1;
}
pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
  SStats(playerid);
  return 1;
}
pawn Код:
public OnPlayerSpawn(playerid)
{
  SetSpawnInfo(playerid,0,dini_Int(Pos(playerid), "X1"),dini_Int(Pos(playerid), "Y1"),    dini_Int(Pos(playerid), "Z1"),0, 0, 0, 0, 0, 0, 0 );
  SpawnPlayer(playerid);
  return 1;
}
Reply


Messages In This Thread
Spawn Help - by JamieVic - 12.06.2013, 06:17
Re: Spawn Help - by IceBilizard - 12.06.2013, 06:21
Re: Spawn Help - by JamieVic - 12.06.2013, 09:46

Forum Jump:


Users browsing this thread: 1 Guest(s)