I executed the command spawn and none of them spawned to the playerCoordinates
After recovering CreateVehicleServerSetter I tried to use it to spawn any vehicle in server-side but none of them are spawning in my client screen. My server just thinks they exist but none of them are visible.
Here’s the code:
RegisterCommand(
"spawn",
(source: number, args: string[]) => {
const playerCoords = GetEntityCoords(GetPlayerPed(source.toString()));
const vehicle = CreateVehicleServerSetter("cheetah", "automobile", playerCoords[0], playerCoords[1], playerCoords[2], 90.0);
if (DoesEntityExist(vehicle)) {
console.log(`^2Created vehicle at ${playerCoords}^7`);
} else {
console.log(`^1Failed to create vehicle at ${playerCoords}^7`);
}
},
false,
);
