Jump to content

تعديل ..


Recommended Posts

السلام عليكم عملت لوحه تسجيل

الخطاء فيها

اللما اجي اشغل المود يجي علي طول

ولما ركبت الكود بتاع الميجيش اللوحه في وجهي

اللوحه ما تفتح خالص

وخطاء تاني

لازم اضعط ف1 عشان اعمل login وكدا

و الخطاء التالت

حاطط كل الاكواد لما اجي اعمل Login ما يعمل

او greate Account ما يعمل

--

client.

local sx, sy = guiGetScreenSize() 
function centerTheGUI( guiElement ) 
    local width, height = guiGetSize( guiElement, false ) 
    local x, y = sx / 2 - width / 2, sy / 2 - height / 2 
    guiSetPosition( guiElement, x, y, false ) 
end 
  
GUIEditor = { 
    memo = {}, 
    button = {}, 
    window = {}, 
    tab = {}, 
    checkbox = {}, 
    label = {}, 
    tabpanel = {}, 
} 
GUIEditor.window[1] = guiCreateWindow(114, 60, 500, 468, "CPT Zombie / The Walking Dead v2", false) 
guiWindowSetSizable(GUIEditor.window[1], false) 
guiSetAlpha(GUIEditor.window[1], 0.96) 
  
GUIEditor.label[2] = guiCreateLabel(19, 41, 112, 44, "Username:", false, GUIEditor.window[1]) 
GUIEditor.memo[4] = guiCreateMemo(84, 35, 170, 33, "", false, GUIEditor.window[1]) 
GUIEditor.memo[6] = guiCreateMemo(84, 35, 170, 33, "", false, GUIEditor.window[1]) 
GUIEditor.memo[7] = guiCreateMemo(84, 35, 170, 33, "", false, GUIEditor.window[1]) 
GUIEditor.memo[8] = guiCreateMemo(84, 35, 170, 33, "", false, GUIEditor.window[1]) 
GUIEditor.memo[9] = guiCreateMemo(84, 35, 170, 32, "", false, GUIEditor.window[1]) 
GUIEditor.memo[10] = guiCreateMemo(83, 75, 172, 33, "", false, GUIEditor.window[1]) 
GUIEditor.label[4] = guiCreateLabel(19, 85, 64, 16, "Password:", false, GUIEditor.window[1]) 
GUIEditor.button[3] = guiCreateButton(53, 122, 114, 36, "Login", false, GUIEditor.window[1]) 
GUIEditor.button[4] = guiCreateButton(195, 122, 114, 36, "Creat an Account", false, GUIEditor.window[1]) 
GUIEditor.button[10] = guiCreateButton(336, 122, 114, 36, "Forgot Password?", false, GUIEditor.window[1]) 
GUIEditor.checkbox[5] = guiCreateCheckBox(272, 45, 165, 17, "Remember Username", true, false, GUIEditor.window[1]) 
GUIEditor.checkbox[7] = guiCreateCheckBox(272, 81, 165, 17, "Remember Password", true, false, GUIEditor.window[1]) 
GUIEditor.label[5] = guiCreateLabel(145, 180, 308, 19, "Welcome to CPT! Play fair, have fun.", false, GUIEditor.window[1]) 
guiLabelSetColor(GUIEditor.label[5], 9, 104, 169) 
GUIEditor.tabpanel[4] = guiCreateTabPanel(9, 211, 482, 248, false, GUIEditor.window[1]) 
  
GUIEditor.tab[6] = guiCreateTab("Updates", GUIEditor.tabpanel[4]) 
  
GUIEditor.memo[19] = guiCreateMemo(1, 2, 479, 220, "The opening of the server on Friday Programming (Hardgamer+Fawad)\nMaud was making weapons relased  3/3/2016 v2 \nTo buy zones talk Hardgamer in skype  CPT Zombie  Go to skype and payment method onecard .\nit has been making the beginnign 2/3/2016 v2 .  \nmaking auto shop v2 by (Fawad) . \nmod was making click x by Hardgamer.  \n", false, GUIEditor.tab[6]) 
  
GUIEditor.tab[7] = guiCreateTab("Todays Stats", GUIEditor.tabpanel[4]) 
  
GUIEditor.memo[23] = guiCreateMemo(1, 2, 479, 220, "1 - Not to sabotage the player\n2 - Do not try hack thie server is protected \n3 - Do not try to enter any headquatres For not looged in preison for 4 hours \n4 - Not insulting players \n5 - Emphasis will be from him or give money to one's predcessor and his friend did not attribut you screenshot chaat and send to skype CPT Zombie  if you did  not return the money .", false, GUIEditor.tab[7]) 
  
