Hallo, ich habe ein problem mit diesem script hier..
Lua
function achat(thePlayer, command, ...)
local adminlvl =
if (getPlayerAdminlevel(thePlayer) > 0)
if adminlvl == 1 then
aname = "Supporter"
color = "#00FFFF"
elseif adminlvl == 2 then
aname = "Moderator"
color = "#00FF00"
elseif adminlvl == 3 then
aname = "Super Mod"
color = "#FF9600"
elseif adminlvl == 4 then
aname = "Administrator"
color = "#FFFF00"
elseif adminlvl == 5 then
aname = "Inhaber"
color = "#FF0000"
elseif adminlvl > 5 then
aname = "Projektleiter"
color = "#F00000"
end
if adminlvl ~= 0 then
for index, cPlayer in pairs(getElementsByType( "thePlayer" )) do
if(getPlayerAdminlevel(thePlayer) > 0) then
local ttext = table.concat( {...}, " " )
outputChatBox("["..aname.."] ["..getPlayerName(thePlayer).."]:"..ttext.."",cPlayer,255,125,0)
end
end
else
outputChatBox("Du bist kein Admin!", thePlayer, 255,0,0)
end
end
addCommandHandler("a", achat)
Alles anzeigen
ERROR: bfreallife/admin/admincmds.lua:104: attempt to compare number with boolean
Es ist für bfreallife gescriptet, ich hab Noneatme Schon gefragt er sagte das die elementdatas nicht adminlevel sind sondern "pAdminlevel"
Dies geht aber auch nicht-