SoMoRay Posted March 1, 2013 Share Posted March 1, 2013 ويش المشكلة انا سويت لوحة تسجيل دخول لاكن لمن اضغط على الزر مايسجل دخوول GUIEditor = { label = {}, button = {}, edit = {}, window = {}, } GUIEditor.window[1] = guiCreateWindow(351, 179, 661, 423, "Login Panel By AlooyFTW", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.edit[1] = guiCreateEdit(260, 65, 294, 51, "", false, GUIEditor.window[1]) GUIEditor.edit[2] = guiCreateEdit(260, 154, 294, 51, "", false, GUIEditor.window[1]) GUIEditor.button[1] = guiCreateButton(10, 291, 280, 76, "Login", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[1], "sa-gothic") guiSetProperty(GUIEditor.button[1], "NormalTextColour", "C8FFFFFF") GUIEditor.label[1] = guiCreateLabel(16, 65, 189, 53, "UserName", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[1], "sa-header") guiLabelSetColor(GUIEditor.label[1], 16, 0, 193) GUIEditor.label[2] = guiCreateLabel(19, 154, 176, 51, "Password", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[2], "sa-header") guiLabelSetColor(GUIEditor.label[2], 16, 0, 193) GUIEditor.button[5] = guiCreateButton(342, 292, 280, 76, "Register", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[5], "sa-gothic") guiSetProperty(GUIEditor.button[5], "NormalTextColour", "C8FFFFFF") fadeCamera(false) setTimer(function() guiLabelSetColor( GUIEditor.label[1],math.random(0, 255), math.random(0, 255), math.random(0, 255)) end,100,0,true) setTimer(function() guiLabelSetColor( GUIEditor.label[2],math.random(0, 255), math.random(0, 255), math.random(0, 255)) end,100,0,true) guiSetVisible (GUIEditor.window[1], true) addEventHandler ("onClientGUIClick", getRootElement(), function(button, state, absoluteX, absoluteY) if ( source == GUIEditor.button[1] ) then triggerServerEvent("login",getLocalPlayer()) end end ) addEventHandler ("onClientGUIClick", getRootElement(), function(button, state, absoluteX, absoluteY) if ( source == GUIEditor.button[5] ) then triggerServerEvent("register",getLocalPlayer()) end end ) سيرفر addEvent("login", true) addEventHandler("login",getRootElement(), function (player, user, pass) local account = getAccount ( user, pass ) if ( account ~= true ) then if (logIn ( player, account, pass ) == true) then outputChatBox ( "You Logged in Sucessfuly With User : #00FF00[ " .. user .. " ]!", player, 255, 255, 0 , true ) setElementModel ( player, 287 ) else outputChatBox ( "Login Error!", player, 255, 255, 0 ) end else outputChatBox ( "Wrong Username or Password!", player, 255, 255, 0 ) end end ) addEvent("register", true) addEventHandler("register",getRootElement(), function ( player, user, pass ) local account = getAccount ( user, pass ) if ( account ~= false ) then if (logIn ( player, account, pass ) == true) then outputChatBox ( "You Registerd and Logged in Sucessfuly!", player, 255, 255, 0 ) setElementModel ( player, 287 ) else outputChatBox ( "You Are Already Logged in !", player, 255, 255, 0 ) end else account = addAccount ( user, pass ) if (logIn ( player, account, pass ) == true) then outputChatBox ( "You Registerd and Logged in Sucessfuly - Please Remember Your User/Password!", player, 255, 255, 0 ) outputChatBox ( "Register Details : [ Username ] : #00FF00" .. user .. " #FFFF1A[ Password ] : #00FF00" .. pass .. "", player, 255, 255, 0 , true ) triggerClientEvent(player, "hideLoginWindow", getRootElement()) setElementModel ( player, 287 ) else outputChatBox ( "Register/Login error!", player, 255, 255, 0 ) end end end ) Link to comment
кιηg-αвα∂у Posted March 1, 2013 Share Posted March 1, 2013 GUIEditor = { label = {}, button = {}, edit = {}, window = {}, } GUIEditor.window[1] = guiCreateWindow(351, 179, 661, 423, "Login Panel By AlooyFTW", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.edit[1] = guiCreateEdit(260, 65, 294, 51, "", false, GUIEditor.window[1]) GUIEditor.edit[2] = guiCreateEdit(260, 154, 294, 51, "", false, GUIEditor.window[1]) GUIEditor.button[1] = guiCreateButton(10, 291, 280, 76, "Login", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[1], "sa-gothic") guiSetProperty(GUIEditor.button[1], "NormalTextColour", "C8FFFFFF") GUIEditor.label[1] = guiCreateLabel(16, 65, 189, 53, "UserName", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[1], "sa-header") guiLabelSetColor(GUIEditor.label[1], 16, 0, 193) GUIEditor.label[2] = guiCreateLabel(19, 154, 176, 51, "Password", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[2], "sa-header") guiLabelSetColor(GUIEditor.label[2], 16, 0, 193) GUIEditor.button[5] = guiCreateButton(342, 292, 280, 76, "Register", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[5], "sa-gothic") guiSetProperty(GUIEditor.button[5], "NormalTextColour", "C8FFFFFF") fadeCamera(false) showCursor ( true ) setTimer(function() guiLabelSetColor( GUIEditor.label[1],math.random(0, 255), math.random(0, 255), math.random(0, 255)) end,100,0,true) setTimer(function() guiLabelSetColor( GUIEditor.label[2],math.random(0, 255), math.random(0, 255), math.random(0, 255)) end,100,0,true) guiSetVisible (GUIEditor.window[1], true) addEventHandler ("onClientGUIClick", getRootElement(), function(button, state, absoluteX, absoluteY) if ( source == GUIEditor.button[1] ) then local user = guiGetText(GUIEditor.edit[1]) local pass = guiGetText(GUIEditor.edit[2]) triggerServerEvent("login",getLocalPlayer(), user, pass) end end ) addEventHandler ("onClientGUIClick", getRootElement(), function(button, state, absoluteX, absoluteY) if ( source == GUIEditor.button[5] ) then local user = guiGetText(GUIEditor.edit[1]) local pass = guiGetText(GUIEditor.edit[2]) triggerServerEvent("register",getLocalPlayer(), user, pass) end end) addEvent(hideLoginWindow, true) addEventHandler("hideLoginWindow", root, function() fadeCamera(true) guiSetVisible (GUIEditor.window[1], false) showCursor ( false ) end) سيرفر addEvent("login", true) addEventHandler("login",getRootElement(), function (player, user, pass) local account = getAccount ( user, pass ) if ( account ~= true ) then if (logIn ( player, account, pass ) == true) then outputChatBox ( "You Logged in Sucessfuly With User : #00FF00[ " .. user .. " ]!", player, 255, 255, 0 , true ) triggerClientEvent(player, "hideLoginWindow", getRootElement()) setElementModel ( player, 287 ) else outputChatBox ( "Login Error!", player, 255, 255, 0 ) end else outputChatBox ( "Wrong Username or Password!", player, 255, 255, 0 ) end end ) addEvent("register", true) addEventHandler("register",getRootElement(), function ( player, user, pass ) local account = getAccount ( user, pass ) if ( account ~= false ) then if (logIn ( player, account, pass ) == true) then outputChatBox ( "You Registerd and Logged in Sucessfuly!", player, 255, 255, 0 ) setElementModel ( player, 287 ) else outputChatBox ( "You Are Already Logged in !", player, 255, 255, 0 ) end else account = addAccount ( user, pass ) if (logIn ( player, account, pass ) == true) then outputChatBox ( "You Registerd and Logged in Sucessfuly - Please Remember Your User/Password!", player, 255, 255, 0 ) outputChatBox ( "Register Details : [ Username ] : #00FF00" .. user .. " #FFFF1A[ Password ] : #00FF00" .. pass .. "", player, 255, 255, 0 , true ) triggerClientEvent(player, "hideLoginWindow", getRootElement()) setElementModel ( player, 287 ) else outputChatBox ( "Register/Login error!", player, 255, 255, 0 ) end end end ) Link to comment
SoMoRay Posted March 1, 2013 Author Share Posted March 1, 2013 GUIEditor = { label = {}, button = {}, edit = {}, window = {}, } GUIEditor.window[1] = guiCreateWindow(351, 179, 661, 423, "Login Panel By AlooyFTW", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.edit[1] = guiCreateEdit(260, 65, 294, 51, "", false, GUIEditor.window[1]) GUIEditor.edit[2] = guiCreateEdit(260, 154, 294, 51, "", false, GUIEditor.window[1]) GUIEditor.button[1] = guiCreateButton(10, 291, 280, 76, "Login", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[1], "sa-gothic") guiSetProperty(GUIEditor.button[1], "NormalTextColour", "C8FFFFFF") GUIEditor.label[1] = guiCreateLabel(16, 65, 189, 53, "UserName", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[1], "sa-header") guiLabelSetColor(GUIEditor.label[1], 16, 0, 193) GUIEditor.label[2] = guiCreateLabel(19, 154, 176, 51, "Password", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[2], "sa-header") guiLabelSetColor(GUIEditor.label[2], 16, 0, 193) GUIEditor.button[5] = guiCreateButton(342, 292, 280, 76, "Register", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[5], "sa-gothic") guiSetProperty(GUIEditor.button[5], "NormalTextColour", "C8FFFFFF") fadeCamera(false) showCursor ( true ) setTimer(function() guiLabelSetColor( GUIEditor.label[1],math.random(0, 255), math.random(0, 255), math.random(0, 255)) end,100,0,true) setTimer(function() guiLabelSetColor( GUIEditor.label[2],math.random(0, 255), math.random(0, 255), math.random(0, 255)) end,100,0,true) guiSetVisible (GUIEditor.window[1], true) addEventHandler ("onClientGUIClick", getRootElement(), function(button, state, absoluteX, absoluteY) if ( source == GUIEditor.button[1] ) then local user = guiGetText(GUIEditor.edit[1]) local pass = guiGetText(GUIEditor.edit[2]) triggerServerEvent("login",getLocalPlayer(), user, pass) end end ) addEventHandler ("onClientGUIClick", getRootElement(), function(button, state, absoluteX, absoluteY) if ( source == GUIEditor.button[5] ) then local user = guiGetText(GUIEditor.edit[1]) local pass = guiGetText(GUIEditor.edit[2]) triggerServerEvent("register",getLocalPlayer(), user, pass) end end) addEvent(hideLoginWindow, true) addEventHandler("hideLoginWindow", root, function() fadeCamera(true) guiSetVisible (GUIEditor.window[1], false) showCursor ( false ) end) سيرفر addEvent("login", true) addEventHandler("login",getRootElement(), function (player, user, pass) local account = getAccount ( user, pass ) if ( account ~= true ) then if (logIn ( player, account, pass ) == true) then outputChatBox ( "You Logged in Sucessfuly With User : #00FF00[ " .. user .. " ]!", player, 255, 255, 0 , true ) triggerClientEvent(player, "hideLoginWindow", getRootElement()) setElementModel ( player, 287 ) else outputChatBox ( "Login Error!", player, 255, 255, 0 ) end else outputChatBox ( "Wrong Username or Password!", player, 255, 255, 0 ) end end ) addEvent("register", true) addEventHandler("register",getRootElement(), function ( player, user, pass ) local account = getAccount ( user, pass ) if ( account ~= false ) then if (logIn ( player, account, pass ) == true) then outputChatBox ( "You Registerd and Logged in Sucessfuly!", player, 255, 255, 0 ) setElementModel ( player, 287 ) else outputChatBox ( "You Are Already Logged in !", player, 255, 255, 0 ) end else account = addAccount ( user, pass ) if (logIn ( player, account, pass ) == true) then outputChatBox ( "You Registerd and Logged in Sucessfuly - Please Remember Your User/Password!", player, 255, 255, 0 ) outputChatBox ( "Register Details : [ Username ] : #00FF00" .. user .. " #FFFF1A[ Password ] : #00FF00" .. pass .. "", player, 255, 255, 0 , true ) triggerClientEvent(player, "hideLoginWindow", getRootElement()) setElementModel ( player, 287 ) else outputChatBox ( "Register/Login error!", player, 255, 255, 0 ) end end end ) نفس المشكلة الحين ما قام يطلع لي ال outputChatBox لين بسجل دخول ولا يسجل اذا ضغط على الزر Link to comment
PaiN^ Posted March 1, 2013 Share Posted March 1, 2013 Server addEvent("login", true) addEventHandler("login", root, function (user, pass) local account = getAccount (user) if account then logIn ( source, user, pass ) outputChatBox ( "You Logged in Sucessfuly With User : #00FF00[ " .. user .. " ]!", source, 255, 255, 0 , true ) setElementModel ( player, 287 ) else outputChatBox ( "Login Error!", player, 255, 255, 0 ) end end ) addEvent("register", true) addEventHandler("register", root, function (user, pass) if string.len(user) > 0 and string.len(pass) > 0 then local account = getAccount(user) if account then outputChatBox ( "Register/Login error!", source, 255, 255, 0 ) else addAccount(user, pass) local check = getPlayerAccount(source) if check then outputChatBox ( "You Registerd and Logged in Sucessfuly - Please Remember Your User/Password!", source, 255, 255, 0 ) outputChatBox ( "Register Details : [ Username ] : #00FF00" .. user .. " #FFFF1A[ Password ] : #00FF00" .. pass .. "", source, 255, 255, 0 , true ) else logIn(source, user, pass) outputChatBox ( "You Registerd and Logged in Sucessfuly!", source, 255, 255, 0 ) end end else outputChatBox ( "Register/Login error!", source, 255, 255, 0 ) end end ) Client GUIEditor = { label = {}, button = {}, edit = {}, window = {}, } GUIEditor.window[1] = guiCreateWindow(351, 179, 661, 423, "Login Panel By AlooyFTW", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.edit[1] = guiCreateEdit(260, 65, 294, 51, "", false, GUIEditor.window[1]) GUIEditor.edit[2] = guiCreateEdit(260, 154, 294, 51, "", false, GUIEditor.window[1]) GUIEditor.button[1] = guiCreateButton(10, 291, 280, 76, "Login", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[1], "sa-gothic") guiSetProperty(GUIEditor.button[1], "NormalTextColour", "C8FFFFFF") GUIEditor.label[1] = guiCreateLabel(16, 65, 189, 53, "UserName", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[1], "sa-header") guiLabelSetColor(GUIEditor.label[1], 16, 0, 193) GUIEditor.label[2] = guiCreateLabel(19, 154, 176, 51, "Password", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[2], "sa-header") guiLabelSetColor(GUIEditor.label[2], 16, 0, 193) GUIEditor.button[5] = guiCreateButton(342, 292, 280, 76, "Register", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[5], "sa-gothic") guiSetProperty(GUIEditor.button[5], "NormalTextColour", "C8FFFFFF") setTimer(function() guiLabelSetColor( GUIEditor.label[1],math.random(0, 255), math.random(0, 255), math.random(0, 255)) end,100,0,true) setTimer(function() guiLabelSetColor( GUIEditor.label[2],math.random(0, 255), math.random(0, 255), math.random(0, 255)) end,100,0,true) guiSetVisible (GUIEditor.window[1], true) addEventHandler("onClientGUIClick", root, function (user, pass) if (source == GUIEditor.button[1]) then local user = guiGetText(GUIEditor.edit[1]) local pass = guiGetText(GUIEditor.edit[2]) triggerServerEvent("login",getLocalPlayer(), user, pass) elseif(source == GUIEditor.button[5]) then local user = guiGetText(GUIEditor.edit[1]) local pass = guiGetText(GUIEditor.edit[2]) triggerServerEvent("register",getLocalPlayer(), user, pass) end end ) Link to comment
SoMoRay Posted March 1, 2013 Author Share Posted March 1, 2013 Server addEvent("login", true) addEventHandler("login", root, function (user, pass) local account = getAccount (user) if account then logIn ( source, user, pass ) outputChatBox ( "You Logged in Sucessfuly With User : #00FF00[ " .. user .. " ]!", source, 255, 255, 0 , true ) setElementModel ( player, 287 ) else outputChatBox ( "Login Error!", player, 255, 255, 0 ) end end ) addEvent("register", true) addEventHandler("register", root, function (user, pass) if string.len(user) > 0 and string.len(pass) > 0 then local account = getAccount(user) if account then outputChatBox ( "Register/Login error!", source, 255, 255, 0 ) else addAccount(user, pass) local check = getPlayerAccount(source) if check then outputChatBox ( "You Registerd and Logged in Sucessfuly - Please Remember Your User/Password!", source, 255, 255, 0 ) outputChatBox ( "Register Details : [ Username ] : #00FF00" .. user .. " #FFFF1A[ Password ] : #00FF00" .. pass .. "", source, 255, 255, 0 , true ) else logIn(source, user, pass) outputChatBox ( "You Registerd and Logged in Sucessfuly!", source, 255, 255, 0 ) end end else outputChatBox ( "Register/Login error!", source, 255, 255, 0 ) end end ) Client GUIEditor = { label = {}, button = {}, edit = {}, window = {}, } GUIEditor.window[1] = guiCreateWindow(351, 179, 661, 423, "Login Panel By AlooyFTW", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.edit[1] = guiCreateEdit(260, 65, 294, 51, "", false, GUIEditor.window[1]) GUIEditor.edit[2] = guiCreateEdit(260, 154, 294, 51, "", false, GUIEditor.window[1]) GUIEditor.button[1] = guiCreateButton(10, 291, 280, 76, "Login", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[1], "sa-gothic") guiSetProperty(GUIEditor.button[1], "NormalTextColour", "C8FFFFFF") GUIEditor.label[1] = guiCreateLabel(16, 65, 189, 53, "UserName", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[1], "sa-header") guiLabelSetColor(GUIEditor.label[1], 16, 0, 193) GUIEditor.label[2] = guiCreateLabel(19, 154, 176, 51, "Password", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[2], "sa-header") guiLabelSetColor(GUIEditor.label[2], 16, 0, 193) GUIEditor.button[5] = guiCreateButton(342, 292, 280, 76, "Register", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[5], "sa-gothic") guiSetProperty(GUIEditor.button[5], "NormalTextColour", "C8FFFFFF") setTimer(function() guiLabelSetColor( GUIEditor.label[1],math.random(0, 255), math.random(0, 255), math.random(0, 255)) end,100,0,true) setTimer(function() guiLabelSetColor( GUIEditor.label[2],math.random(0, 255), math.random(0, 255), math.random(0, 255)) end,100,0,true) guiSetVisible (GUIEditor.window[1], true) addEventHandler("onClientGUIClick", root, function (user, pass) if (source == GUIEditor.button[1]) then local user = guiGetText(GUIEditor.edit[1]) local pass = guiGetText(GUIEditor.edit[2]) triggerServerEvent("login",getLocalPlayer(), user, pass) elseif(source == GUIEditor.button[5]) then local user = guiGetText(GUIEditor.edit[1]) local pass = guiGetText(GUIEditor.edit[2]) triggerServerEvent("register",getLocalPlayer(), user, pass) end end ) في مشكلةة مايسجل دخول ----------------- Link to comment
PaiN^ Posted March 1, 2013 Share Posted March 1, 2013 ؟ debugscript 3 أخطاء في + ضفته لقروب آدمن ؟ Link to comment
SoMoRay Posted March 1, 2013 Author Share Posted March 1, 2013 ؟ debugscript 3 أخطاء في + ضفته لقروب آدمن ؟ ما في اهطاء ضفته لقروب ادمن Link to comment
#Al-Ha[J]aRii Posted March 1, 2013 Share Posted March 1, 2013 ؟ debugscript 3 أخطاء في + ضفته لقروب آدمن ؟ ما في اهطاء ضفته لقروب ادمن استبدل السيرفر الي عندك بـــهذه addEvent("login", true) addEventHandler("login", root, function (user, pass) local account = getAccount (user) if account then logIn ( source, account, pass ) outputChatBox ( "You Logged in Sucessfuly With User : #00FF00[ " .. user .. " ]!", source, 255, 255, 0 , true ) setElementModel ( player, 287 ) else outputChatBox ( "Login Error!", player, 255, 255, 0 ) end end ) addEvent("register", true) addEventHandler("register", root, function (user, pass) if string.len(user) > 0 and string.len(pass) > 0 then local account = getAccount(user) if account then outputChatBox ( "Register/Login error!", source, 255, 255, 0 ) else addAccount(user, pass) local check = getPlayerAccount(source) if check then outputChatBox ( "You Registerd and Logged in Sucessfuly - Please Remember Your User/Password!", source, 255, 255, 0 ) outputChatBox ( "Register Details : [ Username ] : #00FF00" .. user .. " #FFFF1A[ Password ] : #00FF00" .. pass .. "", source, 255, 255, 0 , true ) else logIn(source, user, pass) outputChatBox ( "You Registerd and Logged in Sucessfuly!", source, 255, 255, 0 ) end end else outputChatBox ( "Register/Login error!", source, 255, 255, 0 ) end end ) Link to comment
SoMoRay Posted March 1, 2013 Author Share Posted March 1, 2013 ؟ debugscript 3 أخطاء في + ضفته لقروب آدمن ؟ ما في اهطاء ضفته لقروب ادمن استبدل السيرفر الي عندك بـــهذه addEvent("login", true) addEventHandler("login", root, function (user, pass) local account = getAccount (user) if account then logIn ( source, account, pass ) outputChatBox ( "You Logged in Sucessfuly With User : #00FF00[ " .. user .. " ]!", source, 255, 255, 0 , true ) setElementModel ( player, 287 ) else outputChatBox ( "Login Error!", player, 255, 255, 0 ) end end ) addEvent("register", true) addEventHandler("register", root, function (user, pass) if string.len(user) > 0 and string.len(pass) > 0 then local account = getAccount(user) if account then outputChatBox ( "Register/Login error!", source, 255, 255, 0 ) else addAccount(user, pass) local check = getPlayerAccount(source) if check then outputChatBox ( "You Registerd and Logged in Sucessfuly - Please Remember Your User/Password!", source, 255, 255, 0 ) outputChatBox ( "Register Details : [ Username ] : #00FF00" .. user .. " #FFFF1A[ Password ] : #00FF00" .. pass .. "", source, 255, 255, 0 , true ) else logIn(source, user, pass) outputChatBox ( "You Registerd and Logged in Sucessfuly!", source, 255, 255, 0 ) end end else outputChatBox ( "Register/Login error!", source, 255, 255, 0 ) end end ) تسلمممممممم Link to comment
PaiN^ Posted March 1, 2013 Share Posted March 1, 2013 ؟ debugscript 3 أخطاء في + ضفته لقروب آدمن ؟ ما في اهطاء ضفته لقروب ادمن استبدل السيرفر الي عندك بـــهذه addEvent("login", true) addEventHandler("login", root, function (user, pass) local account = getAccount (user) if account then logIn ( source, account, pass ) outputChatBox ( "You Logged in Sucessfuly With User : #00FF00[ " .. user .. " ]!", source, 255, 255, 0 , true ) setElementModel ( player, 287 ) else outputChatBox ( "Login Error!", player, 255, 255, 0 ) end end ) addEvent("register", true) addEventHandler("register", root, function (user, pass) if string.len(user) > 0 and string.len(pass) > 0 then local account = getAccount(user) if account then outputChatBox ( "Register/Login error!", source, 255, 255, 0 ) else addAccount(user, pass) local check = getPlayerAccount(source) if check then outputChatBox ( "You Registerd and Logged in Sucessfuly - Please Remember Your User/Password!", source, 255, 255, 0 ) outputChatBox ( "Register Details : [ Username ] : #00FF00" .. user .. " #FFFF1A[ Password ] : #00FF00" .. pass .. "", source, 255, 255, 0 , true ) else logIn(source, user, pass) outputChatBox ( "You Registerd and Logged in Sucessfuly!", source, 255, 255, 0 ) end end else outputChatBox ( "Register/Login error!", source, 255, 255, 0 ) end end ) وش إللي ضفته على كودي ؟ Link to comment
===|OSAMA|=== Posted March 1, 2013 Share Posted March 1, 2013 ^ الكل عندكم أخطاء ×_× -- Client Side ! GUIEditor = { label = {}, button = {}, edit = {}, window = {}, } GUIEditor.window[1] = guiCreateWindow(351, 179, 661, 423, "Login Panel By AlooyFTW", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.edit[1] = guiCreateEdit(260, 65, 294, 51, "", false, GUIEditor.window[1]) GUIEditor.edit[2] = guiCreateEdit(260, 154, 294, 51, "", false, GUIEditor.window[1]) GUIEditor.button[1] = guiCreateButton(10, 291, 280, 76, "Login", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[1], "sa-gothic") guiSetProperty(GUIEditor.button[1], "NormalTextColour", "C8FFFFFF") GUIEditor.label[1] = guiCreateLabel(16, 65, 189, 53, "UserName", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[1], "sa-header") guiLabelSetColor(GUIEditor.label[1], 16, 0, 193) GUIEditor.label[2] = guiCreateLabel(19, 154, 176, 51, "Password", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[2], "sa-header") guiLabelSetColor(GUIEditor.label[2], 16, 0, 193) GUIEditor.button[5] = guiCreateButton(342, 292, 280, 76, "Register", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[5], "sa-gothic") guiSetProperty(GUIEditor.button[5], "NormalTextColour", "C8FFFFFF") fadeCamera(false) setTimer ( function ( ) guiLabelSetColor( GUIEditor.label[1],math.random(0, 255), math.random(0, 255), math.random(0, 255)) end,100,0,true) setTimer ( function ( ) guiLabelSetColor( GUIEditor.label[2],math.random(0, 255), math.random(0, 255), math.random(0, 255)) end,100,0,true) guiSetVisible (GUIEditor.window[1], true) showCursor ( true ) addEventHandler ("onClientGUIClick", root, function ( ) if ( source == GUIEditor.button[1] ) then triggerServerEvent("login", localPlayer, localPlayer, guiGetText ( GUIEditor.edit[1] ), guiGetText ( GUIEditor.edit[2] ) ) elseif ( source == GUIEditor.button[5] ) then triggerServerEvent("register", localPlayer, localPlayer, guiGetText ( GUIEditor.edit[1] ), guiGetText ( GUIEditor.edit[2] ) ) end end ) addEvent ( "hideWindow", true ) addEventHandler ( "hideWindow", root, function ( ) guiSetVisible ( GUIEditor.window[1], false ) fadeCamera ( true ) showCursor ( false ) end ) -- Server Side ! addEvent ( "login", true ) addEventHandler ( "login", root, function (player, user, pass) local account = getAccount ( user, pass ) if ( account ~= true ) then if (logIn ( player, account, pass ) == true) then outputChatBox ( "You Logged in Sucessfuly With User : #00FF00[ " .. user .. " ]!", player, 255, 255, 0 , true ) setElementModel ( player, 287 ) triggerClientEvent ( player, "hideWindow", player ) else outputChatBox ( "Login Error!", player, 255, 255, 0 ) end else outputChatBox ( "Wrong Username or Password!", player, 255, 255, 0 ) end end ) addEvent ( "register", true ) addEventHandler ( "register", root, function ( player, user, pass ) local account = getAccount ( user, pass ) if ( account ~= false ) then if (logIn ( player, account, pass ) == true) then outputChatBox ( "You Registerd and Logged in Sucessfuly!", player, 255, 255, 0 ) setElementModel ( player, 287 ) triggerClientEvent ( player, "hideWindow", player ) else outputChatBox ( "You Are Already Logged in !", player, 255, 255, 0 ) end else account = addAccount ( user, pass ) if (logIn ( player, account, pass ) == true) then outputChatBox ( "You Registerd and Logged in Sucessfuly - Please Remember Your User/Password!", player, 255, 255, 0 ) outputChatBox ( "Register Details : [ Username ] : #00FF00" .. user .. " #FFFF1A[ Password ] : #00FF00" .. pass .. "", player, 255, 255, 0 , true ) setElementModel ( player, 287 ) triggerClientEvent ( player, "hideWindow", player ) else outputChatBox ( "Register/Login error!", player, 255, 255, 0 ) end end end ) Link to comment
#Al-Ha[J]aRii Posted March 1, 2013 Share Posted March 1, 2013 ؟ debugscript 3 أخطاء في استبدل السيرفر الي عندك بـــهذه addEvent("login", true) addEventHandler("login", root, function (user, pass) local account = getAccount (user) if account then logIn ( source, account, pass ) outputChatBox ( "You Logged in Sucessfuly With User : #00FF00[ " .. user .. " ]!", source, 255, 255, 0 , true ) setElementModel ( player, 287 ) else outputChatBox ( "Login Error!", player, 255, 255, 0 ) end end ) addEvent("register", true) addEventHandler("register", root, function (user, pass) if string.len(user) > 0 and string.len(pass) > 0 then local account = getAccount(user) if account then outputChatBox ( "Register/Login error!", source, 255, 255, 0 ) else addAccount(user, pass) local check = getPlayerAccount(source) if check then outputChatBox ( "You Registerd and Logged in Sucessfuly - Please Remember Your User/Password!", source, 255, 255, 0 ) outputChatBox ( "Register Details : [ Username ] : #00FF00" .. user .. " #FFFF1A[ Password ] : #00FF00" .. pass .. "", source, 255, 255, 0 , true ) else logIn(source, user, pass) outputChatBox ( "You Registerd and Logged in Sucessfuly!", source, 255, 255, 0 ) end end else outputChatBox ( "Register/Login error!", source, 255, 255, 0 ) end end ) وش إللي ضفته على كودي ؟ logIn ( source, user, pass ) عدلتهاا كان فيها خطاء تصير كذآ logIn ( source, account, pass ) Link to comment
SoMoRay Posted March 1, 2013 Author Share Posted March 1, 2013 ^ الكل عندكم أخطاء ×_×-- Client Side ! GUIEditor = { label = {}, button = {}, edit = {}, window = {}, } GUIEditor.window[1] = guiCreateWindow(351, 179, 661, 423, "Login Panel By AlooyFTW", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.edit[1] = guiCreateEdit(260, 65, 294, 51, "", false, GUIEditor.window[1]) GUIEditor.edit[2] = guiCreateEdit(260, 154, 294, 51, "", false, GUIEditor.window[1]) GUIEditor.button[1] = guiCreateButton(10, 291, 280, 76, "Login", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[1], "sa-gothic") guiSetProperty(GUIEditor.button[1], "NormalTextColour", "C8FFFFFF") GUIEditor.label[1] = guiCreateLabel(16, 65, 189, 53, "UserName", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[1], "sa-header") guiLabelSetColor(GUIEditor.label[1], 16, 0, 193) GUIEditor.label[2] = guiCreateLabel(19, 154, 176, 51, "Password", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[2], "sa-header") guiLabelSetColor(GUIEditor.label[2], 16, 0, 193) GUIEditor.button[5] = guiCreateButton(342, 292, 280, 76, "Register", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[5], "sa-gothic") guiSetProperty(GUIEditor.button[5], "NormalTextColour", "C8FFFFFF") fadeCamera(false) setTimer ( function ( ) guiLabelSetColor( GUIEditor.label[1],math.random(0, 255), math.random(0, 255), math.random(0, 255)) end,100,0,true) setTimer ( function ( ) guiLabelSetColor( GUIEditor.label[2],math.random(0, 255), math.random(0, 255), math.random(0, 255)) end,100,0,true) guiSetVisible (GUIEditor.window[1], true) showCursor ( true ) addEventHandler ("onClientGUIClick", root, function ( ) if ( source == GUIEditor.button[1] ) then triggerServerEvent("login", localPlayer, localPlayer, guiGetText ( GUIEditor.edit[1] ), guiGetText ( GUIEditor.edit[2] ) ) elseif ( source == GUIEditor.button[5] ) then triggerServerEvent("register", localPlayer, localPlayer, guiGetText ( GUIEditor.edit[1] ), guiGetText ( GUIEditor.edit[2] ) ) end end ) addEvent ( "hideWindow", true ) addEventHandler ( "hideWindow", root, function ( ) guiSetVisible ( GUIEditor.window[1], false ) fadeCamera ( true ) showCursor ( false ) end ) -- Server Side ! addEvent ( "login", true ) addEventHandler ( "login", root, function (player, user, pass) local account = getAccount ( user, pass ) if ( account ~= true ) then if (logIn ( player, account, pass ) == true) then outputChatBox ( "You Logged in Sucessfuly With User : #00FF00[ " .. user .. " ]!", player, 255, 255, 0 , true ) setElementModel ( player, 287 ) triggerClientEvent ( player, "hideWindow", player ) else outputChatBox ( "Login Error!", player, 255, 255, 0 ) end else outputChatBox ( "Wrong Username or Password!", player, 255, 255, 0 ) end end ) addEvent ( "register", true ) addEventHandler ( "register", root, function ( player, user, pass ) local account = getAccount ( user, pass ) if ( account ~= false ) then if (logIn ( player, account, pass ) == true) then outputChatBox ( "You Registerd and Logged in Sucessfuly!", player, 255, 255, 0 ) setElementModel ( player, 287 ) triggerClientEvent ( player, "hideWindow", player ) else outputChatBox ( "You Are Already Logged in !", player, 255, 255, 0 ) end else account = addAccount ( user, pass ) if (logIn ( player, account, pass ) == true) then outputChatBox ( "You Registerd and Logged in Sucessfuly - Please Remember Your User/Password!", player, 255, 255, 0 ) outputChatBox ( "Register Details : [ Username ] : #00FF00" .. user .. " #FFFF1A[ Password ] : #00FF00" .. pass .. "", player, 255, 255, 0 , true ) setElementModel ( player, 287 ) triggerClientEvent ( player, "hideWindow", player ) else outputChatBox ( "Register/Login error!", player, 255, 255, 0 ) end end end ) تسلم اسامة Link to comment
===|OSAMA|=== Posted March 1, 2013 Share Posted March 1, 2013 تسلم اسامة يسسلمككـ ربي , # Link to comment
SoMoRay Posted March 2, 2013 Author Share Posted March 2, 2013 يسسلمككـ ربي , # ابي اول ما الاعب يخش السيرفر الشاشة تكون سوداء هي الحين تصير سوداء بس لين سويت رستارتت للمود و الاعبين موجودين في سيرفر تستوي لهم سوداء اتمنى فهمتني $ Link to comment
SoMoRay Posted March 2, 2013 Author Share Posted March 2, 2013 fadeCamera يب ادري بس شلون اخليها جربة حدث onClientPlayerJoin Link to comment
SoMoRay Posted March 3, 2013 Author Share Posted March 3, 2013 (edited) onClientResourceStart addEventHandler( "onClientResourceStart",root ) fadeCamera ( false ) ? Edited March 3, 2013 by Guest Link to comment
iPrestege Posted March 3, 2013 Share Posted March 3, 2013 addEventHandler( "onClientResourceStart",root, function() fadeCamera(false) end) Link to comment
SoMoRay Posted March 3, 2013 Author Share Posted March 3, 2013 addEventHandler( "onClientResourceStart",root, function() fadeCamera(false) end) thanx ! Link to comment
SoMoRay Posted March 3, 2013 Author Share Posted March 3, 2013 You're Welcome . في مشكلة يالحين ماتصير الشاشة سوداء عند الدخول الى السيرفر Client Side ! addEventHandler( "onClientResourceStart",root, function() fadeCamera(false) end) GUIEditor = { label = {}, button = {}, edit = {}, window = {}, } GUIEditor.window[1] = guiCreateWindow(351, 179, 661, 423, "Login Panel By AlooyFTW", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.edit[1] = guiCreateEdit(260, 65, 294, 51, "", false, GUIEditor.window[1]) GUIEditor.edit[2] = guiCreateEdit(260, 154, 294, 51, "", false, GUIEditor.window[1]) GUIEditor.button[1] = guiCreateButton(10, 291, 280, 76, "Login", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[1], "sa-gothic") guiSetProperty(GUIEditor.button[1], "NormalTextColour", "C8FFFFFF") GUIEditor.label[1] = guiCreateLabel(16, 65, 189, 53, "UserName", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[1], "sa-header") guiLabelSetColor(GUIEditor.label[1], 16, 0, 193) GUIEditor.label[2] = guiCreateLabel(19, 154, 176, 51, "Password", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[2], "sa-header") guiLabelSetColor(GUIEditor.label[2], 16, 0, 193) GUIEditor.button[5] = guiCreateButton(342, 292, 280, 76, "Register", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[5], "sa-gothic") guiSetProperty(GUIEditor.button[5], "NormalTextColour", "C8FFFFFF") fadeCamera(false) guiSetVisible (GUIEditor.window[1], true) showCursor ( true ) addEventHandler ("onClientGUIClick", root, function ( ) if ( source == GUIEditor.button[1] ) then triggerServerEvent("login", localPlayer, localPlayer, guiGetText ( GUIEditor.edit[1] ), guiGetText ( GUIEditor.edit[2] ) ) elseif ( source == GUIEditor.button[5] ) then triggerServerEvent("register", localPlayer, localPlayer, guiGetText ( GUIEditor.edit[1] ), guiGetText ( GUIEditor.edit[2] ) ) end end ) addEvent ( "hideWindow", true ) addEventHandler ( "hideWindow", root, function ( ) guiSetVisible ( GUIEditor.window[1], false ) fadeCamera ( true ) showCursor ( false ) end ) Link to comment
iPrestege Posted March 3, 2013 Share Posted March 3, 2013 GUIEditor = { label = {}, button = {}, edit = {}, window = {}, } GUIEditor.window[1] = guiCreateWindow(351, 179, 661, 423, "Login Panel By AlooyFTW", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.edit[1] = guiCreateEdit(260, 65, 294, 51, "", false, GUIEditor.window[1]) GUIEditor.edit[2] = guiCreateEdit(260, 154, 294, 51, "", false, GUIEditor.window[1]) GUIEditor.button[1] = guiCreateButton(10, 291, 280, 76, "Login", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[1], "sa-gothic") guiSetProperty(GUIEditor.button[1], "NormalTextColour", "C8FFFFFF") GUIEditor.label[1] = guiCreateLabel(16, 65, 189, 53, "UserName", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[1], "sa-header") guiLabelSetColor(GUIEditor.label[1], 16, 0, 193) GUIEditor.label[2] = guiCreateLabel(19, 154, 176, 51, "Password", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[2], "sa-header") guiLabelSetColor(GUIEditor.label[2], 16, 0, 193) GUIEditor.button[5] = guiCreateButton(342, 292, 280, 76, "Register", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[5], "sa-gothic") guiSetProperty(GUIEditor.button[5], "NormalTextColour", "C8FFFFFF") guiSetVisible (GUIEditor.window[1], true) showCursor ( true ) addEventHandler ("onClientGUIClick", root, function ( ) if ( source == GUIEditor.button[1] ) then triggerServerEvent("login", localPlayer, localPlayer, guiGetText ( GUIEditor.edit[1] ), guiGetText ( GUIEditor.edit[2] ) ) elseif ( source == GUIEditor.button[5] ) then triggerServerEvent("register", localPlayer, localPlayer, guiGetText ( GUIEditor.edit[1] ), guiGetText ( GUIEditor.edit[2] ) ) end end ) addEvent ( "hideWindow", true ) addEventHandler ( "hideWindow", root, function ( ) guiSetVisible ( GUIEditor.window[1], false ) fadeCamera ( true ) showCursor ( false ) end ) addEventHandler( "onClientResourceStart",root, function() fadeCamera(false) end) Link to comment
TAPL Posted March 3, 2013 Share Posted March 3, 2013 addEventHandler( "onClientResourceStart", resourceRoot, function() fadeCamera(false) end) Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now