Guten Morgen Community ich habe mal frage ich habe das butterfly script und bei mir kommen dauert Warning
Lua
WARNING: bfreallife/register/c_register.lua [Client] is encoded in ANSI instead of UTF-8. Please convert your file to UTF-8.
Some files in 'bfreallife' use deprecated functions.
Use the 'upgrade' command to perform a basic upgrade of resources.
ich habe schon /uprade bfrallife gemacht aber der server ist den restartet und neu
hoch gefahren ich schaute wieder in die console und der gleiche text wahr wieder da
hir ist mal die c_register.lua
Lua
local Guivar = 0
addEventHandler("onClientRender", getRootElement(), function() if(Guivar == 1) then showCursor(true) end end)
local Loginfenster = {}
local LoginTabPanel = {}
local LoginTab = {}
local LoginKnopf = {}
local LoginLabel = {}
local LoginEdit = {}
local LoginRadio = {}
local LoginGrid = {}
local LoginBild = {}
function createRegisterMenue()
if(Guivar == 1) then return end
local data = tonumber(getElementData(gMe, "scriptvar"))
if(data == 1) then return end
Guivar = 1
guiSetInputMode("no_binds_when_editing")
setElementData(gMe, "inLogin", true)
local X, Y, Width, Height = getMiddleGuiPosition(531,300)
showCursor(true)
-- LOGIN --
Loginfenster[1] = guiCreateWindow(X, Y, Width, Height,"Willkommen!",false)
LoginTabPanel[1] = guiCreateTabPanel(9,26,513,265,false,Loginfenster[1])
LoginTab[1] = guiCreateTab("Login",LoginTabPanel[1])
LoginBild[1] = guiCreateStaticImage(8,11,489,68,"data/images/logo.png",false,LoginTab[1])
LoginLabel[1] = guiCreateLabel(99,87,301,35,"Willkommen auf Test Script \nDeine Daten wurden gefunden, bitte Logge dich ein!",false,LoginTab[1])
guiLabelSetHorizontalAlign(LoginLabel[1],"center",false)
guiSetFont(LoginLabel[1],"default-bold-small")
LoginLabel[2] = guiCreateLabel(16,122,117,17,"Passwort:",false,LoginTab[1])
guiSetFont(LoginLabel[2],"default-bold-small")
LoginEdit[1] = guiCreateEdit(15,142,471,29,"12345",false,LoginTab[1])
guiEditSetMasked(LoginEdit[1],true)
LoginKnopf[1] = guiCreateButton(158,179,183,29,"Einloggen",false,LoginTab[1])
LoginLabel[3] = guiCreateLabel(9,214,497,27,"(Falls du noch kein Account hast, Registriere dich, oder nehme einen anderen Namen.)",false,LoginTab[1])
guiSetFont(LoginLabel[3],"default-bold-small")
-- REGISTER --
LoginTab[2] = guiCreateTab("Register",LoginTabPanel[1])
LoginLabel[4] = guiCreateLabel(17,12,228,24,"Bitte Fuelle dieses Formular aus!",false,LoginTab[2])
guiSetFont(LoginLabel[4],"default-bold-small")
LoginLabel[5] = guiCreateLabel(15,41,292,15,"Accountname: "..getPlayerName(gMe),false,LoginTab[2])
guiLabelSetColor(LoginLabel[5],255, 255, 0)
guiSetFont(LoginLabel[5],"default-bold-small")
LoginLabel[6] = guiCreateLabel(15,58,211,18,"Passwort:",false,LoginTab[2])
guiLabelSetColor(LoginLabel[6],0, 255, 0)
guiSetFont(LoginLabel[6],"default-bold-small")
LoginEdit[2] = guiCreateEdit(12,77,197,23,"",false,LoginTab[2])
guiEditSetMasked(LoginEdit[2],true)
LoginEdit[3] = guiCreateEdit(11,119,197,23,"",false,LoginTab[2])
guiEditSetMasked(LoginEdit[3],true)
LoginLabel[7] = guiCreateLabel(14,103,211,18,"Bestaetigung:",false,LoginTab[2])
guiLabelSetColor(LoginLabel[7],0, 255, 0)
guiSetFont(LoginLabel[7],"default-bold-small")
LoginLabel[8] = guiCreateLabel(322,32,183,18,"Alter:(Kein Geburtstdatum)",false,LoginTab[2])
guiLabelSetColor(LoginLabel[8],255, 255, 0)
guiSetFont(LoginLabel[8],"default-bold-small")
LoginEdit[4] = guiCreateEdit(330,55,69,23,"",false,LoginTab[2])
LoginLabel[9] = guiCreateLabel(327,98,164,17,"Sprache:",false,LoginTab[2])
guiLabelSetColor(LoginLabel[9],255,255,0)
guiSetFont(LoginLabel[9],"default-bold-small")
LoginGrid[1] = guiCreateGridList(323,119,183,97,false,LoginTab[2])
guiGridListSetSelectionMode(LoginGrid[1],1)
guiGridListAddColumn(LoginGrid[1],"Land",0.6)
addEventHandler("onClientGUIClick", LoginEdit[1], function() if(guiGetText(source) == "12345") then guiSetText(source, "") end end, false)
local row = guiGridListAddRow (LoginGrid[1] )
guiGridListSetItemText(LoginGrid[1],row,1,"Deutschland",false,false)
local row = guiGridListAddRow (LoginGrid[1] )
guiGridListSetItemText(LoginGrid[1],row,1,"Oesterreich",false,false)
local row = guiGridListAddRow (LoginGrid[1] )
guiGridListSetItemText(LoginGrid[1],row,1,"Schweiz",false,false)
guiWindowSetSizable ( Loginfenster[1], false )
guiWindowSetMovable ( Loginfenster[1], false )
LoginLabel[10] = guiCreateLabel(13,153,117,18,"Geschlecht:",false,LoginTab[2])
guiLabelSetColor(LoginLabel[10],255, 255,0 )
guiSetFont(LoginLabel[10],"default-bold-small")
LoginRadio[1] = guiCreateRadioButton(15,175,114,21,"Maennlich",false,LoginTab[2])
guiRadioButtonSetSelected(LoginRadio[1],true)
LoginRadio[2] = guiCreateRadioButton(14,195,114,21,"Weiblich",false,LoginTab[2])
LoginKnopf[2] = guiCreateButton(169,187,134,30,"Registrieren",false,LoginTab[2])
-- Functions --
local function setEnabled()
for i = 1, #LoginKnopf, 1 do
guiSetEnabled(LoginKnopf, true)
end
end
local function setDisabled()
for i = 1, #LoginKnopf, 1 do
guiSetEnabled(LoginKnopf, false)
end
end
setDisabled()
triggerServerEvent("onLoginDataNeed", gMe)
addEvent("onLoginDataNeedBack", true)
addEventHandler("onLoginDataNeedBack", getRootElement(),
function(var)
if(var == 1) then
setEnabled()
guiSetSelectedTab(LoginTabPanel[1], LoginTab[1])
guiSetEnabled(LoginTab[2], false)
guiSetEnabled(LoginTab[1], true)
else
setEnabled()
guiSetSelectedTab(LoginTabPanel[1], LoginTab[2])
guiSetEnabled(LoginTab[1], false)
guiSetEnabled(LoginTab[2], true)
end
end)
-- EVENTS --
--guiSetVisible(Loginfenster[1], false)
addEvent("onBetakeyErfolgreich", true)
addEventHandler("onBetakeyErfolgreich", getRootElement(),
function()
guiSetVisible(Loginfenster[1], true)
end)
addEventHandler("onClientGUIClick", LoginKnopf[2],
function()
local name = getPlayerName(gMe)
local pw = guiGetText(LoginEdit[2])
local pw2 = guiGetText(LoginEdit[3])
if (pw == " ") or (pw == "") or (pw == "123456") then outputChatBox("Ungueltiges Passwort!", 255, 0, 0, false) return end
if (pw ~= pw2) then outputChatBox("Die Passworter Stimmen nicht ueberein!", 255, 0, 0, false) return end
if string.len(pw) <= 6 then outputChatBox("Die Minimale Passwortlaenge betraegt 6 Zeichen!", 200, 0, 0, false) return end
local land = guiGridListGetItemText (LoginGrid[1], guiGridListGetSelectedItem ( LoginGrid[1] ), 1 )
if(land == " ") or (land == "") then outputChatBox("Du musst ein Land auswaehlen!", 255, 0, 0, false) return end
local alter = guiGetText(LoginEdit[4])
local alternew = tonumber(alter)
if(alter == " ") or (alter == "") then outputChatBox("Ungueltiges Alter!", 255, 0, 0, false) return end
if(alternew < 0) or (alternew > 99) then outputChatBox("Ungueltiges Alter!", 255, 0, 0, false) return end
local radio1 = guiRadioButtonGetSelected(LoginRadio[1])
local radio2 = guiRadioButtonGetSelected(LoginRadio[2])
local geschlecht = "N/A"
if(radio1 == true) then geschlecht = "Maennlich" else geschlecht = "Weiblich" end
triggerServerEvent("onRegister",gMe,name,pw,land,geschlecht,alter)
infolabel_func("Du hast dich erfolgreich Registriert!", 0, 255, 0, 4000)
setDisabled()
end, false)
addEventHandler("onClientGUIClick", LoginKnopf[1],
function()
Alles anzeigen