NoneM
Tebex
  • Resources
    • no-base
      • Supported Resources
      • Configuration
        • Player
          • Controls
          • Actions
        • Inventory
        • Interact (Target)
        • Alerts
          • Notification
          • Indicators
    • no-alerts
      • Exports & Events
      • Notification Usage
      • Indicator Usage
    • no-chains
      • Configuration
      • Exports & Events
    • no-contextmenu
      • Exports
      • Contextmenu Usage
      • Input Menu Usage
    • no-elevators
      • Configuration
        • Elevator Creator
        • Scene Creator
        • Floor Creator
        • Door Selector
        • Icons
      • Restrictions
        • Elevator Restriction
        • Floor Restriction
    • no-gameplaycam
      • Configuration
      • Exports & Events
    • no-housing
      • Configuration
        • Buildings
          • Adding IPL Building
          • Adding Shell Building
          • Adding Building Interaction
        • Real Estate
        • Commands
        • Furniture Interactions
        • Garage
      • House Editor
        • Creating Houses
        • Editing & Removing Existing Houses
      • Furniture Editor
        • Editing Furnitures
        • Editing Furniture Categories
      • Access Sharing
      • Exports & Events
    • no-mop
      • Configuration
        • Client
        • How to disable pollution for interiors?
        • Use with commands
      • Exports & Events
    • no-newspaper
      • Configuration
        • Registering Papers
      • Exports & Events
    • no-payphone
      • Configuration
      • Integration
        • VOIP Integration
        • Phone Integration
    • no-polaroid
      • Configuration
      • Exports & Events
    • no-rappel
      • Configuration
      • Exports & Events
    • no-spy
      • Configuration
        • Client
        • Commands
      • Exports & Events
    • no-torture
      • Configuration
      • Exports & Events
    • no-trains
      • Configuration
      • Exports & Events
    • no-vehicles
      • Configuration
        • Anchor
        • Cruise
        • Indicator
        • Roll
        • Seat Belt
        • Siren Lights
        • Siren Sounds
      • Exports & Events
Powered by GitBook
On this page
  • Types
  • Player
  • Server Exports
  • Examples
  1. Resources
  2. no-base
  3. Configuration
  4. Player

Controls

From this section, you can determine player controls for none resources.

PreviousPlayerNextActions

Last updated 1 year ago

Types


Player

Field
Type
Description
Required

source

number

Server id of the player

userId

number

Unique id of the player

key

string

Unique identifier of the player

fullname

string

Fullname of the player's character

phoneNumber

string

Phone number of the player's character

Server Exports


RegisterPlayer

Registers the player to the system after the player's character is loaded.

Parameters

  • player:

RemovePlayer

Removes the player from the system after the player changes a character.

Parameters

  • playerId: number (Player's server id / source)

NewCharacter

Controls new character creation.

Parameters

Examples


RegisterNetEvent("selection:characterLoaded", function(pData)
    exports["no-base"]:RegisterPlayer({
        source = source,
        userId = pData.id,
        key = pData.identifier,
        fullname = pData.firstname .. " " .. pData.lastname,
        phoneNumber = pData.phoneNumber
    })
end)

RegisterNetEvent("selection:characterUnloaded", function(pData)
    exports["no-base"]:RemovePlayer(source)
end)

RegisterNetEvent("selection:newCharacter", function(pData)
    exports["no-base"]:NewCharacter({
        source = source,
        userId = pData.id,
        key = pData.identifier,
        fullname = pData.firstname .. " " .. pData.lastname,
        phoneNumber = pData.phoneNumber
    })
end)

-- Restart Handler
AddEventHandler("onResourceStart", function(resName)
    if resName ~= "no-base" then return end
    Wait(250)
    
    local players = GetLoadedCharacters()

    for _, pData in pairs(players) do
        exports["no-base"]:RegisterPlayer({
            source = pData.source,
            userId = pData.id,
            key = pData.identifier,
            fullname = pData.firstname .. " " .. pData.lastname,
            phoneNumber = pData.phoneNumber
        })
    end
end)

player:

Player
Player