You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, When I execute this code, only entityRemoved is being triggered
letJOB_PEDletINTAddEventHandler("onResourceStart",res=>{if(res!=GetCurrentResourceName())returnlet[x,y,z,heading]=[142.48,-871.71,30.62,207]JOB_PED=CreatePed(26,GetHashKey("s_m_y_airworker"),x,y,z-1,heading,true,true)console.log(`Entity ID: `,JOB_PED)INT=setInterval(()=>{if(DoesEntityExist(JOB_PED))console.log("Ped Exists")if(NetworkGetNetworkIdFromEntity(JOB_PED)){console.log("Ped Net ID Exists",NetworkGetNetworkIdFromEntity(JOB_PED))clearInterval(INT)}},1000);setTimeout(DeleteEntity,10000,JOB_PED)})AddEventHandler("entityCreated",en=>console.log(`New Entity Created`,en))AddEventHandler("entityCreating",en=>console.log(`Creating New Entity`,en))AddEventHandler("entityRemoved",en=>console.log(`Entity Removed`,en))
Expected result
it should log Creating New Entity or New Entity Created
Reproduction steps
Add the code above in a server-side script
start the resource
Importancy
Slight inconvenience
Area(s)
FiveM, FXServer, OneSync
Specific version(s)
FXServer-master SERVER v1.0.0.8695 win32
Client: b2802 Canary
Additional information
No response
The text was updated successfully, but these errors were encountered:
I don't think server-created entities should trigger entityCreating at all because the server expects it to 'just exist'.
iirc the reason this wasn't fixed before for entityCreated is that there was the off chance that it would break compatibility existing usages of entityCreated which might expect entityCreated to have a valid owner and could break/error out if it doesn't
I don't think server-created entities should trigger entityCreating at all because the server expects it to 'just exist'.
iirc the reason this wasn't fixed before for entityCreated is that there was the off chance that it would break compatibility existing usages of entityCreated which might expect entityCreated to have a valid owner and could break/error out if it doesn't
Oh I see, So it won't be fixed ? Or is there a chance it could be fixed in future
I don't think server-created entities should trigger entityCreating at all because the server expects it to 'just exist'.
iirc the reason this wasn't fixed before for entityCreated is that there was the off chance that it would break compatibility existing usages of entityCreated which might expect entityCreated to have a valid owner and could break/error out if it doesn't
Oh I see, So it won't be fixed ? Or is there a chance it could be fixed in future
Unless they create another game event (e.g., serverEntityCreated) for server-created entities, I don't think this issue is fixable, as it would break compatibility for many resources.
What happened?
Hi, When I execute this code, only entityRemoved is being triggered
Expected result
it should log
Creating New Entity
orNew Entity Created
Reproduction steps
Importancy
Slight inconvenience
Area(s)
FiveM, FXServer, OneSync
Specific version(s)
FXServer-master SERVER v1.0.0.8695 win32
Client: b2802 Canary
Additional information
No response
The text was updated successfully, but these errors were encountered: