Set location to spawn cars

I’m new to the forum, and i’m also new to FiveM server, but i have seen some videos and read some texts about the server, so what i understand is that we have a resource paste where we paste all of our modifications(wich are made in lua, some include sql scripts and other things).
So if i want to spawn a cop car at a specific location everytime the server starts i would have to create a mod? and it would be something like:

AddEventListener("serverStartEventName", function(event, parameters, comes, here)
    spawnCopCaoFunction(location.x, location.y, location.z)
end)

Am i right? if yes, could someone help me translate this code into a real mod?

Am i wrong? if yes, can you show me where i’m wrong and how can i get it right?

Thanks for attention.