[HELP] question about coords.
#4

Make so that every player has It's own file

pawn Код:
OnPlayerSpawn(playerid)
{
  new name[MAX_PLAYER_NAME], string[128];
  GetPlayerName(playerid, name, sizeof(name));
  format(string, sizeof(string), "/folder/%s.ini", name);

  if(dini_Exists(string))
  {
    new Float:X, Float:Y, FloatZ;
    X = dini_Float("/folder/file.ini", "F_X");
    Y = dini_Float("/folder/file.ini", "F_Y");
    Z = dini_Float("/folder/file.ini", "F_Z");
    SetPlayerPos(playerid, X, Y, Z);
  }
  else dini_Create(string);
}

OnPlayerDisconnect(playerid, reason)
{
  new Float:X, Float:Y, Float:Z;
  GetPlayerPos(playerid, X, Y, Z);
  dini_FloatSet(string, "F_X", X);
  dini_FloatSet(string, "F_Y", Y);
  dini_FloatSet(string, "F_Z", Z);
}
Reply


Messages In This Thread
[HELP] question about coords. - by arnutisz - 18.08.2009, 18:18
Re: [HELP] question about coords. - by dice7 - 18.08.2009, 18:22
Re: [HELP] question about coords. - by arnutisz - 18.08.2009, 19:28
Re: [HELP] question about coords. - by dice7 - 18.08.2009, 19:40
Re: [HELP] question about coords. - by arnutisz - 18.08.2009, 20:25
Re: [HELP] question about coords. - by CAR - 18.08.2009, 20:32
Re: [HELP] question about coords. - by dice7 - 18.08.2009, 20:57
Re: [HELP] question about coords. - by CAR - 19.08.2009, 07:03
Re: [HELP] question about coords. - by dice7 - 19.08.2009, 07:19
Re: [HELP] question about coords. - by bogeymanEST - 19.08.2009, 09:20

Forum Jump:


Users browsing this thread: 1 Guest(s)