Jump to content

Alguém Sabe Como Faço Pra Começar do ID 1000 Ao Invez de ID 1


Recommended Posts

NÃO MANJO MUITO DESSAS PARADA DE ID, GOSTARIA QUE EM VEZ DE INICIAR DO ID 1, INICIASSE DO ID 1000. ISSO É POSSIVÉL? ALGUÉ PODE ME AJUDAR!


ESSE É O SCRIPT DO MEU SISTEMA DE ID ATUAL:

 


function Start_Id ( _, acc )
    if eventName == "onPlayerLogin" then
        setElementData ( source, "ID", getAccountID(acc) or "N/A" )
        outputChatBox ( "#838B83➲ #ff0000LOGIN #838B83➲ Nick: #ff0000 ( ".. getPlayerName(source) .." #ff0000) ID: ( "..(getAccountID(acc) or "N/A") .." )", root, 255,255,255,true)
    elseif eventName == "onPlayerLogout" then
        removeElementData( source, "ID" )
        outputChatBox ( "#838B83➲ #ff0000LOGIN #838B83➲ Nick: #ff0000 ( ".. getPlayerName(source) .." #ff0000) Deslogou.", root, 255,255,255,true)
    elseif eventName == "onResourceStart" then
        for _, player in pairs(getElementsByType("player")) do
            local acc = getPlayerAccount(player)
            if not isGuestAccount(acc) then
                setElementData( source, "ID", getAccountID(acc) or "N/A" )
            end
        end
    end
end
addEventHandler("onResourceStart", resourceRoot, Start_Id)
addEventHandler("onPlayerLogout", root, Start_Id)
addEventHandler("onPlayerLogin", root, Start_Id)

function getPlayerID(id)
    v = false
    for i, player in ipairs (getElementsByType("player")) do
        if getElementData(player, "ID") == id then
            v = player
            break
        end
    end
    return v
end
--============================================================================================================================--
                                   --=============================--
                                   ----------- ID PLAYER ------------
                                   --=============================--
function getnick(player, command, id, ...)
    if(id) then
        local playerID = tonumber(id)
        if(playerID) then
            local Player2 = getPlayerID(playerID)
            if(Player2) then    
                outputChatBox ( "#838B83➲ #ff0000INFO #ff0000 ➲ #ff0000 Nome do Jogador #ff0000" .. getPlayerName(Player2) .."", player, 255,255,255,true)
            else
                outputChatBox ( "#838B83➲ #ff0000ERRO #ff0000 ➲ #ff0000 O Jogador(a) de ID: #ff0000( " .. id .. " ) #ff0000Não Foi Encontrado!", player, 255,255,255,true)
            end 
        else
            outputChatBox ( "#838B83➲ #ff0000ERRO #ff0000 ➲ #ff0000 ID: #ff0000( " .. id .. " ) #ff0000Inválido!", player, 255,255,255,true)
        end
    else
        outputChatBox ( "#838B83➲ #ff0000 Use /id #ff0000[#ffffffID#00ff00]", player, 255,255,255,true)
    end
end
addCommandHandler("id", getnick)

ESSE É O TAG ID:

 

local drawDistance = 7
g_StreamedInPlayers = {}

function onClientRender()
  local cx, cy, cz, lx, ly, lz = getCameraMatrix()
  for k, player in pairs(g_StreamedInPlayers) do
    if isElement(player) and isElementStreamedIn(player) then
      do
        local vx, vy, vz = getPedBonePosition(player, 4)
        local dist = getDistanceBetweenPoints3D(cx, cy, cz, vx, vy, vz)
        if dist < drawDistance and isLineOfSightClear(cx, cy, cz, vx, vy, vz, true, false, false) then
          local x, y = getScreenFromWorldPosition(vx, vy, vz + 0.3)
          if x and y then
            local ID = getElementData(player, "ID") or "N/A"
            local w = dxGetTextWidth(ID, 0.1, "default-bold")
            local h = dxGetFontHeight(1, "default-bold")
            dxDrawText("("..ID..")", x - 1 - w / 1, y - 1 - h - 12, w, h, CorTag, 1.20, "default-bold", "left", "top", false, false, false, false, false)        
            CorTag = tocolor(255, 255, 255)
            
            if getElementData(player, "Cor", true) then
             CorTag = tocolor(70, 130, 180)
            end

          end
        end
      end
    else
      table.remove(g_StreamedInPlayers, k)
    end
  end
end
addEventHandler("onClientRender", root, onClientRender)


function CorTagid ()
   if getElementData(localPlayer, "Cor", true) then
      setElementData(localPlayer, "Cor", false)
    else
      setElementData(localPlayer, "Cor", true)
   end
end
bindKey ( "z", "both", CorTagid )

function onClientElementStreamIn()
  if getElementType(source) == "player" and source ~= getLocalPlayer() then
    setPlayerNametagShowing(source, false)
    table.insert(g_StreamedInPlayers, source)
  end
end
addEventHandler("onClientElementStreamIn", root, onClientElementStreamIn)

function onClientResourceStart(startedResource)
  visibleTick = getTickCount()
  counter = 0
  local players = getElementsByType("player")
  for k, v in pairs(players) do
    if isElementStreamedIn(v) and v ~= getLocalPlayer() then
      setPlayerNametagShowing(v, false)
      table.insert(g_StreamedInPlayers, v)
    end
  end
end
addEventHandler("onClientResourceStart", resourceRoot, onClientResourceStart)

Edited by Sr. Bruxo
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...