Skip to main content

ResourceMod

Create unique game modes in Counter-Strike 2 using a full-fledged NodeJS runtime.

const {Color, events, chat} = require('resourcemod')
events.onPlayerSpawn((event) => {
event.player.setModel('models/your/custom/player/model.vmdl');
event.player.setColor(new Color(255, 255, 255, 0.5));
})
events.onPlayerBlind((event) => {
if (event.player.slot === event.attacker.slot) {
event.player.hint(`you blinded yourself.`)
chat.sayToEveryone(`${event.player.name} just blinded himself..`);
}
})
events.onPlayerChat((event) => {
if (event.message.startsWith('!help')) {
event.player.say('Please, read resourcemod docs: https://rmod.dev/docs/');
}
})