save and loadpos
#1

Hey guys. I have a save and loadpos system. Savepos works perfectly but loadpos doesnt. It teleports player where it is, but if player is in vehicle the vehicle doesnt teleport with player. How do you fix it? This is my code:

Код:
	if(strcmp(cmdtext, "/s", true) == 0)
   {
	GetPlayerFacingAngle(playerid, Float:storea[playerid]);
    stored[playerid] = 0;
    storeint[playerid] = GetPlayerInterior(playerid);
    GetPlayerPos(playerid, Float:storex[playerid], Float:storey[playerid], Float:storez[playerid]);
    SendClientMessage(playerid, COLOR_LIGHTBLUE, "Twoja pozycja została zapisana. Aby ją wczytaćwpisz /l.");
    stored[playerid] = 1;
    return 1;
  }
  
  if(strcmp(cmdtext, "/l", true) == 0)
  {
    if(stored[playerid] == 1)
	{
      SetPlayerInterior(playerid, storeint[playerid]);
      SetPlayerPos(playerid, storex[playerid],storey[playerid],storez[playerid]);
      SetPlayerFacingAngle(playerid, storea[playerid]);
      SetCameraBehindPlayer(playerid);
      SendClientMessage(playerid, COLOR_LIGHTBLUE, "Wczytałeś swoją pozycję.");
    }
    else return SendClientMessage(playerid, COLOR_LIGHTBLUE, "Pierw musisz zapisać pozycje przez wpisywanie /s.");
    return 1;
  }
Reply


Messages In This Thread
save and loadpos - by XxerykxX - 06.11.2010, 17:46
Re: save and loadpos - by Mike_Peterson - 06.11.2010, 17:57
Re: save and loadpos - by XxerykxX - 06.11.2010, 18:04
Re: save and loadpos - by Mike_Peterson - 06.11.2010, 18:06
Re: save and loadpos - by XxerykxX - 06.11.2010, 18:19
Re: save and loadpos - by Mike_Peterson - 06.11.2010, 18:21
Re: save and loadpos - by XxerykxX - 06.11.2010, 18:33

Forum Jump:


Users browsing this thread: 1 Guest(s)