Help about houses
#1

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

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

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

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

I must use "Universe id" as TheHouseInteriorVarHere ?

cf https://sampwiki.blast.hk/wiki/InteriorIDs
Reply
#6

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

Thanks, waiting for ur PM
Reply
#8

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)