playScreenEffect(name, duration) -- stop a screen effect -- name, see https://wiki.fivem.net/wiki/Screen_Effects vRP.stopScreenEffect(name) -- FUNCTIONS BELOW ARE EXPERIMENTALS -- get nearest players (inside the radius) -- return map of player => distance in meters vRP.getNearestPlayers...
In our written example, we send the author name `[CarSpawner]` in red and a message as arguments. But what about `TriggerEvent()`? That's also defined by _us_. It's used to call the event `chat:addMessage`, which is part of the [chat](/docs/resources/chat/events/chat-add...
In the meanwhile, we snuck in a call to get the player's heading using {{<native_link "GET_ENTITY_HEADING">}}, which makes the car spawn facing the same direction as the player. We use {{% native_link "CREATE_VEHICLE" %}} to, well, create a vehicle. In the meanwhile, we ...