CocaColaBear / types-ragemp-s

Rage:MP TypeScript type definition for Server-side
https://rage.mp/
MIT License
44 stars 41 forks source link

Per-entity events missing from typings #25

Open AGraber opened 4 years ago

AGraber commented 4 years ago

https://wiki.rage.mp/index.php?title=Changelog#Events_examples

// 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
    });
});