Save position
#10

Quote:
Originally Posted by DSK_Vyorel
Посмотреть сообщение
Код:
enum SavePosENUM { Float:sX, Float:sY, Float:sZ, Float:sA, SavedPos };
new SavePos[MAX_PLAYERS][SavePosENUM];
Код:
if(!strcmp(cmdtext, "/spos",true) || !strcmp(cmdtext,"/sp",true))
  {
		if (IsPlayerInAnyVehicle(playerid))
		{
      GetVehiclePos(GetPlayerVehicleID(playerid), SavePos[playerid][sX], SavePos[playerid][sY], SavePos[playerid][sZ]);
      GetVehicleZAngle(GetPlayerVehicleID(playerid), SavePos[playerid][sA]);
		}
		else
		{
      GetPlayerPos(playerid, SavePos[playerid][sX], SavePos[playerid][sY], SavePos[playerid][sZ]);
      GetPlayerFacingAngle(playerid, SavePos[playerid][sA]);
		}
		SavePos[playerid][SavedPos] = 1;
    return SendClientMessage(playerid, COLOR_WHITE,"Pozitie salvata, foloseste /lp pentru a reveni inapoi.");
  }
//------------------------------------------------------------------------------
  if(!strcmp(cmdtext, "/lp",true) || !strcmp(cmdtext,"/lpos",true))
  {
    SetCameraBehindPlayer(playerid);
    if (SavePos[playerid][SavedPos] == 0) return SendClientMessage(playerid, COLOR_WHITE, "[SERVERBOT]> Foloseste /sp");
    if (IsPlayerInAnyVehicle(playerid))
		{
      SetVehiclePos(GetPlayerVehicleID(playerid), SavePos[playerid][sX], SavePos[playerid][sY], SavePos[playerid][sZ]);
      SetVehicleZAngle(GetPlayerVehicleID(playerid), SavePos[playerid][sA]);
		}
		else
		{
      SetPlayerPos(playerid, SavePos[playerid][sX], SavePos[playerid][sY], SavePos[playerid][sZ]);
      SetPlayerFacingAngle(playerid, SavePos[playerid][sA]);
		}
    return SendClientMessage(playerid, COLOR_WHITE, "Ai revenit la ultima pozitie salvata");
  }
omg ty !!!
Reply


Messages In This Thread
Save position - by Matevos - 02.10.2009, 10:13
Re: Save position - by DSK_Vyorel - 02.10.2009, 13:23
Re: Save position - by Matevos - 02.10.2009, 14:49
Re: Save position - by Correlli - 02.10.2009, 16:34
Re: Save position - by Matevos - 02.10.2009, 19:05
Re: Save position - by Correlli - 02.10.2009, 19:06
Re: Save position - by Pawno_Master - 02.10.2009, 19:15
Re: Save position - by Matevos - 02.10.2009, 19:31
Re: Save position - by Correlli - 02.10.2009, 19:32
Re: Save position - by Madsen - 12.04.2011, 17:35

Forum Jump:


Users browsing this thread: 1 Guest(s)