Return after crash script
#1

Can somebody help me to make a script to return the same place before crash
Thanks
Reply
#2

look to the Los Angeles script
if youcan't find what you like !
answer this and i'll give you the code !
Reply
#3

I cannot find it ://////
Reply
#4

Client crash or server crash?
Reply
#5

client crash.
Reply
#6

Quote:
Originally Posted by Ben147
I cannot find it ://////
Try again.
Reply
#7

i already tryed but i cannot find it
Reply
#8

*bump*
Reply
#9

bump ://////////
Reply
#10

do not drible post plz
try this
pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
  if(reason == 3)
  {
    new str[256], plname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, plname, sizeof(plname));
    format(str, sizeof(str), "%s.ini", plname);  
    new Float:X, Float:Y, Float:Z;
    GetPlayerPos(playerid, X, Y, Z);
    dini_IntSet(str, "crashed", 1);    
    dini_FloatSet(str, "X", X);
    dini_FloatSet(str, "Y", Y);
    dini_FloatSet(str, "Z", Z);
    return 1;
  }
  return 0;
}

public OnPlayerRequestSpawn(playerid)
{
  new str[256], plname[MAX_PLAYER_NAME];
  GetPlayerName(playerid, plname, sizeof(plname));
  format(str, sizeof(str), "%s.ini", plname);  
  if(dini_Int(str, "crashed") == 1)  
  {
    SetPlayerPos(playerid, dini_Float(str, "X"), dini_Float(str, "Y"), dini_Float(str, "Z"));
    GameTextForPlayer(playerid, "~r~crahsed. ~w~returning to your last position", 10000, 1);
    dini_IntSet(str, "crashed", 0);    
    return 1;
  }
  return 0;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)