[Release] Camping

Tent goes through the floor if its not on a road

Only happens very rarely for me when I was testing it. Just trying again (a few times) usually does the trick for me.

Would I get permission to make this an ESX resource, so that tents etc are purchasable and one time use?

1 Like

Sure go ahead. Just provide appropriate credit/source info when re-releasing.

this should fix the props spawning under that map just add it to the client. Works for me anyway
Client.lua

Citizen.CreateThread(function()
    PlaceObjectOnGroundProperly(propname)
    PlaceObjectOnGroundProperly(propname)
    PlaceObjectOnGroundProperly(propname)
    PlaceObjectOnGroundProperly(propname)
end)

I’ve updated the main Gist to include this (slightly modified though). Thanks :slight_smile:

2 Likes

Would be nice if you could share your version!

First time I bring things to spawns, it works fine, but second time it spawn about ‘a meter’ above the ground, can you please do anything about it ? :slight_smile:

1m above the ground or below? Because the previous version gave some people issues where it would spawn below the ground… And now it spawns above the ground? idk why this happens, try the previous version and see if that works better for you.

Sorry my English. Above the ground. But first time I spawn, it works fine :slight_smile:

I honestly don’t know why this happens so I can’t fix it for you. The thing I mentioned above (see quote) is the only thing I can think of.

Maybe it’s only me there have the problem. As I can see, other don’t talk about this problem, soo ? But okay and thanks :slight_smile:

lol nice one :tent: :smiley:

Nah I have this problem too

Hi. I downloaded the latest version because I read that it solved the problem of spawning far above the ground, practically in midair. The problem is that even with this last version I still have this problem :pensive:

I have a problem iv changed the z cords to lower to sit on the floor the first time the spawn in there good but the next time the above the ground again and help please the chair is fine but the tent and the campfire isn’t

local x,y,z = table.unpack(GetOffsetFromEntityInWorldCoords(PlayerPedId(), 0.0, 2.0, -1.55))

is there a reason why z coord is set to -
shouldn’t it be set to 0.00 ??

Z is the height, so for the model I used, it needs to be lower than 0.00. This is the case 9/10 times to spawn correctly, however depending on the location where you spawn it, it might be slightly above or below the ground. There’s not much I can do about this as it varies per location, that’s just how gta works.

1 Like

Can you make it so it doesnt spawn in the air every time i’m in the wilderness and want to spawn this. The purpose this script is built does not succeed. It can be used on flat surfaces but that is not much use as you will be spawning it in the wilderness

Although it is still a good script

Make your own then if you don’t like it.

It works fine, the reason it sometimes spawns above ground is just GTA being weird. Using natives to ‘set it on the ground properly’ doesn’t work randomly and getting the ground coord doesn’t help either if the model randomly changes.

So far, I’ve seen no other way you could possibly set an object on the ground properly, unless I added commands that allowed you to manually enter coordinates (but I doubt most people wouldn’t like that having to enter coords manually)

Do you think it would be possible to allow this set of commands to be executed stricly in a defined zone of the map ?

Thanks for any advice regarding this.