// Per-entity (available for all of entities) event manager
mp.events.add("playerJoin", (player) =>
{
player.events.push("playerSpawn", (player) =>
{
mp.players.broadcast(`hey ${player.name}, this is your first spawn!`);
return true; // return true from the event to destroys it for the entity after execution
});
});
https://wiki.rage.mp/index.php?title=Changelog#Events_examples