Player PED stays after Quitting/Disconnecting

Hey there…

When someone quits or disconnects from the server, his body/ped stays and becomes an NPC that slowly walks away.
Could you please help me out with a way to disable this function?
I would like to make it so that when someone exits the server, his body disappears.
I did try an old recommendation from someone else’s post which was:

AddEventHandler('playerDropped', function()
    local playerIdx = GetPlayerFromServerId(source)
    local ped = GetPlayerPed(playerIdx)

    RemovePedElegantly(ped)
end)

Unfortunately though, it does not get triggered.
Any help will be appreciated! :smiley:

I do not know how to do this, but i’m pretty certain you can’t get anything about the player in playerDropped

I also just tried using DeleteEntity(ped) instead of RemovePedElegantly but nope…
Well, I can’t let it be like that. It looks kinda stupid for me.
On the servers that I play usually when someone quits the game, his PED just get remove almost instantly.
There has to be some way to do this…

Because when OneSync is enabled player ped is removed after disconnect, when OneSync is disabled it works like GTA:O

1 Like

So when I enable OneSync, the issue will be solved “automatically” ?

Thanks for the info!

Don’t forget that OneSync isn’t free.
Still, sometimes the Ped will stay, but it’ll get removed within a minute or two.

Yea I know it’s not free. But surely it will be one of the last things that I’ll put in the server.
I need to make sure everything else is set up and working correctly and then Ill move on to install onesync.

Thanks guys

OneSync is free up to 32 slots, if you want more and ability to stream clothes and so on you need to be a patron

2 Likes

Good day,I know it’s been a long time for this , but I really want it the other way around. I want my players to turn into an npc if they disconnect.
I do use onesync, but does anyone know how to do this? Hope some one could help me out,because I can’t find anything regarding to this :sweat_smile:. Thanx in advance :+1:t2:.