I’m looking for a way to draw a corona. The circle-like glowing objects usually hovering over a light. An example is here:
I’m also looking to see if its possible to draw the light beam effect. I’m not sure how to explain it… but the area between the light source and where it is heading will be sort of lit up. Like this:
I know both are possible, but there is no explanation anywhere on how to do either. I would love it if somebody knew how to get either of these done.
Hmm… that’s strange. Though it explains why nobody got the polmav spotlight to “turn” since that’s the only light that uses that beam. Not sure if it’s possible though.
I’ve done some searching and it might not be useful but I’ve found out that most ‘corona’ enhancement mods just change the corona.png file (located in GTAV\x64.rpf\textures\graphics.ytd\corona.png) Maybe using SetDrawOrigin() you’ll be able to somehow draw that picture at the location of the light source and thus create the corona effect? This is not tested, it’s just an idea but I’ve no clue if that’s even possible or creates the real corona effect you’re looking for.
To add to my previous reply, this works but there’s an issue. Can’t figure out how to get the corona picture to load. I can load any texture dictionary in /update/update.rpf/x64/textures/script_txds.rpf but I can’t seem to load any other dictionaries so there’s no way to download the corona png
Edit this is what it’d look like if you would use this code, if there’s a way to get the corona instead of that green triangle then that’d be great, though I haven’t actually found a way to get that corona texture to work:
code:
Citizen.CreateThread(function()
local dic = "helicopterhud"
RequestStreamedTextureDict(dic)
while not HasStreamedTextureDictLoaded(dic) do
Citizen.Wait(100)
end
while true do
local localped = PlayerPedId()
local lx,ly,lz = table.unpack(GetEntityCoords(localped))
local veh = GetClosestVehicle(lx,ly,lz, 5000.0, 0, 70)
if veh ~= nil then
local x,y,z = table.unpack(GetEntityCoords(veh))
z = z + 1.0
SetDrawOrigin(x, y, z, 0)
DrawSprite(dic, "hudarrow", 0.01, 0.01, 0.4*0.033, 0.4*0.059, 0.0, 0, 255, 0, 255)
ClearDrawOrigin()
end
Citizen.Wait(0)
end
end)
You’re right, didn’t think about that. Also for almost all SP snow mods (ped footsteps/vehicle trails) they used memory calls. But there’s a native for both those things, might also be a native for these memory calls, maybe one that’s just a hash value and hasn’t been documented yet? That’s just guessing though, probably isn’t a quick way to find out.
There was some github I was going through yesterday that had the memory calls for those. I can’t remember if it was the FiveM one or some other mod, but I can’t find it now. It definitely was something to do with memory though.
Time to start calling every hash – not really. Damn… I really want to figure this out, but no idea how.
I also wonder if it might be a particle effect (or be able to closely replicate it with a particle effect). I’ve seen some things in there that are like “red light”, “white light”, etc. I never had any luck with getting them to show up, though.
Edit: Yeah, in here ( https://pastebin.com/N9unUFWY ) there is veh_light_clear, veh_light_amber, veh_light_red among others. I’ll have to play with it and see if I can get any of them working…
I’ve been working on a firework show script, I’ll take a look and see if I can find any particles that match a corona will let you know if I find something useful!
Well that’s very disappointing… the veh_light_amber only produces this smoke:
Don’t have time to test the others right now, will try them later, this is the code.
Citizen.CreateThread(function()
local asset1 = "core"
RequestNamedPtfxAsset(asset1)
while not HasNamedPtfxAssetLoaded(asset1) do
Citizen.Wait(1)
end
print('done')
UseParticleFxAssetNextCall(asset1)
part = StartParticleFxNonLoopedAtCoord("veh_light_amber", 59.0, 7223.0, 4.5, 0.0, 0.0, 0.0, 1.0, false, false, false, false)
end)
You’ll have to go to the coordinates in that command (59.0, 7223.0, 4.5,) to see it.
i changed ur code to spawn it on me also it probably was a lazy edit also you can always change z to z+1 so it spawns above your head so you can see it better
Citizen.CreateThread(function()
local asset1 = "core"
RequestNamedPtfxAsset(asset1)
while not HasNamedPtfxAssetLoaded(asset1) do
Citizen.Wait(1)
end
print('done')
while true do
Citizen.Wait(0)
UseParticleFxAssetNextCall(asset1)
x,y,z = table.unpack(GetEntityCoords(PlayerPedId(), true))
part = StartParticleFxNonLoopedAtCoord("veh_light_amber", x, y, z, 0.0, 0.0, 0.0, 1.0, false, false, false, false)
end
end)
Maybe it’s the smoke that comes off the car when bullets impact, different car colors produce different smoke (_red _amber etc)? Or just different types of tire smoke?