SA-MP Forums Archive
Help about houses - 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 about houses (/showthread.php?tid=496798)



Help about houses - S4t3K - 23.02.2014

Hi.

I'm currently working on a house system, and I want to do the interiors.
Following the price of the house, the interior is more or less luxurious.
But I want to know how to create interiors (I wanna use the default interiors of SA-MP, not map new ones)

How to do to create it and to set virtual world of the house.
If possible, i'd like to put the interior in the sky, like this I can also use the virtual world 0.

Thanks in advance for the one who'll help me


Re: Help about houses - RealHobo009 - 23.02.2014

1 - You should not set Virtual World to 0, imagine that you and I had the same house interior, we would basically be together in each other's house
2- You should therefore assign the Virtual World to the playerid+1 (id 0 gets vw 1, id 1 gets vw2 and so on)
3- For the money, you should do something like a switch(yourhousepricevariable) and set cases for 10000 - 20000 - 30000 and so on.

Hope it helps


Re : Help about houses - S4t3K - 23.02.2014

Helps a lot, thanks

But not answers the question ^^ I just ask how to set interiors, means the place where the player will be teleported when he type /enter


Re: Help about houses - RealHobo009 - 23.02.2014

pawn Код:
SetPlayerInterior(playerid,TheHouseInteriorVarHere);
There you go


Re : Help about houses - S4t3K - 23.02.2014

I must use "Universe id" as TheHouseInteriorVarHere ?

cf https://sampwiki.blast.hk/wiki/InteriorIDs


Re: Help about houses - RealHobo009 - 23.02.2014

No, you didn't quite get that. I'll send you a PM shortly with detail, and then I'll upload it to the post.

I'll just make sure you get it first


Re : Help about houses - S4t3K - 23.02.2014

Thanks, waiting for ur PM


Re: Help about houses - RealHobo009 - 23.02.2014

I'll post it here for everyone to see it:

pawn Код:
//When you create the house
//You should have some way of assigning the "enums" to the actual data itself
//So right there you go:
HouseInfo[hid][VW] = playerid + 1;
HouseInfo[hid][Int] = interior; //You can use this with sscanf, if you want, I can release a tutorial or something / And yes it would be "WorldUniverse"
Tell me if you understood.

Thanks