First GetPlayerInterior and then SetPlayerInterior
#1

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
Reply
#2

What are you trying to do?
Reply
#3

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
Reply
#4

Why do you have a loop, then?
Reply
#5

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)