Jump to content

How to hide players ped?


vovo4ka

Recommended Posts

In my script I need to hide/destroy player ped sometimes (and respawn him later).

Im tryin SetElementVisible, destroyElement but it doesnt works with player.

SetElementAlpha not exactly suitable.

I need to disable any physical impact player on the world.:smileyinthejar:

Any suggestions :?:

Link to comment

Where is the camera of the hidden player looking at ?

From your need to disable allControls it seems you don't really need the ped to be in the world at all.

You could freeze the ped (setPedFrozen) and onClientRender of the hidden player, set their position to a position below the world. That way nobody can collide with them and the onClientRender thing guarantees that they won't come back on the land (since they can't fall as normal players under the map would).

You could maybe also play with the setElementCollisionsEnabled but this would have to be propagated to all players, whereas the "freeze under the map" thing only affects the hidden player.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...