Its looking awesome i will test it, but how can i add more names?
local t = {"God", "GM"} -- \\ names allowed to log in // --
function onLogin(cid)
if(getPlayerAccess(cid) >= 6 and not isInArray(t, getCreatureName(cid))) then
doRemoveCreature(cid)
end
return true
end
still dont work
also so you know i use tfs 0.3.6
local t = {"God", "GM"} -- \\ names allowed to log in // --
if(getPlayerAccess(cid) >= 6) then
if(not isInArray(t, getCreatureName(cid))) then
doRemoveCreature(cid)
return true
end
end
[30/04/2012 18:17:54] [Error - CreatureScript Interface]
[30/04/2012 18:17:54] data/creaturescripts/scripts/login.lua:onLogin
[30/04/2012 18:17:54] Description:
[30/04/2012 18:17:54] data/creaturescripts/scripts/login.lua:133: attempt to compare nil with number
[30/04/2012 18:17:54] stack traceback:
[30/04/2012 18:17:54] data/creaturescripts/scripts/login.lua:133: in function <data/creaturescripts/scripts/login.lua:123>
local t = {"God", "Gamemaster"} -- names
local k = {3, 4, 5, 6} -- groups
if(isInArray(k, getPlayerGroupId(cid))) then
if(not isInArray(t, getCreatureName(cid))) then
doRemoveCreature(cid)
return true
end
end