New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@infernus/e-selection

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@infernus/e-selection

A wrapper of the popular SA-MP eSelection library for samp-node.

latest
Source
npmnpm
Version
0.0.2
Version published
Weekly downloads
3
Maintainers
1
Weekly downloads
 
Created
Source

@infernus/e-selection

npm npm npm bundle size

A wrapper of the popular SA-MP eSelection library for samp-node.

Getting started

pnpm add @infernus/core @infernus/e-selection

Example

import { type Player, PlayerEvent } from "@infernus/core";
import { type IModelData, ModelSelectionMenu } from "@infernus/e-selection";

PlayerEvent.onSpawn(({ player, next }) => {
  showSkinModelMenu(player)
  return next()
})

async function showSkinModelMenu(player: Player) {
  // create a list to populate with models.
  // add skin IDs 0, 1, 29 and 60 with "cool people only" text above skin ID 29.
  const skins: IModelData[] = [
    { modelId: 0 },
    { modelId: 1 },
    { modelId: 29, modelText: 'Cool people only' },
    { modelId: 60 },
  ].concat(Array.from({ length: 15 }).map((_, id): IModelData => {
    return { modelId: id, rotX: Math.random() * 5 }
  }))

  try {
    // use await_arr and set the response array to the model selection menu result
    const skin = await new ModelSelectionMenu({
      player,
      models: skins,
      headerText: 'Skins',
    }).show()

    // make sure the player actually clicked on a model and not the close button
    if (skin) {
      // assign the player the skin of their choosing
      player.setSkin(skin.modelId)
    }
  }
  catch (err) {
    player.sendClientMessage(-1, JSON.stringify(err))
  }
}

Keywords

samp

FAQs

Package last updated on 19 Dec 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts