Hi Guys,
I need Some Help in This register script i made register panel [ clientside and serverside ] and i Added The Resource To admin ACLgroup but when I Tested not Working
Code :
Server Side : -
function registerPlayer(username,password,passwordConfirm)
if not (username == "") then
if not (password == "") then
if not (passwordConfirm == "") then
if password == passwordConfirm then
local account = getAccount (username,password)
if (account == false) then
local accountAdded = addAccount(tostring(username),tostring(password))
if (accountAdded) then
outputChatBox ("#FF0000* #00FF00You have sucessfuly registered! [username: #FFFFFF" .. username .. " #00FF00| Password: #FFFFFF" .. password .. "#00FF00 ]",source,255,255,255,true )
else
outputChatBox ("[msg ]",source,255,255,255,true )
end
end
end
end
end
end
end
addEvent("onRequestRegister",true)
addEventHandler("onRequestRegister",getRootElement(),registerPlayer)
Client Side :-
function onClickBtnRegister(button,state) -- Register and Cofirm
if(button == "left" and state == "up") then
username = guiGetText(editrename)
password = guiGetText(edtrepass)
passwordConfirm = guiGetText(edtreconfirm)
triggerServerEvent("onRequestRegister",getLocalPlayer(), username, password, passwordConfirm)
end
end
Thanks ,