About This File
Requires RAGE Multiplayer 1.1.0 and above.
This resource allows you to apply a glowing effect to players.
Installing
- Put the files you downloaded in their respective places
- Add require('playerglow') to client_packages/index.js
- All done
API (Serverside)
/** * Sets the glow color of a player. * @param {Number} red * @param {Number} green * @param {Number} blue */ player.setGlowColor(red, green, blue); /** * Gets the glow color of a player. * @return {Object} Glow color, will be null if the player doesn't have one. */ player.getGlowColor(); /** * Disables the glowing effect of a player. */ player.resetGlowColor();
Example
mp.events.addCommand("setglow", (player, _, red, green, blue) => { player.setGlowColor(Number(red), Number(green), Number(blue)); }); mp.events.addCommand("getglow", (player) => { player.outputChatBox(`Current glow color: ${JSON.stringify(player.getGlowColor())}`); }); mp.events.addCommand("resetglow", (player) => { player.resetGlowColor(); });
Notes
- The effect is not really noticeable during daytime.
- If you have glowing players in your stream range and reconnect via F1 menu, their particle effect(s) will stay there until GTAV is restarted. This is because of particle handles being lost during reconnection and since they aren't managed by RAGEMP, they won't get removed.
Source code is available on GitHub in case you don't want to download: https://github.com/root-cause/ragemp-player-glow