Jump to content

[HELP] ID System


Recommended Posts

ID System
 

local charID = {}
entHandler("onPlayerJoin", getRootElement(), function()
    local slot = nil
    for i = 1, 1024 do
        if (charID[i]==nil) then
            slot = i
            break
        end
    end
    charID[slot] = source
    setElementData(source, "Player:ID", slot)
end)

addEventHandler("onPlayerQuit", getRootElement(), function()
    local slot = getElementData(source, "Player:ID")
    if (slot) then
        charID[slot] = nil
    end
end)

 

Link to comment
43 minutes ago, TheMOG said:

ID System
 


local charID = {}
entHandler("onPlayerJoin", getRootElement(), function()
    local slot = nil
    for i = 1, 1024 do
        if (charID[i]==nil) then
            slot = i
            break
        end
    end
    charID[slot] = source
    setElementData(source, "Player:ID", slot)
end)

addEventHandler("onPlayerQuit", getRootElement(), function()
    local slot = getElementData(source, "Player:ID")
    if (slot) then
        charID[slot] = nil
    end
end)

 

he didn't ask for an id system he wants to get the player's name, acl group and id from a command

so @MRThinker u have to try to do it by yourself we're here to help u not to make codes for you

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...