addEventHandler("onClientGUIClick",root, 
function () 
if source == GUIEditor.button[3] then 
local uss,passs = guiGetText(GUIEditor.edit[1]),guiGetText(GUIEditor.edit[2]) 
triggerServerEvent("onLogin",localPlayer,uss,passs) 
elseif source == GUIEditor.button[4] then 
local uss,passs = guiGetText(GUIEditor.edit[1]),guiGetText(GUIEditor.edit[2]) 
triggerServerEvent("onReg",localPlayer,uss,passs) 
end 
end 
) 
  
addEvent("Hidewindow",true) 
addEventHandler("Hidewindow",root, 
function () 
guiSetVisible(GUIEditor.window[1],false) 
showCursor(false) 
showChat(true) 
fadeCamera(true,5) 
setCameraTarget (localPlayer) 
end 
) 
  
addEvent("show",true) 
addEventHandler("show",root, 
function () 
guiSetVisible(GUIEditor.window[1],true) 
showCursor(true) 
showChat(true) 
end 
) 

server -

addEvent("onLogin", true) 
addEventHandler("onLogin",root, 
    function (user, pass) 
        local account = getAccount ( user, pass ) 
    if ( account ~= true ) then 
   local log = logIn (source,account,pass) 
   if log then 
            outputChatBox ( "You Logged in Sucessfuly!", source, 255, 255, 0 , true ) 
            triggerClientEvent (source, "Hidewindow", source) 
        else 
            outputChatBox ( "Login Error!", source, 255, 0, 0 ) 
        end 
    else 
        outputChatBox ( "Wrong username or password!", source, 255, 0, 0 ) 
    end 
    end 
) 
-- 
addEvent("onReg", true) 
addEventHandler("onReg",root, 
    function (user, pass) 
    if not getAccount (user,pass) then 
local acc = addAccount (user,pass) 
if acc then 
local account = getAccount ( user, pass ) 
outputChatBox ("You've registered successfully!",source,0,255,0) 
else 
outputChatBox ("Error creating account !",source,255,0,0) 
end 
else 
outputChatBox ("This account is already exists !",source,255,0,0) 
end 
end 
) 
  
 addEventHandler ("onPlayerJoin",root, 
 function () 
 l = source 
 repeat until setTimer(function() 
 triggerClientEvent (l,"show",l) 
 end,2000,1) 
 end 
 ) 

Link to comment

سطر 5 سيرفر

if ( account ~= true ) then 
  

المفروض تتحقق ان الحساب صحيح وليس المفروض ان تتحقق ان الحساب خاطئ

معنى التحقق في هذا السطر هو

اذا كان الحساب ليس صحيحا

حطه كذا وجرب

  
if account then 

Link to comment

--client 
local sx, sy = guiGetScreenSize() 
function centerTheGUI( guiElement ) 
    local width, height = guiGetSize( guiElement, false ) 
    local x, y = sx / 2 - width / 2, sy / 2 - height / 2 
    guiSetPosition( guiElement, x, y, false ) 
end 
  
GUIEditor = { 
    memo = {}, 
    button = {}, 
    window = {}, 
    tab = {}, 
    checkbox = {}, 
    label = {}, 
    tabpanel = {}, 
} 
GUIEditor.window[1] = guiCreateWindow(114, 60, 500, 468, "CPT Zombie / The Walking Dead v2", false) 
guiWindowSetSizable(GUIEditor.window[1], false) 
guiSetVisible (GUIEditor.window[1],false) 
guiSetAlpha(GUIEditor.window[1], 0.96) 
 centerTheGUI( GUIEditor.window[1] ) 
GUIEditor.label[2] = guiCreateLabel(19, 41, 112, 44, "Username:", false, GUIEditor.window[1]) 
GUIEditor.memo[4] = guiCreateMemo(84, 35, 170, 33, "", false, GUIEditor.window[1]) 
GUIEditor.memo[6] = guiCreateMemo(84, 35, 170, 33, "", false, GUIEditor.window[1]) 
GUIEditor.memo[7] = guiCreateMemo(84, 35, 170, 33, "", false, GUIEditor.window[1]) 
GUIEditor.memo[8] = guiCreateMemo(84, 35, 170, 33, "", false, GUIEditor.window[1]) 
GUIEditor.memo[9] = guiCreateMemo(84, 35, 170, 32, "", false, GUIEditor.window[1]) 
GUIEditor.memo[10] = guiCreateMemo(83, 75, 172, 33, "", false, GUIEditor.window[1]) 
GUIEditor.label[4] = guiCreateLabel(19, 85, 64, 16, "Password:", false, GUIEditor.window[1]) 
GUIEditor.button[3] = guiCreateButton(53, 122, 114, 36, "Login", false, GUIEditor.window[1]) 
GUIEditor.button[4] = guiCreateButton(195, 122, 114, 36, "Create an Account", false, GUIEditor.window[1]) 
GUIEditor.button[10] = guiCreateButton(336, 122, 114, 36, "Forgot Password?", false, GUIEditor.window[1]) 
GUIEditor.checkbox[5] = guiCreateCheckBox(272, 45, 165, 17, "Remember Username", true, false, GUIEditor.window[1]) 
GUIEditor.checkbox[7] = guiCreateCheckBox(272, 81, 165, 17, "Remember Password", true, false, GUIEditor.window[1]) 
GUIEditor.label[5] = guiCreateLabel(145, 180, 308, 19, "Welcome to CPT! Play fair, have fun.", false, GUIEditor.window[1]) 
guiLabelSetColor(GUIEditor.label[5], 9, 104, 169) 
GUIEditor.tabpanel[4] = guiCreateTabPanel(9, 211, 482, 248, false, GUIEditor.window[1]) 
  
