citizenfx / fivem

The source code for the Cfx.re modification frameworks, such as FiveM, RedM and LibertyM, as well as FXServer.
https://cfx.re/
3.4k stars 1.99k forks source link

bug in after artists b8461 server #2584

Closed Pedro-Lucas14 closed 3 weeks ago

Pedro-Lucas14 commented 3 weeks ago

What happened?

for some reason after updating 8461 there is a bug where when a player enters the server it is creating random entities as in the print below a test was done in the old version and another in the version that has a bug.

old version: Screenshot_3

new version with bug: Screenshot_5

Expected result

ped does not spawn randomly at login time

Reproduction steps


local pedzero = {
    [225514697] = true,
}

AddEventHandler('entityCreating', function(entity)
    if DoesEntityExist(entity) then
        local entitytype = GetEntityType(entity)
        if entitytype == 1 then
            local model = GetEntityModel(entity)
            if not pedzero[model] then
                local popType = GetEntityPopulationType(entity)

                local playerCoords = GetEntityCoords(ped)

                print("Coords: "..playerCoords)
                print("popType: "..popType)
                print("model: "..model)

                if (popType ~= 7 and popType ~= 0) then 
                    print("aqui1")
                    return
                else
                    print("aqui2")
                end
                print("aqui3")
            end
        end
    end
end)

Importancy

Crash

Area(s)

FiveM, OneSync, ScRT: Lua

Specific version(s)

Fivem server: 8461 client : 3095

Additional information

.

gottfriedleibniz commented 3 weeks ago

For reference, you guy are still using b2372 correct?

Pedro-Lucas14 commented 3 weeks ago

I'm using build 3095

gottfriedleibniz commented 3 weeks ago

Any EntityLockdownMode? Can reproduce this.

Pedro-Lucas14 commented 3 weeks ago

@gottfriedleibniz

You can test this coordinate: -2361.0,4064.99,31.46 to reproduce the bug

new version with coordinate bug: image

old version without coordinate bug: image

Pedro-Lucas14 commented 3 weeks ago

@gottfriedleibniz I sent you a way to test the bug