SA-MP Forums Archive
Help me! (script an house with a interior inside) (+rep) - 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: Help me! (script an house with a interior inside) (+rep) (/showthread.php?tid=307428)



Help me! (script an house with a interior inside) (+rep) - Dubbystep - 30.12.2011

Hello, i need some example, codes or what, any links to make a enterable house.


Alright, i will give you one saved position outside my door, and the interor.
Would anyone make a script code to enter my house, and teleport to that interior?
It would be like i click "F" button, or write /enter.
+1 reputation for all who answeres, serious answeres, thank you all!


I got one position, outside my house door.

29,190.5846,-1308.2745,70.2694,265.2842,0,0,0,0,0,0

This is the interior.

Unused safe house 12 2324.419921,-1145.568359,1050.710083

Happy new year!
Wishes, Dubbystep.





Re: Help me! (script an house with a interior inside) (+rep) - Dubbystep - 30.12.2011

Please, anyone?


Re: Help me! (script an house with a interior inside) (+rep) - diego_p11 - 30.12.2011

I will try to help you but atm i am using a cell phone, i will turn on the computer to help you


Re: Help me! (script an house with a interior inside) (+rep) - Dubbystep - 01.01.2012

oh thank you, pm me! +1 rep!


Re: Help me! (script an house with a interior inside) (+rep) - Basssiiie - 01.01.2012

Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
	if (IsPlayerNPC(playerid)) return 1;
	if ((newkeys & KEY_SECONDARY_ATTACK) && !(oldkeys & KEY_SECONDARY_ATTACK))
	{
		if (IsPlayerInRangeOfPoint(playerid, 2.0, 190.5846, -1308.2745, 70.2694)) // Enter house
		{
			SetPlayerPos(playerid, 2324.419921, -1145.568359, 1050.710083);
			SetPlayerInterior(playerid, 12);
			return 1;
		}
		if (IsPlayerInRangeOfPoint(playerid, 2.0, 2324.419921, -1145.568359, 1050.710083)) // Leave house
		{
			SetPlayerPos(playerid, 190.5846, -1308.2745, 70.2694);
			SetPlayerInterior(playerid, 0);
			return 1;
		}
	}
	return 1;
}
Piece of cake.