Jump to content

Whitelist [HELP]


Recommended Posts

hey guys i want to create whitelist, but when resource started, debugscrip output this:

malformed number near '080209AF2E09E389F6C55AFB6B5A5A54'

so i can't create table with serial numbers ?

  
local whitelist = { 
[080209AF2E09E389F6C55AFB6B5A5A54] 
} 
  
  
addEventHandler("onPlayerConnect", root, setWhiteList ) 
function setWhiteList ( source, serial, allow ) 
local serial = getPlayerSerial ( source ) 
if serial then 
local allow = unpack ( whitelist [serialNumber] ) 
if ( serial == allow ) then 
end 
if ( serial ~= allow ) then 
kick( source, getThisResource(), "You are not in whitelist" ) 
end 
end 
end 
end 
  

Link to comment
local Whitelist = { 
    ["080209AF2E09E389F6C55AFB6B5A5A54"] = true 
} 
  
addEventHandler("onPlayerConnect", root, 
    function (_, _, _, serial) 
        if (not Whitelist[serial]) then 
            return cancelEvent(true, "You are not on the whitelist") 
        end 
    end 
end 

Link to comment
local Whitelist = { 
    ["080209AF2E09E389F6C55AFB6B5A5A54"] = true 
} 
  
addEventHandler("onPlayerConnect", root, 
    function (_, _, _, serial) 
        if (not Whitelist[serial]) then 
            return cancelEvent(true, "You are not on the whitelist") 
        end 
    end 
end 

do not work :(

Link to comment
local Whitelist = { 
    ["080209AF2E09E389F6C55AFB6B5A5A54"] = true 
} 
  
addEventHandler("onPlayerConnect", root, 
    function (_, _, _, serial) 
        if (not Whitelist[serial]) then 
            return cancelEvent(true, "You are not on the whitelist") 
        end 
    end 
end 

X

..

local Whitelist = { 
  ["080209AF2E09E389F6C55AFB6B5A5A54"] = true, 
} 
  
addEventHandler( "onPlayerConnect", root, function (_, _, _, serial) 
      if not ( Whitelist[ serial ] ) then 
        cancelEvent( true, "You are not on the whitelist" ) 
    end 
end ) 
Link to comment
local Whitelist = { 
    ["080209AF2E09E389F6C55AFB6B5A5A54"] = true 
} 
  
addEventHandler("onPlayerConnect", root, 
    function (_, _, _, serial) 
        if (not Whitelist[serial]) then 
            return cancelEvent(true, "You are not on the whitelist") 
        end 
    end 
end 

X

..

local Whitelist = { 
  ["080209AF2E09E389F6C55AFB6B5A5A54"] = true, 
} 
  
addEventHandler( "onPlayerConnect", root, function (_, _, _, serial) 
      if not ( Whitelist[ serial ] ) then 
        cancelEvent( true, "You are not on the whitelist" ) 
    end 
end ) 

idk maybe i have stupid server, but it's now working too

Link to comment
  • 4 years later...

local Whitelist = { 
  ["SERIAL"] = true,
  ["SERIAL"] = true,


  
addEventHandler( "onPlayerConnect", root, function (_, _, _, serial) 
      if not ( Whitelist[ serial ] ) then 
        cancelEvent( true, "Você não está na whitelist" ) 
    end 
end ) 

Edited by AirFlexin
Link to comment
3 hours ago, AirFlexin Scr said:

local Whitelist = { 
  ["SERIAL"] = true,
  ["SERIAL"] = true,


  
addEventHandler( "onPlayerConnect", root, function (_, _, _, serial) 
      if not ( Whitelist[ serial ] ) then 
        cancelEvent( true, "Você não está na whitelist" ) 
    end 
end ) 

Posted July 11, 2014

I think you're 5 years too late dude ?

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...