Any way to make player invisible to other players -
jamjamnewbie - 17.10.2014
Is it possible to "freely move" while invisible to other players?
WHILE YOU CAN SEE THEM
kinda like "/vanish" in minecraft(it is a plugin command)(if you know what i mean)
Re: Any way to make player invisible to other players -
Rudy_ - 17.10.2014
Quote:
Originally Posted by ******
Change their virtual world (VW).
|
In that way, Others are also invisible for that 'player'.
I'd suggest to return 0; on OnPlayerUpdate
Re: Any way to make player invisible to other players -
Rudy_ - 17.10.2014
Quote:
Originally Posted by ******
That will just show the player frozen to others, not hide them. And jamjamnewbie said nothing about the ability of them to see others.
|
Right.
But you can do something like, first Save player and camera pos, Set player pos to any far place, Return 0 on onplayerupdate, SetPlayer and Camera pos again to the saved one. This way no frozen player.
Re: Any way to make player invisible to other players -
Lordzy - 17.10.2014
Quote:
Originally Posted by Rudy_
Right.
But you can do something like, first Save player and camera pos, Set player pos to any far place, Return 0 on onplayerupdate, SetPlayer and Camera pos again to the saved one. This way no frozen player.
|
Instead of that, why not save the virtual world and then set it to an unused one? Then, return 0 under update callback. Whenever the player becomes visible, return 1 under update call and set back the world.
EDIT : I wonder why saving stuffs really is required. Just return 0 under OnPlayerUpdate whenever player wants to be invisible. However, player won't be able to send any player synced data to the server. The client will only receive other data.
Re: Any way to make player invisible to other players -
Rudy_ - 17.10.2014
Quote:
Originally Posted by Lordzy
Instead of that, why not save the virtual world and then set it to an unused one? Then, return 0 under update callback.
|
That's mostly the same thing, So any of these could work, Though i'm not 100% sure about the virtual world one.
Re: Any way to make player invisible to other players -
jamjamnewbie - 17.10.2014
sorry forgot something, edited to what I actually meant
Re: Any way to make player invisible to other players -
Abagail - 18.10.2014
Not that I know of. The best thing would probably to put the player in spectating mode, and set a camera. See the "flymode" filterscript in the default SA-MP package.
Re: Any way to make player invisible to other players -
Lordzy - 18.10.2014
Player will be still be able to view others when update call for the invisible player returns 0. For others, the player will be at the last returned 1 position as AFK. The best thing you can do is to set the virtual world to another one at first (save the previous one too) and set the variable for invisible. Under OnPlayerUpdate, check if player's world has been changed and if invisible variable is set, if so set back the world and return 0. From then, keep on returning 0 to be invisible. Just a little note that whenever you're returning 0, player's data will not be sent to the server but player can receive data(see others and all). For example, shots and all. I haven't tried OnPlayer
Give/TakeDamage callbacks, neither OnPlayerWeaponShot. But you should try and look if they're called when OnPlayerUpdate is returned 0. If it calls, you can do custom damage when update call returns 0.
Re: Any way to make player invisible to other players -
Rudy_ - 18.10.2014
Quote:
Originally Posted by Lordzy
Instead of that, why not save the virtual world and then set it to an unused one? Then, return 0 under update callback. Whenever the player becomes visible, return 1 under update call and set back the world.
EDIT : I wonder why saving stuffs really is required. Just return 0 under OnPlayerUpdate whenever player wants to be invisible. However, player won't be able to send any player synced data to the server. The client will only receive other data.
|
Well i won't just say something i don't know? You need to save the pos or interior, Else players will see you Afk on the place where player typed a Command(or w/e) and became invisible.
So the best solution is to save interior or position.
And Yes, OnPlayerWeapon shot works.
Re: Any way to make player invisible to other players -
Phyzic - 18.10.2014
As ****** said, Setting Player's Virtual World will work properly.