GUIEditor.tab[6] = guiCreateTab("Updates", GUIEditor.tabpanel[4]) 
  
GUIEditor.memo[19] = guiCreateMemo(1, 2, 479, 220, "The opening of the server on Friday Programming (Hardgamer+Fawad)\nMaud was making weapons relased  3/3/2016 v2 \nTo buy zones talk Hardgamer in skype  CPT Zombie  Go to skype and payment method onecard .\nit has been making the beginnign 2/3/2016 v2 .  \nmaking auto shop v2 by (Fawad) . \nmod was making click x by Hardgamer.  \n", false, GUIEditor.tab[6]) 
  
GUIEditor.tab[7] = guiCreateTab("Todays Stats", GUIEditor.tabpanel[4]) 
  
GUIEditor.memo[23] = guiCreateMemo(1, 2, 479, 220, "1 - Not to sabotage the player\n2 - Do not try hack thie server is protected \n3 - Do not try to enter any headquatres For not looged in preison for 4 hours \n4 - Not insulting players \n5 - Emphasis will be from him or give money to one's predcessor and his friend did not attribut you screenshot chaat and send to skype CPT Zombie  if you did  not return the money .", false, GUIEditor.tab[7]) 
  
addEventHandler("onClientGUIClick",root, 
function () 
if source == GUIEditor.button[3] then 
local uss,passs = guiGetText (GUIEditor.memo[9]) , guiGetText (GUIEditor.memo[10]) 
triggerServerEvent("onLogin",localPlayer,uss,passs) 
elseif source == GUIEditor.button[4] then 
local uss,passs = guiGetText (GUIEditor.memo[9]) , guiGetText (GUIEditor.memo[10]) 
triggerServerEvent("onReg",localPlayer,uss,passs) 
end 
end 
) 
  
addEvent("Hidewindow",true) 
addEventHandler("Hidewindow",root, 
function () 
guiSetVisible(GUIEditor.window[1],false) 
showCursor(false) 
showChat(true) 
fadeCamera(true,5) 
setCameraTarget (localPlayer) 
end 
) 
  
addEvent("show",true) 
addEventHandler("show",root, 
function () 
guiSetVisible(GUIEditor.window[1],true) 
showCursor(true) 
showChat(true) 
end 
) 

--server 
addEvent("onLogin", true) 
addEventHandler("onLogin",root, 
    function (user, pass) 
        local account = getAccount ( user, pass ) 
    if account then 
   local log = logIn (source,account,pass) 
   if log then 
            outputChatBox ( "You Logged in Sucessfuly!", source, 255, 255, 0 , true ) 
            triggerClientEvent (source, "Hidewindow", source) 
        else 
            outputChatBox ( "Login Error!", source, 255, 0, 0 ) 
        end 
    else 
        outputChatBox ( "Wrong username or password!", source, 255, 0, 0 ) 
    end 
    end 
) 
-- 
addEvent("onReg", true) 
addEventHandler("onReg",root, 
    function (user, pass) 
    if not getAccount (user,pass) then 
local acc = addAccount (user,pass) 
if acc then 
local account = getAccount ( user, pass ) 
outputChatBox ("You've registered successfully!",source,0,255,0) 
else 
outputChatBox ("Error creating account !",source,255,0,0) 
end 
else 
outputChatBox ("This account is already exists !",source,255,0,0) 
end 
end 
) 
  
 addEventHandler ("onPlayerJoin",root, 
 function () 
 l = source 
 repeat until setTimer(function() 
 triggerClientEvent (l,"show",l) 
 end,2000,1) 
 end 
 ) 
Link to comment

مثلن انا عامل لوحه عادي

و عامل button اسمه

Warp

الويضعط warp

يروح لوحه تانيه ونا عملها طيب ..

وفي اللوحه التاينه button اسمه

X

عاوز اليضعط X

برجع للوحه الاوله#

Link to comment
مثلن انا عامل لوحه عادي

و عامل button اسمه

Warp

الويضعط warp

يروح لوحه تانيه ونا عملها طيب ..

وفي اللوحه التاينه button اسمه

X

عاوز اليضعط X

برجع للوحه الاوله#

استخدم

guiSetVisible 

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...