i have an ymap with a single entity on it with a fxmanifest.lua that looks like this
version '1.0.0'
author 'me'
description 'my map'
resource_type 'map' { gameTypes = { ['mymode'] = true } }
map 'map.lua'
fx_version 'adamant'
game 'gta5'
this_is_a_map 'yes'
thing is, if i load a map through the server console with “start mymap1” the entity shows up fine, but then if i do “stop mymap1” the entity is still there, unless i drive away and then its gone when i drive back.
i want the entity to dissapear immeadiately when the resource is unloaded on the server, is there a way to flush o reset the object streamer so that everything dissapears? or any other solution
This isn’t possible unless you use different natives which can easily be find by using google.com
i did try with some natives through lua but didnt get any good results
from https://docs.fivem.net/natives
ClearArea, ClearAreaOfObjects and ClearAreaOfEverything don’t seem to work and im sure my map’s entity is within the radius.
also tried disabling streaming with SetStreaming(false) but that just stops it, everything that was already loaded is still there
and i can’t figure out what ClearHdArea() does, but it doesn’t seem to do what i want.
i would appreciate if you could tell me which native could work for this.
thanks
It’s not good practice to stop ymaps/resources on a live server.