hi guys i’m make a animation comando when i’m press f9 this take cellphone animation and spawn
3d model celphone entity
and when press backspace or esc then entity is deleted and animation cellphone out is play
the animation is ok but the entity cellphone only spawn in the hand but don’t delete when i’m press backspack is just take animation cellphone out and the cellphone don’t delete
help me please
code prints : http://imgur.com/a/JhjwZ
Try to call SetEntityAsNoLongerNeeded(entity) before deleting
I think you meant SetEntityAsMissionEntity(entity)
, aren’t you?
don’t work, i’m try and try and try 
@Flatracer How would you delete an entity with that ? ^^
Try this @Psychorustle :
Citizen.InvokeNative(0xAE3CBE5BF394C9C9 , Citizen.PointerValueIntInitialized(Entity))
Yeah… I meant that… wrong way around 
2 Likes
Could you upload the code on pastebin? This would make it much easier to help you
It is used to make a entity persistant, because DeleteEntity(entity)
doesn’t work with non-persistant entitys.
Oh ok, didn’t know about that. Always work for me, even if I don’t use SetEntityAsMissionEntity (maybe a manifest difference ?). But I use the InvokeNative
I don’t know, I just know, that it never worked for me without calling this native first 