I wan’t to set use the set coords native function whenever the first player spawns, I have been looking on the fivem forums and can’t seem to find out how to use it or anything. I’m wanting to set it as a spawn point.
AddEventHandler(“playerSpawned”, function(spawn)
spawn = {
x = 1736.64, y = 6419.05, z = 35.0372 }
}
end
end)
void SET_ENTITY_COORDS(Entity entity, float xPos, float yPos, float zPos, BOOL xAxis, BOOL yAxis, BOOL zAxis, BOOL clearArea);
p7 is always 1 in the scripts. Set to 1, an area around the destination coords for the moved entity is cleared from other entities.
Often ends with 1, 0, 0, 1); in the scripts. It works.
Axis - Invert Axis Flags
huh… sorry I don’t quite understand what you mean, I have just recently started learning Lua
https://runtime.fivem.net/doc/reference.html#_0x06843DA7060A026B it’s this native, in Lua u use elephant script so that would be:
SetEntityCoords(entity, xPos, yPos, zPos, xAxis, yAxis, zAxis, clearArea)
Then don’t use event handlers (which’ll cause double spawning), but properly use spawnmanager
or make a custom map file.