Weather affects interior
#1

Hi guys. I have created a house with some of the new SA-MP objects. It is a walk-in interior, where you don't get teleported when you enter the house.
It is pretty cool, but I have a problem with the weather. When it rains/sandstorm, it is also inside the house. (Look at attached screenshots).
Is there any way to fix this?

Hope you can help. Thank you.
Reply
#2

you can check if the player is inside the house and use SetPlayerWeather
Reply
#3

Quote:
Originally Posted by HuSs3n
Посмотреть сообщение
you can check if the player is inside the house and use SetPlayerWeather
Yea, I also thought of that, but how can I detect exactely if he is inside or outside?
When someone enters that house, they dont get teleported, it is just walk straight in.
Reply
#4

you can't since its an object
Reply
#5

It's possible, give a try to Incognito's streamer plugin. It has nice features about areas, even in 3D. I could do that with it.
Reply
#6

Quote:
Originally Posted by irinel1996
Посмотреть сообщение
It's possible, give a try to Incognito's streamer plugin. It has nice features about areas, even in 3D. I could do that with it.
How exactely?
Reply
#7

housearea = CreateDynamicRectangle (Around the house)
Then, OnPlayerEnterDynamicArea...
If areaid == housearea...
SetPlayerWeather(playerid, 0)
Reply
#8

Quote:
Originally Posted by Siralos
Посмотреть сообщение
housearea = CreateDynamicRectangle (Around the house)
Then, OnPlayerEnterDynamicArea...
If areaid == housearea...
SetPlayerWeather(playerid, 0)
Yes, but how do I make it to be exactely around the house?
Reply
#9

Well, just take x,y coordinates with /save and create the dynamic rectangle accordingly...
Reply
#10

There is a function to check if a player is in interior IsPlayerInAnyInterior
https://sampwiki.blast.hk/wiki/Useful_Fu...rInAnyInterior
ex.
pawn Код:
if(IsPlayerInAnyInterior(playerid))
{
SetPlayerWeather(playerid, 1);
}
EDIT:
ups . didn't see that its a custom made map.
just use https://sampwiki.blast.hk/wiki/IsPlayerInRangeOfPoint and change the weather
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)