SA-MP Forums Archive
PPC_House NOT SPAWN AT HOUSE - 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)
+--- Thread: PPC_House NOT SPAWN AT HOUSE (/showthread.php?tid=556586)



Please Help me PPC_House NOT SPAWN AT HOUSE - Jihanz - 11.01.2015

HELP ME PLEASE

I've put up a PPC House to gamemode MY
why I can not spawn at home when I've bought a house in place and also I've used /createhouse to make home
please help me ......

ScreenShot







Код:
public OnPlayerSpawn(playerid)
{
    	// Setup local variables
	new HouseID;

	// Reset the HouseID where the player is located
	APlayerData[playerid][CurrentHouse] = 0;

	// If SpawnAtHouse is set to "true", re-position the player at the first house in his list of owned houses
	if (SpawnAtHouse == true)
	{
		// Get the first HouseID in your list of owned houses
		HouseID = APlayerData[playerid][Houses][0];
		// Check if the player has a house in this first slot
		if (HouseID != 1)
		{
			// Re-position the player at the house's coordinates
			SetPlayerPos(playerid, AHouseData[HouseID][HouseX], AHouseData[HouseID][HouseY], AHouseData[HouseID][HouseZ]);
		}
	}
	new Random = random(sizeof(RandomSpawns));
    SetPlayerPos(playerid, RandomSpawns[Random][0], RandomSpawns[Random][1], RandomSpawns[Random][2]);
	SetPlayerInterior(playerid, 0);
	return 1;
}



Re: PPC_House NOT SPAWN AT HOUSE - acade - 11.01.2015

I believe you may need to add it so you spawn at the house under OnPlayerSpawn and SetPlayerSpawnInfo


Re: PPC_House NOT SPAWN AT HOUSE - Jihanz - 11.01.2015

im not have SetPlayerSpawnInfo


Re: PPC_House NOT SPAWN AT HOUSE - acade - 11.01.2015

Noticed this:
Quote:

// If SpawnAtHouse is set to "true"

Have you set it to True at the top?


Re: PPC_House NOT SPAWN AT HOUSE - Jihanz - 11.01.2015

Quote:
Originally Posted by acade
Посмотреть сообщение
Noticed this:

Have you set it to True at the top?
yess....