[HELP]Interior help! - 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]Interior help! (
/showthread.php?tid=578147)
[HELP]Interior help! -
JBee - 17.06.2015
When i enter in a house interior (some of my house interior have the same interiors) in another player enter his house we end up in the same house how do i fix that?
Re: [HELP]Interior help! -
bgedition - 17.06.2015
Thats because the Virtual World is the same for you and for theother player. You can use something like this:
Код:
SetPlayerVirtualWorld(playerid, playerid + 500);
This will set the player's world to its id plus 500. I mean if one player is with ID 45 the virtual world should be ID 545.
Re: [HELP]Interior help! -
Jonny5 - 17.06.2015
set a different virtual world for each player when entering an interior.
when you exit you should set it back tot he same virtual world so they can see each other on the streets
Re: [HELP]Interior help! -
SickAttack - 17.06.2015
Quote:
Originally Posted by Jonny5
set a different virtual world for each player
|
I assume you meant, set a different virtual world for each
house.
Re: [HELP]Interior help! -
Jonny5 - 17.06.2015
not really but that is another approach provided you allow other players into your house.
Re: [HELP]Interior help! -
bgedition - 17.06.2015
@SickAttack When the player is using the command /enter for houses or sth like this you can do what I made in my previous post.
Re: [HELP]Interior help! -
JBee - 17.06.2015
Quote:
Originally Posted by JBee
When i enter in a house interior (some of my house interior have the same interiors) in another player enter his house we end up in the same house how do i fix that?
|
Quote:
Originally Posted by bgedition
Thats because the Virtual World is the same for you and for theother player. You can use something like this:
Код:
SetPlayerVirtualWorld(playerid, playerid + 500);
This will set the player's world to its id plus 500. I mean if one player is with ID 45 the virtual world should be ID 545.
|
Quote:
Originally Posted by Jonny5
set a different virtual world for each player when entering an interior.
when you exit you should set it back tot he same virtual world so they can see each other on the streets
|
Quote:
Originally Posted by SickAttack
I assume you meant, set a different virtual world for each house.
|
Thank you all!
Re: [HELP]Interior help! -
SickAttack - 17.06.2015
Quote:
Originally Posted by bgedition
@SickAttack When the player is using the command /enter for houses or sth like this you can do what I made in my previous post.
|
No, no, no, no. You want other players that are in the same house to be able to see other players in that house too, right? So, basically what you do is assign a unique (concequetive) virtual world to a house and when a player enters a house, set their virtual world to it, making players visible to other players in the same house.