SA-MP Forums Archive
First GetPlayerInterior and then SetPlayerInterior - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: First GetPlayerInterior and then SetPlayerInterior (/showthread.php?tid=112736)



First GetPlayerInterior and then SetPlayerInterior - Bearfist - 09.12.2009

Hi Guys,

Code:
if(strcmp("/gg",cmdtext,true) == 0)
  {
  if(IsInGunGame[playerid] == 0)
  {
  
	for(new i;i < MAX_PLAYERS;i++)
	{
	{
  Interior[i] = GetPlayerInterior(i);
  new Float:x, Float:y, Float:z;
  GetPlayerPos(i, x, y, z);
  }
  }
  }
	else
	{

	for(new i;i < MAX_PLAYERS;i++)
	{
	{
  SetPlayerInterior(i,Interior[i]);
  new Float:x, Float:y, Float:z;
  SetPlayerPos(i, x, y, z);
  }
  }
	
	}
	return 1;
  }
That isn't the complete /gg command but i only copied the lines i think
theire must be the problem ...


Set The Position from before is working,
but to Set the Interior from before that is my problem,
because it wouldn't work =(

Please Help...

LG Bearfist


Re: First GetPlayerInterior and then SetPlayerInterior - Mikep. - 09.12.2009

What are you trying to do?


Re: First GetPlayerInterior and then SetPlayerInterior - Bearfist - 10.12.2009

I want to save the position and the interior of a player when he enters the command /gg for example
..
and then when he enters the command again he should get at his old position and get his old interior
...
the position isn't a problem but the interior is the problem, because it doesn't work ... =/

LG


Re: First GetPlayerInterior and then SetPlayerInterior - Mikep. - 10.12.2009

Why do you have a loop, then?


Re: First GetPlayerInterior and then SetPlayerInterior - Bearfist - 10.12.2009

I don't know ^^...
but I must store the interior in something when the player enters the command for first
and also du load it when the player enters it second ...

because I can't type SetPlayerInterior(playerid,GetPlayerInterior(playe rid));
because then the current interior is getting loaded which isn't the interior
which from the first command entering...


PLS Help...


LG