Any way to make player invisible to other players
#1

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

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

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

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

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

sorry forgot something, edited to what I actually meant
Reply
#7

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

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 OnPlayerGive/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.
Reply
#9

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

As ****** said, Setting Player's Virtual World will work properly.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)