Enable collision after disabling

Hello everybody.

I tried to let the player sit on a chair in the casino. So what I’ve done is, that the player goes to a specific coord, then I disabled the collision between the player and the object in the casino, after that I just run an animation, which lets the player sit down on the chair. So until now I used following natives: TaskGoStraightToCoord, TaskPlayAnim and last but not least SetEntityNoCollisionEntity. From the nativeDB I know, that when you set the last value of the SetEntityNoCollisionEntity to false, the collision will be “disabled until it is turned back on”. But how to turn it on now? I tried to simple call that native again, but the last parameter set to true. Well, this didn’t work. Does anyone of you know, how to “turn the collision back on”?

Calling the native again with true instead of false re-enabled the collision for me. Are you sure your call was correct ?

Over the last days I tried to re-enable the collision with your version of how to do it. It didn’t work. I’ll sent you the exact code that I used:

function disableCollision(obj, enable)
if enable then
SetEntityNoCollisionEntity(obj, GetPlayerPed(-1), true)
else
SetEntityNoCollisionEntity(obj, GetPlayerPed(-1), false)
end
end

If I want to disable the collision, I call this function with the object, and false.
This works. If I now want to re-enable the collision, I call the same function, but instead of false, I use true as parameter.
But that doesn’t work.

Sorry for the late answer, I tried it over the last few days… But I hope you can help me.