Client instance

Hi guys,

I don’t know if “instance” is the right word to do what I want to do. Let me explain:

I’d like to create a “character builder” mod. When the player goes to that “state” I would like to “move” the player at a certain position in the map but other players would not be able to see him. The kind of behaviour you have in the actual game when a player goes in the garage, in fact it’s the same garage for every players in the map but two players can visit their own garage at the same time.

I hope I’m clear enough. If not, let me know, I’ll try to clarify my mind.

Thank you!

P

2 Likes

What do you search ? How to make a script like that ?
Because if is it, I think you got a Native function that put a player invisible, then you can move this player in another zone of your choice :slight_smile:

I think it’s more like put a player in another “world”, so the other players can’t interract with him.
And if two players are building characters at the same time, we are forced to find another location for the second, and so on…

This kind of function existed on SAMP (for those who scripted San Andreas servers), and it was very simple to use. The name was : SetPlayerVirtualWorld
As you said, when players go in their garage, or Los Santos Custom etc… We can’t see the other players inside at the same time, so there must be a way to do it :slight_smile:

I must admit, I’m very interested in this, that’s the next step for my own script :wink:

Oh! Cool, that’s sounds to be exactly what I’m looking for! I will keep you inform of my progress!

Best regards!

P

Yeah, but we must find the equivalent function first for GTA V ^^
I tried with some keywords I had in mind, but I didn’t find anything yet :confused:

Yeah! That’s what I see!!! :frowning:

Maybe it’s PlayerAttachVirtualBound or some Interiors functions… There’s not a lot of documentation out there! :wink:

Let’s keep both inform!

P

I never tried PlayerAttachVirtualBound, so I can’t say… Tried to take a look at interiors functions, but didn’t find something very promising :confused:

But I maybe found a way to do a simple “invisibility” thing (at least for player peds) :
I used SetEntityVisible with false value to the player ped, and then, in a loop : SetLocalPlayerVisibleLocally set to true.
That way, the player is invisible for other players, but he can see himself.

Proof :

I tried with two computers, and made both players invisible for each other. The green arrow is over the head of the other player (he’s still collidable, but at least invisible)

I tried this fast, and I didn’t tested to restore visibility yet, but I think that these functions can work :slight_smile:

Any way to restrict player interactions? Even if they are invisible to each other and can’t collide (with SetEntityNoCollisionEntity(playerPed1, PlayerPed2, true), they still can hear each other and see interactions (like opened/closed doors).

3 Likes