Hey,
I'm not the best with tables... at all. So, say I have a table that contains people's serials. I want to know what type of loop I'd use, and how I would detect if their serial matches any one of them from the table. I need to know the table layout as well. I don't care about efficiency by the way.
local allowedSerials = {
{"5y7rwfbh54ywgbvfgvnwe45gnaevhrt5"} -- Note, these aren't real serials, just examples for the sake of it
{"nregaau3brquq34hqvgr85rfa348t585t"}
}
for k, v in ipairs (allowdSerials) do
-- code
end
function checkForSerial()
sourceSerial = getPlayerSerial(source);
if (sourceSerial ~= allowedSerials[1]) then
kickPlayer(source, "You ain't allowed nigga");
end
end
addEventHandler("onPlayerJoin", root, checkForSerial)
That's what I suppose it would look like... I'm not sure. Any help would be appreciated. Thanks.