[Help] Spawn Problem
#1

Код:
public OnPlayerSpawn(playerid)
{
	new house = PlayerInfo[playerid][pPhousekey];
	if(house !=-1)
	{
 	if(SpawnChange[playerid]) //If 1, then you get to your house, else spawn somewhere else
 	{
 	SetPlayerInterior(playerid,HouseInfo[playerid][hHInteriorWorld]);
  	PlayerInfo[playerid][pInt] = HouseInfo[playerid][hHInteriorWorld];
 	PlayerInfo[playerid][pLocal] = playerid+1000;
 	PlayerInfo[playerid][pVW] = playerid+1000;
	SetPlayerVirtualWorld(playerid, playerid+1000);
 	SetPlayerPos(playerid,HouseInfo[playerid][hInteriorX],HouseInfo[playerid][hInteriorY],HouseInfo[playerid][hInteriorZ]);
 	SetPlayerFacingAngle(playerid,HouseInfo[playerid][hInteriorA]);
 	SetCameraBehindPlayer(playerid);
 	GameTextForPlayer(playerid, "~w~Welcome Home", 5000, 1);
	return 1;
	}
	}
    else if(InParty { playerid } == true)
  	{
  	SetTimerEx("OnPlayerPartySpawn", 30, false, "i", playerid);
  	}
  	return 1;
	}
That's my code. The problem is If a player owns a house and is @ the party and dies at the party he spawns at his house but it should spawn him at the party. If he is not at the party he dies he spawns at his house (it works)

Problem: Player shouldn't spawn at his house if he dies at the party ( if(InParty) )
Reply
#2

else if(InParty(playerid) == true)

Change the line and try this.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)