هو يبي يخلي الميمو اديت
تفضل
--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] = guiCreateEdit(84, 35, 170, 33, "", false, GUIEditor.window[1])
GUIEditor.memo[6] = guiCreateEdit(84, 35, 170, 33, "", false, GUIEditor.window[1])
GUIEditor.memo[7] = guiCreateEdit(84, 35, 170, 33, "", false, GUIEditor.window[1])
GUIEditor.memo[8] = guiCreateEdit(84, 35, 170, 33, "", false, GUIEditor.window[1])
GUIEditor.memo[9] = guiCreateEdit(84, 35, 170, 32, "", false, GUIEditor.window[1])
GUIEditor.memo[10] = guiCreateEdit(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])
GUIEditor.window[2] = guiCreateWindow(196, 203, 319, 100, "Forget Password ", false)
guiWindowSetSizable(GUIEditor.window[2], false)
guiSetAlpha(GUIEditor.window[2], 0.97)
guiSetVisible(GUIEditor.window[2] ,false) -- عدم اظهار الوحة وقت تشغيل المود
GUIEditor.memo[1] = guiCreateMemo(317, 21, 0, 116, "", false, GUIEditor.window[2])
GUIEditor.checkbox[1] = guiCreateCheckBox(18, 30, 286, 27, "Go to skype CPT Zombie and send All information", false, false, GUIEditor.window[2])
GUIEditor.button[2] = guiCreateButton(274, 66, 33, 22, "X", false, GUIEditor.window[2])
addEventHandler("onClientGUIClick",resourceRoot,
function ( )
if ( source == Exit ) then
guiSetVisible(wnd,false)
showCursor(false)
elseif ( source == GUIEditor.button[10] ) then
guiSetVisible(GUIEditor.window[1],false)
guiSetVisible(GUIEditor.window[2],true)
end
end
)
addEventHandler("onClientGUIClick",root, function()
if source == GUIEditor.button[2] then
guiSetVisible(GUIEditor.window[2] ,false)
guiSetVisible( GUIEditor.window[1] ,true)
end
end)
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 ..
--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
)