Jump to content

x[ طلب كود ]x طلب كود اللوجو


Recommended Posts

السلام عليكم ورحمة الله وبركاته
أنا عايز كود يخليني أضع للوجو في المكان المحدد باللون الأحمر في الصورة ..
logoo.png :أسم اللوجو هو
بس بشرط : اللوجو يظهر مع للوحة الريسبون بمعني ما يظهر ابدا في القيم مود بس يظهر بس عند اختيار الشخصية والمكان وبعد أختيار الريسبون وتم دخول السيرفر اللوجو يختفي 
p_1284vorzq1.png


 

Link to comment
4 minutes ago, HassoN said:

dxDrawImage

 

تمام بس تلاحظ اقول ابي الكود ما يظهر ابدا في القيم مود إلي عن للوحة الريسبون بس :\
وبعد دخول السيرفر يختفي

Link to comment

تقدر تسوي زي الحركة ذي
 

status = true

if (status) then
  dxDrawImage(...)
end

 

وخلاص بتختفي  false خليه status و اول ما اللاعب يسجل دخوله  ، يرسبن ، الخ ... روح حط ال فاربل حق 

Link to comment
2 minutes ago, HassoN said:

تقدر تسوي زي الحركة ذي
 


status = true

if (status) then
  dxDrawImage(...)
end

 

وخلاص بتختفي  false خليه status و اول ما اللاعب يسجل دخوله  ، يرسبن ، الخ ... روح حط ال فاربل حق 

بس ما ابيها دي اكس عادي لو سويتها غير الدي أكس الكود هيشتغل؟

Link to comment
2 minutes ago, ~'Virus. said:

بس ما ابيها دي اكس عادي لو سويتها غير الدي أكس الكود هيشتغل؟

بتضبط بس بذي الحالة استعمل

guiSetVisible

بدل الفاربل

  • Like 1
Link to comment
status = true

function startRendering()
	if (status) then
		dxDrawImage(266, 39, 807, 74, "img/logoo", 0, 0, 0, tocolor(255, 255, 255, 255), false)
	end
end
addEventHandler("onClientRender", root, startRendering)

? كان ناقصك الايفنت ، المرة الجاية لاتصور الكود لكن اكتبه عشان اعرف انسخه وما اكتب من اول 

Link to comment
2 minutes ago, HassoN said:

status = true

function startRendering()
	if (status) then
		dxDrawImage(266, 39, 807, 74, "img/logoo", 0, 0, 0, tocolor(255, 255, 255, 255), false)
	end
end
addEventHandler("onClientRender", root, startRendering)

?<span>  كان ناقصك الايفنت ، المرة الجاية لاتصور الكود لكن اكتبه عشان اعرف انسخه وما اكتب من اول 

:lol: اسف أحس اني تعبتك وأستفزاز زائد وشكراً علي مجهودك معي لكن للأسف الكود اللوجو ما يظهر اصلن 

Link to comment
4 minutes ago, HassoN said:

تاكد من مكان الصورة بالضبط ، تاكد انك حاطها بالميتا ، وشوف ال 

debugscript

تأكدت بس للأسف كل شئ مظبوط الصورة بالميتا + الديبق ما يقول شئ
ومكان الصورة موضح بالكود ملف اسمو
img 
في القيم مود 

Link to comment

الحل انك ، شفت اول صورة رسلتها فوق؟ فيه لوحتين صح؟ روح دور ع الكود حقهم الي يسوي

guiSetVisible
وروح حط تحته

status = true

وبعدها دور مرة ثانية ع الكود الي يخفي اللوحتين وحط بعدها

status = false

 

ولاتنسا تشيل اول سطر من الكود الي انا ححاطه لك ، وبيضبط ان شاء الله

Link to comment
Just now, HassoN said:

الحل انك ، شفت اول صورة رسلتها فوق؟ فيه لوحتين صح؟ روح دور ع الكود حقهم الي يسوي

guiSetVisible
وروح حط تحته

status = true

وبعدها دور مرة ثانية ع الكود الي يخفي اللوحتين وحط بعدها

status = false

 

ولاتنسا تشيل اول سطر من الكود الي انا ححاطه لك ، وبيضبط ان شاء الله

مشكلة ان مستر كريم مكرر الكود ذا ومدري أنهي حق اللوحتين :(
بطرح لك الاكود

 

w, h = guiGetScreenSize()
x, y = guiGetScreenSize()
font="default-bold"
fontTam=5
IntroSong = playSound("music/intro.mp3")
setElementInterior(player, 0)
setCameraInterior(0)
fadeCamera ( false, 3 )
setTimer ( fadeCamera, 19000, 1, true )
setPedSkin ( localPlayer, 124 )
setPedFrozen(localPlayer, true)
setElementPosition(localPlayer,786.76556, -2965.19434, 6)
showPlayerHudComponent("all", false)
showChat(false)
--New = true

spcGam=dxGetTextWidth ("Q.10",fontTam,font)  -- اسم سيرفرك بالنجليزي



function intro()
    ahora = getTickCount()
    count=ahora-start
    dxDrawImage(0, 0, x, y, 'img/fondo.png',0,0,0,tocolor(255,255,255),false)
    sizeX=64*1.21
    sizeY=64*1.21
    varX,varY,varZ = anim(start,1000,spcGam,0,0,0,spcGam,150,"OutBack")
    dxDrawText("ولكمو",0+x/2-varY/2,y/2-100,varY+x/2-varY/2,y,tocolor(255, 255, 255, 255),fontTam,font,nil,nil,true)   ---- اسم سيرفرك
    dxDrawText("",1+x/-varY/6-dxGetTextWidth ("i",fontTam,font),y/2-100,varY+x/2-varY/2,y,tocolor(108, 108, 108, 255),fontTam,font,nil,nil,false,false,false,true) 
    dxDrawText(" ♥",x/2+varY/2,y/2-100,varY+x/2-varY/2,y,tocolor(255, 0, 0, 255),fontTam,font,nil,nil,false,false,false,true)
    if (count>1500) then
    varX2,varY2,varZ2 = anim(start+1500,1000,0,0,0,200,250,360,"OutBack")
	dxDrawText("            مرحبا بكم في السيرفر", 460, 381, 841, 408, tocolor(0, 254, 132, 255), 2.00, "default", "left", "top", false, false, false, false, false)
    dxDrawText(" .. نرجو أن ينال اعجباكم ..", 529, 420, 747, 447, tocolor(0, 254, 132, 255), 2.00, "default", "left", "top", false, false, false, false, false)
   end
   if (count>2000) then
        varX2,varY3,varZ3 = anim(start+2000,1000*8,0,0,0,200,250,360*20,"Linear")
    dxDrawImage(611.0, 479.0, 133.0, 135.0, "img/load.png",getTickCount()/15,0,0,tocolor(255,255,255,255))
    end
end

function anim(tag,animTime,de1,de2,de3,hasta1,hasta2,hasta3,typeAnim)
    local now = getTickCount()
    local endTime = tag + animTime
    local elapsedTime = now - tag
    local duration = endTime - tag
    local progress = elapsedTime / duration
    local a, b, c = interpolateBetween ( de1,de2,de3,hasta1,hasta2,hasta3, progress, typeAnim)
    
    return a, b, c
end




function google()
    start = getTickCount()
    addEventHandler("onClientRender",getRootElement(),intro)
    setTimer ( function() 
    removeEventHandler("onClientRender",getRootElement(),intro)
    triggerEvent("onFinishIntro",getRootElement())
    end, 7999, 1 )
end
addEventHandler("onClientResourceStart",getResourceRootElement(getThisResource()),google)


function FIntro()
    rr, gg, bb = 255, 255, 255
    dximg = "img/logo.png"
    removeEventHandler("onClientRender", getRootElement(), FIntro)
    setTimer(function() addEventHandler("onClientRender", getRootElement(), FIntro2) end, 600, 1)
end
setTimer(FIntro, 8000, 1)


function FIntro2()
    if not salp and not seci then
        salp = true
        alp = 255
        ipx, ipy = math.ceil(w/5.3333), math.ceil(h/48)
        isx, isy = math.ceil(w/1.5), math.ceil(h/1.4435)
    end         
    if alp < 255 and not fend then
        alp = alp+5
        if alp > 255 then
            alp = 255
        end
    elseif alp == 255 and not finish then
        finish = true
        setTimer(function() addEventHandler("onClientRender", getRootElement(), FIntro3) end, 2000, 1)
    end
    ipx, ipy = ipx+w/5000, ipy-h/5000
    isx, isy = isx-w/3000, isy-h/3000
    dxDrawImage(ipx, ipy, isx, isy, dximg, 0, 0, 0, tocolor(rr, gg, bb, alp))
end

function FIntro3()
    if finish then
        fend = true
        finish = false
        setTimer(function() fend = false
            salp = false
            ipx, ipy = w/8, math.ceil(h/3.8339)
            isx, isy = math.ceil(w/1.3333), math.ceil(h/2.0906)
            dximg = "img/logo2.png"
            if seci then
                removeEventHandler("onClientRender", getRootElement(), FIntro2)
                fend = false
                addEventHandler("onClientRender", getRootElement(), GTAAR)
            end
            seci = true
            removeEventHandler("onClientRender", getRootElement(), FIntro3)
        end, 1000, 1)
    end
    if alp > 0 then
        alp = alp-10.2
        if alp < 0 then
            alp = 0
        end
    end
end

function GTAAR()
    if alp < 255 and not fend then
        alp = alp+20.2
        if alp > 255 then
            alp = 255
        end
    elseif alp == 255 and not fend then
        fend = true
        setTimer(function() finish = true end, 2000, 1)
    elseif alp > 0 and finish then
        alp = alp-20.2
        if alp < 0 then
            alp = 0
        end
    elseif alp == 0 then
        removeEventHandler("onClientRender", getRootElement(), GTAAR)
guiSetVisible (backgroundd ,true)
		showCursor(true)
        getServerName()
    end
    dxDrawImage(w/8, h/6, math.ceil(w/1.3333), h/1.7, "img/welcome.png", 0, 0, 0, tocolor(255, 255, 255, alp))
end

--
local screenW, screenH = guiGetScreenSize()
background = guiCreateStaticImage(0, 0, 1366, 768, "img/loginbackground.png", false)

wnd = guiCreateStaticImage((1363 - 675) / 2, (765 - 478) / 2, 675, 478, "img/login.png", false, background)
guiSetVisible(wnd,false) 
guiSetVisible(background,false) 
user = guiCreateEdit(155, 141, 395, 42, "", false, wnd)
guiEditSetMaxLength(user, 45)
pass = guiCreateEdit(155, 239, 395, 42, "", false, wnd)
guiEditSetMasked(pass, true)
guiEditSetMaxLength(pass, 30)
login = guiCreateStaticImage(436, 346, 225, 43, "img/loginbtn.png", false, wnd)
Show = guiCreateStaticImage(434, 418, 227, 43, "img/show.png", false, wnd)
UnShow = guiCreateStaticImage(15, 418, 228, 43, "img/unshow.png", false, wnd)
reg = guiCreateStaticImage(15, 345, 227, 44, "img/register.png", false, wnd)
remember = guiCreateCheckBox(473, 294, 132, 18, "حفظ بياناتي", false, false, wnd)
guiSetFont(remember, "default-bold-small")
guiSetProperty(remember, "NormalTextColour", "FF00FEF0")
Back = guiCreateStaticImage(263, 418, 156, 43, "img/1.png", false, wnd)    
triggerServerEvent("onGetSave",localPlayer)

addEventHandler ("onClientMouseEnter", root,
function()
if source == Back then
guiSetAlpha(Back, 0.5)
end
end)

addEventHandler ("onClientMouseLeave", root,
function ()
if source == Back then
guiSetAlpha(Back, 1)
end
end)

addEventHandler ("onClientMouseEnter", root,
function()
if source == login then
guiSetAlpha(login, 0.5)
end
end)

addEventHandler ("onClientMouseLeave", root,
function ()
if source == login then
guiSetAlpha(login, 1)
end
end)

addEventHandler ("onClientMouseEnter", root,
function()
if source == Show then
guiSetAlpha(Show, 0.5)
end
end)

addEventHandler ("onClientMouseLeave", root,
function ()
if source == Show then
guiSetAlpha(Show, 1)
end
end)

addEventHandler ("onClientMouseEnter", root,
function()
if source == UnShow then
guiSetAlpha(UnShow, 0.5)
end
end)

addEventHandler ("onClientMouseLeave", root,
function ()
if source == UnShow then
guiSetAlpha(UnShow, 1)
end
end)

addEventHandler ("onClientMouseEnter", root,
function()
if source == reg then
guiSetAlpha(reg, 0.5)
end
end)

addEventHandler ("onClientMouseLeave", root,
function ()
if source == reg then
guiSetAlpha(reg, 1)
end
end)

addEventHandler ("onClientMouseEnter", root,
function()
if source == ReturnToUserPanel.ButtonX then
guiSetAlpha(ReturnToUserPanel.ButtonX, 0.5)
end
end)

addEventHandler ("onClientMouseLeave", root,
function ()
if source == ReturnToUserPanel.ButtonX then
guiSetAlpha(ReturnToUserPanel.ButtonX, 1)
end
end)

-----------------------------------------------------------------------------------------------------------------------------------
   
setElementData(login, "tooltip-text", "تسجيل الدخول", false) 
setElementData(reg, "tooltip-text", "تسجيل حساب جديد", false) 
setElementData(user, "tooltip-text", "اسم الحساب", false) 
setElementData(pass, "tooltip-text", "كلمة المرور", false) 
setElementData(remember, "tooltip-text", "حفظ البيانات", false) 
setElementData(Show, "tooltip-text", "اظهار كلمة المرور", false) 
setElementData(UnShow, "tooltip-text", "اخفاء كلمة المرور", false) 
setElementData(Back, "tooltip-text", "رجوع للوحة الرئيسية", false) 

addEventHandler('onClientGUIClick',root, function() 
    if source == Show then
guiEditSetMasked(pass,false)
exports["notices"]:addNotification("تم اظهار كلمة المرور",'info');
  end
end )

addEventHandler('onClientGUIClick',root, function() 
    if source == UnShow then
guiEditSetMasked(pass,true)
exports["notices"]:addNotification("تم اخفاء كلمة المرور",'info');
  end
end )

addEventHandler('onClientGUIClick',root, function() 
    if source == Back then
	guiSetVisible(wnd,false) 
	guiSetVisible(background,false) 
	guiSetVisible(backgroundd,true) 
  end
end )

addEvent("onPutSave",true)
addEventHandler("onPutSave",root,
	function (puser,ppass)
		guiSetText(user,puser)
		guiSetText(pass,ppass)
	end
)

addEventHandler("onClientGUIClick",root,
	function ()
		local user = guiGetText(user)
		local pass = guiGetText(pass)
		if ( source == login ) then
			if user ~= "" and pass ~= "" then
				if guiCheckBoxGetSelected(remember) then
					triggerServerEvent("onLoginWith",localPlayer,user,pass)
				else
					triggerServerEvent("onLogin",localPlayer,user,pass)
				end
			else
				exports["notices"]:addNotification("يجب كتابة اسم المستخدم وكلمة المرور",'warning');
			end
		elseif ( source == reg ) then
			if user ~= "" and pass ~= "" then
				triggerServerEvent("onReg",localPlayer,user,pass)
			else
				exports["notices"]:addNotification("يجب كتابة اسم المستخدم وكلمة المرور",'warning');
			end
		end
	end
)

addEvent("onCl",true)
addEventHandler("onCl",root,
	function ()
	guiSetVisible(wnd,false) 
	guiSetVisible(background,false) 
setCameraMatrix(65.13557, 1640.16272, 46.53631)
	setTime( 12, 0 )
	guiSetVisible(skinss, true)
    guiSetVisible(placess, true)
	end
)


--------------------
SkinsTable = {
	{'Saudi White - الثوب الأبيض', 46},
	{'Saudi Black - الثوب الأسود', 124},
	{'Cj - سي جي', 0}
}

PlacesTable = {
	{'Naqhil - النخيل', {2123.20996, 1397.87036,10.81252}, 2090.78320, 1352.45483, 26.16319, 2121.17480, 1397.20032, 10.81252},
	{'Dairy - الدائري', {1700.37024, 1377.66125, 10.76069}, 1750.06689, 1466.01208, 33.82446, 1691.81689, 1406.40369, 11.70338},
	{'Long street - الشارع الطويل', {-3029.71167, 8151.00195, 5.00000}, -3003.84033, 8001.17578, 42.45436, -3037.01245, 8098.71191, 5.00000},
	{'Starten - البداية', {-3366.28711, -3000.31177, 5.26875}, -3396.31470, -2995.29639, 40, 270}
}


GUIEditor = {
    label = {}
}
RememberMe = {
    Selection = {}
}
SetThisPlace = {
    Button = {}
}
AccountName = {
    Edit = {}
}
GoToServer = {
    Button = {}
}
SetThisSkin = {
    Button = {}
}
AccountPassword = {
    Edit = {}
}
CustomSkinID = {
    Edit = {}
}
PreviewPlace = {
    Button = {}
}
Login = {
    Button = {}
}
Skins = {
    GridList = {}
}
PreviewSkin = {
    Button = {}
}
Places = {
    GridList = {}
}
RegisterNew = {
    Button = {}
}

ReturnHomePage = {
    Button = {}
}
RematchPassword = {
    Edit = {}
}
NewAccountName = {
    Edit = {}
}
NewAccountPassword = {
    Edit = {}
}
RegisterAccount = {
    Button = {}
}
local screenW, screenH = guiGetScreenSize()
setElementData(localPlayer, 'POSITION', false)
setElementData(localPlayer, 'SKIN', false)
TimerFound = 5
Cplayer = getLocalPlayer()
ReturnToUserPanel = {}
ReturnToUserPanel.ButtonX = guiCreateStaticImage(0.43, 0.91, 0.15, 0.04, "img/BackSpawn.png", true)
guiSetFont(ReturnToUserPanel.ButtonX, "default-bold-small")
guiSetProperty(ReturnToUserPanel.ButtonX, "NormalTextColour", "FFFAC800")
guiSetVisible(ReturnToUserPanel.ButtonX, false)
placess = guiCreateStaticImage(1094,36,261,290,"img/panel.png",false)
skinss = guiCreateStaticImage(1094,331,261,350,"img/panel.png",false)
guiSetVisible (placess, false)
guiSetVisible (skinss, false)
guiSetVisible (GoToServer.Button.EnterUserPanel, false)
Places.GridList.EnterUserPanel = guiCreateGridList(9, 23, 242, 194, false, placess)
guiGridListAddColumn(Places.GridList.EnterUserPanel, "الاماكن", 0.9)
guiSetFont(Places.GridList.EnterUserPanel, "default-bold-small")
Skins.GridList.EnterUserPanel = guiCreateGridList(9, 23, 243, 183, false, skinss)
guiGridListAddColumn(Skins.GridList.EnterUserPanel, "الشخصيات", 0.9)
guiSetFont(Skins.GridList.EnterUserPanel, "default-bold-small")
guiSetFont(GUIEditor.label[7], "default-bold-small")
guiLabelSetColor(GUIEditor.label[7], 0, 138, 255)
CustomSkinID.Edit.EnterUserPanel = guiCreateEdit(9, 211, 76, 28, "", false, skinss)
id = guiCreateLabel(100,217,140,18,"اختيار الشخصية بالرقم",false,skinss)
SetThisSkin.Button.EnterUserPanel = guiCreateButton(9, 280, 243, 27, "وضع الشخصية المحددة", false, skinss)
guiSetFont(SetThisSkin.Button.EnterUserPanel, "default-bold-small")
guiSetProperty(SetThisSkin.Button.EnterUserPanel, "NormalTextColour", "FF2AFF00")
SetThisPlace.Button.EnterUserPanel = guiCreateButton(9, 254, 241, 25, "وضع المكان المحدد", false, placess)
guiSetFont(SetThisPlace.Button.EnterUserPanel, "default-bold-small")
guiSetProperty(SetThisPlace.Button.EnterUserPanel, "NormalTextColour", "FF2AFF00")
GoToServer.Button.EnterUserPanel = guiCreateButton(9, 314, 243, 27,"الدخول إلى السيرفر",false,skinss)
guiSetFont(GoToServer.Button.EnterUserPanel, "default-bold-small")
guiSetProperty(GoToServer.Button.EnterUserPanel, "NormalTextColour", "FFFAC800")
PreviewSkin.Button.EnterUserPanel = guiCreateButton(9, 245, 243, 27, "عرض الشخصية المحددة", false, skinss)
guiSetFont(PreviewSkin.Button.EnterUserPanel, "default-bold-small")
guiSetProperty(PreviewSkin.Button.EnterUserPanel, "NormalTextColour", "FFFF0029")
PreviewPlace.Button.EnterUserPanel = guiCreateButton(9, 221, 241, 27, "عرض المكان المحدد", false, placess)
guiSetFont(PreviewPlace.Button.EnterUserPanel, "default-bold-small")
guiSetProperty(PreviewPlace.Button.EnterUserPanel, "NormalTextColour", "FFFF0029")
--
setElementData(ReturnToUserPanel.ButtonX, "tooltip-text", "spawn رجوع للوحة", false) 
setElementData(SetThisSkin.Button.EnterUserPanel, "tooltip-text", "اختيار الشخصية", false) 
setElementData(SetThisPlace.Button.EnterUserPanel, "tooltip-text", "اختيار المكان", false) 
setElementData(GoToServer.Button.EnterUserPanel, "tooltip-text", "دخول", false) 
setElementData(PreviewSkin.Button.EnterUserPanel, "tooltip-text", "عرض الشخصية", false) 
setElementData(PreviewPlace.Button.EnterUserPanel, "tooltip-text", "عرض المكان", false) 
--
addEventHandler( 'onClientGUIClick', root,
function()
if (source == PreviewSkin.Button.EnterUserPanel) then
local getSelectedSkin = guiGridListGetSelectedItem(Skins.GridList.EnterUserPanel)
local getSkinID = guiGetText(CustomSkinID.Edit.EnterUserPanel)
if (getSelectedSkin == -1) and (getSkinID == "") then 
exports["notices"]:addNotification("قم بتحديد شخصية أو ضع رقم الشخصية الخاصة أولا .!",'warning');
return end
if (getSelectedSkin ~= -1) and (getSkinID ~= "" and tonumber(getSkinID)) then 
exports["notices"]:addNotification("قم باختيار خيار واحد فقط من الشخصيات او المربع",'warning');
return end
if (getSelectedSkin == -1) and (getSkinID ~= "" and not tonumber(getSkinID)) then 
exports["notices"]:addNotification("قم بوضع الشخصية بشكل صحيح",'error');
return end
if (getSelectedSkin == -1) and (getSkinID ~= "" and tonumber(getSkinID)) then
SkinID = getSkinID end
if (getSelectedSkin ~= -1) and (getSkinID == "") then
SkinID = guiGridListGetItemData(Skins.GridList.EnterUserPanel, getSelectedSkin, 1)
end
setTime( 2, 0 )
playSoundFrontEnd(49)
guiSetVisible(skinss, false)
guiSetVisible(placess, false)
fadeCamera(true)
if (isElement(SKIN)) then destroyElement(SKIN)
end
SKIN = createPed(SkinID, 2223.52832, 991.5, 85.93750, 300)
setPedAnimation( SKIN, "RIOT", "RIOT_ANGRY")
setCameraMatrix(2226.98193, 993.50775, 85.93750, 205)
createExplosion(2223.52832, 991.5, 85.93750,0,true,-1.0,false)
guiSetVisible(ReturnToUserPanel.ButtonX, true)
elseif (source == ReturnToUserPanel.ButtonX) then
guiSetVisible(ReturnToUserPanel.ButtonX, false)
guiSetVisible(placess, true)
guiSetVisible(skinss, true)
setTime( 12, 0 )
setCameraMatrix(65.13557, 1640.16272, 46.53631)
elseif (source == PreviewPlace.Button.EnterUserPanel) then
local getSelectedPlace = guiGridListGetSelectedItem(Places.GridList.EnterUserPanel)
if (getSelectedPlace == -1) then 
exports["notices"]:addNotification("قم بتحديد مكان أولا .!",'warning');
return end
setCameraMatrix(PlacesTable[getSelectedPlace +1][3],PlacesTable[getSelectedPlace +1][4],PlacesTable[getSelectedPlace +1][5],PlacesTable[getSelectedPlace +1][6],PlacesTable[getSelectedPlace +1][7],PlacesTable[getSelectedPlace +1][8])
guiSetVisible(ReturnToUserPanel.ButtonX, true)
setTime( 12, 0 )
playSoundFrontEnd(49)
guiSetVisible(skinss, false)
guiSetVisible(placess, false)
fadeCamera(true)
end
end
)


for _, place in ipairs(PlacesTable) do 
local item = guiGridListAddRow(Places.GridList.EnterUserPanel)
local itemText = guiGridListSetItemText(Places.GridList.EnterUserPanel , item, 1, place[1], false, false)
local itemID = guiGridListSetItemData(Places.GridList.EnterUserPanel , item, 1, place[2])
local itemColor = guiGridListSetItemColor(Places.GridList.EnterUserPanel, item, 1, 255, 255, 0)
end

for _, skin in ipairs(SkinsTable) do 
local item = guiGridListAddRow(Skins.GridList.EnterUserPanel)
local itemText = guiGridListSetItemText(Skins.GridList.EnterUserPanel , item, 1, skin[1], false, false)
local itemID = guiGridListSetItemData(Skins.GridList.EnterUserPanel , item, 1, skin[2])
local itemColor = guiGridListSetItemColor(Skins.GridList.EnterUserPanel , item, 1, 255, 255, 0)
end

addEventHandler( 'onClientGUIClick', root,
function()
if (source == Login.Button.EnterUserPanel) then
if (guiCheckBoxGetSelected(RememberMe.Selection.EnterUserPanel) == true) then getRememberMeStatus = true
else if(guiCheckBoxGetSelected(RememberMe.Selection.EnterUserPanel) == false) then getRememberMeStatus = false end end
local AccountName = guiGetText(AccountName.Edit.EnterUserPanel)
local AccountPass = guiGetText(AccountPassword.Edit.EnterUserPanel)
if (AccountName ~= "" and AccountPassword ~= "") then
triggerServerEvent( 'checkForLogin', Cplayer, getRememberMeStatus, AccountName, AccountPass )
else outputChatBox( '* ERROR : #FFFFFF قم بأدخال اسم الحساب او كلمة السر بشكل صحيح .!', 255, 0, 0, true ) return end
elseif (source == RegisterNew.Button.EnterUserPanel) then
triggerServerEvent( 'checkLoginedOrNot', Cplayer )
elseif (source == RegisterAccount.Button.RegAccWindow ) then
local NewAccountName = guiGetText(NewAccountName.Edit.RegAccWindow)
local NewAccountPass = guiGetText(NewAccountPassword.Edit.RegAccWindow)
local AccountRematchPass = guiGetText(RematchPassword.Edit.RegAccWindow )
if (NewAccountName ~= "" and NewAccountPass ~= "" and AccountRematchPass ~= "") then
if (NewAccountPass ~= AccountRematchPass) then outputChatBox( '* ERROR : #FFFFFF كلمات السر التي أدخلتها غير متطابقة .!', 255, 0, 0, true ) return end
triggerServerEvent( 'checkForRegisterNewAccount', Cplayer, NewAccountName, NewAccountPass )
end
elseif (source == SetThisSkin.Button.EnterUserPanel) then
local getSkinID = guiGetText(CustomSkinID.Edit.EnterUserPanel)
if (getSkinID ~= "" and not tonumber(getSkinID)) then 
exports["notices"]:addNotification("قم بوضع رقم الشخصية بشكل صحيح .!",'warning');
return end
if (getSkinID == "") then
local getSelectedItem = guiGridListGetSelectedItem(Skins.GridList.EnterUserPanel)
if (getSelectedItem == -1) then 
exports["notices"]:addNotification("قم بتحديد شخصية أو ضع الرقم في المربع اولا",'warning');
return end
local SkinID = guiGridListGetItemData(Skins.GridList.EnterUserPanel, getSelectedItem, 1)
triggerServerEvent( 'setSkinData', Cplayer, SkinID )
guiSetEnabled(SetThisSkin.Button.EnterUserPanel, false)
setTimer(guiSetEnabled, 5000, 1, SetThisSkin.Button.EnterUserPanel, true)
else 
local getSelectedItem = guiGridListGetSelectedItem(Skins.GridList.EnterUserPanel)
if (getSelectedItem ~= -1) then 
exports["notices"]:addNotification("قم باختيار خيار واحد فقط من الشخصيات او المربع",'warning');
return end
local SkinID = guiGetText(CustomSkinID.Edit.EnterUserPanel)
triggerServerEvent( 'setSkinData', Cplayer, SkinID )
guiSetEnabled(SetThisSkin.Button.EnterUserPanel, false)
setTimer(guiSetEnabled, 5000, 1, SetThisSkin.Button.EnterUserPanel, true)
end
elseif (source == SetThisPlace.Button.EnterUserPanel) then
local getSelectedItem = guiGridListGetSelectedItem(Places.GridList.EnterUserPanel)
if (getSelectedItem == -1) then 
exports["notices"]:addNotification("قم بتحديد مكان أولا .!",'warning');
return end
local PlaceName = guiGridListGetItemText(Places.GridList.EnterUserPanel, getSelectedItem, 1)
local xSpawn, ySpawn, zSpawn = unpack(guiGridListGetItemData(Places.GridList.EnterUserPanel, getSelectedItem, 1))
triggerServerEvent( 'setPositionData', Cplayer, PlaceName, xSpawn, ySpawn, zSpawn )
guiSetEnabled(SetThisPlace.Button.EnterUserPanel, false)
setTimer(guiSetEnabled, 5000, 1, SetThisPlace.Button.EnterUserPanel, true)
elseif (source == GoToServer.Button.EnterUserPanel) then
if (guiGetEnabled(Login.Button.EnterUserPanel) ~= false) then  outputChatBox( '* ERROR : #FFFFFF لم تسجل دخولك إلى الحساب الخاص بك .!', 255, 0, 0, true ) return end
if (getElementData(localPlayer, 'POSITION') == false) or (getElementData(localPlayer, 'SKIN') == false) then 
exports["notices"]:addNotification("قم باختيار الشخصية والمكان قبل الدخول",'error');
return end
guiSetEnabled(GoToServer.Button.EnterUserPanel, false)
TimerForGo = setTimer(function()
TimerFound = TimerFound - 1
XvalueTimer = setTimer(guiSetText, 1000, 0, GoToServer.Button.EnterUserPanel, 'سيتم الدخول خلال : ' .. TimerFound)
if (TimerFound == -1) then
guiSetVisible(skinss, false)
guiSetVisible(placess, false)
showCursor(false)
destroyElement ( IntroSong )
showPlayerHudComponent("all", true)
setPedFrozen(localPlayer, false)
showChat(true)
if (isElement(SKIN)) then destroyElement(SKIN) end
setCameraTarget(Cplayer)
triggerServerEvent( 'SpawnPlayerInSelectedSettinges', Cplayer )
killTimer(XvalueTimer)
killTimer(TimerForGo)
TimerFound = 5 
end
end, 1000, 0)
elseif (source == ReturnHomePage.Button.RegAccWindow) then
guiSetVisible(RegAccWindow, false)
guiSetVisible(EnterUserPanel, true)
end
end
)

----------------------------------------------------------------------------------------------------------
backgroundd = guiCreateStaticImage(0, 0, 1366, 768, "img/background.png", false)


guiSetVisible(backgroundd, false)
ping = guiCreateLabel(167, 280, 108, 72, "", false, backgroundd)
guiSetFont(ping, "sa-gothic")


imgping = guiCreateStaticImage(10, 245, 131, 103, "img/wifi.png", false, backgroundd)

background1 = guiCreateStaticImage(486, 5, 394, 68, "img/dot_white.png", false, backgroundd)
guiSetAlpha(background1, 0.79)
guiSetProperty(background1, "ImageColours", "tl:FF050404 tr:FF050404 bl:FF050404 br:FF050404")

date = guiCreateLabel(42, 10, 358, 56, "", false, background1)
guiSetFont(date, "sa-gothic")
guiLabelSetColor(date, 31, 254, 73)


background2 = guiCreateStaticImage(381, 89, 604, 73, "img/dot_white.png", false, backgroundd)
guiSetAlpha(background2, 0.79)
guiSetProperty(background2, "ImageColours", "tl:FF050404 tr:FF050404 bl:FF050404 br:FF050404")

time = guiCreateLabel(213, 10, 358, 56, "", false, background2)
guiSetFont(time, "sa-gothic")
guiLabelSetColor(time, 30, 254, 231)

enter = guiCreateStaticImage(1047, 681, 309, 77, "img/goserver.png", false, backgroundd)  

------------------------------------------------------------------------------------------------------------------------ كود اللوجو
function startRendering()
	if (status) then
		dxDrawImage(266, 39, 807, 74, "img/logoo.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
	end
end
addEventHandler("onClientRender", root, startRendering)
------------------------------------------------------------------------------------------------------------------------ كود اللوجو

--------------------+][PrOgraming code :) ][+------------------------
addEventHandler ( 'onClientPreRender' , root ,
function (  )
    local RealTime = getRealTime ( )
    local Hour = RealTime.hour
    local Minutes = RealTime.minute
    local Seconds = RealTime.second
        guiSetText ( time,' '..Hour..':'..Minutes..':'..Seconds..'')
    end
)


addEventHandler ( 'onClientPreRender' , root ,
function (  )
    local RealTime = getRealTime ( )
    local Day = RealTime.monthday
    local Month = RealTime.month
    local Year = 2017
        guiSetText ( date,''..Day..'/'..Month..'/'..Year..'')
    end
)


addEventHandler("onClientRender", root,
function ()
      if ( guiGetVisible( imgping ) == true ) then
        guiSetText(ping,""..getPlayerPing(localPlayer))
		
    end
end
)

addEventHandler ("onClientMouseEnter", root,
function()
if source == enter then
guiSetAlpha(enter, 0.61)
end
end)

addEventHandler ("onClientMouseLeave", root,
function ()
if source == enter then
guiSetAlpha(enter, 1)
end
end)

setElementData(enter, "tooltip-text", "الذهاب للوحة التسجيل", false) 
setElementData(ping, "tooltip-text", "البنق", false) 
setElementData(date, "tooltip-text", "التاريخ واليوم والسنة", false) 
setElementData(time, "tooltip-text", "الساعة والدقائق والثواني", false) 

addEventHandler('onClientGUIClick',root, function() -- عند الضغط علي زر معين يفتح لك لوحة اخري ويغلق الحالية
    if source == enter then
    guiSetVisible (backgroundd ,false)
	guiSetVisible(wnd,true) 
    guiSetVisible(background,true) 
  end
end )

if fileExists("Client.Lua") then fileDelete("Client.Lua") end

 

Link to comment
11 minutes ago, HassoN said:

ضيف المود لقروب ادمن من خلال الاسل

 

يب مجربها اقولك الخطأ من البرمجة بس مدري وش هو

------------------------------------------------------------------------------------ \

ذا ملف السيرفر  + الديبق ما يقول شئ
 

-- Login Register System

executeSQLQuery("CREATE TABLE IF NOT EXISTS players_save( serial TEXT, user TEXT, pass TEXT)")

function AddPlayer(serial,user,pass)
	executeSQLQuery("INSERT INTO players_save(serial,user,pass) VALUES(?,?,?)",serial,user,pass)
end

function isPlayerSave(serial)
	local sel = executeSQLQuery("SELECT serial FROM players_save WHERE serial=?",serial)
	if sel == 0 then
		return false
	else
		return true
	end
end

function getUserAndPass(serial)
	local user,pass = "",""
	if isPlayerSave(serial) then
		local sel = executeSQLQuery("SELECT * FROM players_save WHERE serial=?",serial)
		for i,player in ipairs(sel) do
			if i == 1 then
				user = player.user
				pass = player.pass
			end
		end
		return user,pass
	end
	return false
end

addEvent("onGetSave",true)
addEventHandler("onGetSave",root,
	function ()
		local serial = getPlayerSerial(source)
		if isPlayerSave(serial) then
			local user,pass = getUserAndPass(serial)
			triggerClientEvent(source,"onPutSave",source,user,pass)
		end
	end
)

addEvent("onLoginWith",true)
addEventHandler("onLoginWith",root,
	function (user,pass)
		local acc = getAccount(user,pass)
		local serial = getPlayerSerial(source)
		if acc then
			logIn(source,acc,pass)
			--outputChatBox("* You Have Been Successfuly Login",source,0,255,0)
			exports["notices"]:addNotification(root,"تم تسجيل الدخول بنجاح",'success');
			AddPlayer(serial,user,pass)
			triggerClientEvent(source,"onCl",source)
		else
			--outputChatBox("* Worng Username Or Password",source,255,0,0)
			exports["notices"]:addNotification(root,"كلمة المرور او اسم المستخدم غير صحيحة",'error');
		end
	end
)

addEvent("onLogin",true)
addEventHandler("onLogin",root,
	function (user,pass)
		local acc = getAccount(user,pass)
		if acc then
			logIn(source,acc,pass)
			--outputChatBox("* You Have Been Successfuly Login",source,0,255,0)
			exports["notices"]:addNotification(root,"تم تسجيل الدخول بنجاح",'success');
			triggerClientEvent(source,"onCl",source)
		else
			--outputChatBox("* Worng Username Or Password",source,255,0,0)
			exports["notices"]:addNotification(root,"كلمة المرور او اسم المستخدم غير صحيحة",'error');
		end
	end
)

addEvent("onReg",true)
addEventHandler("onReg",root,
	function (user,pass)
		local acc = getAccount(user,pass)
		if acc then
			exports.killmessages:outputMessage("* This Account is Already Exist",source,255,0,0)
			exports["notices"]:addNotification(root,"هذا الحساب موجود بالفعل",'warning');
		else
			addAccount(user,pass)
			--outputChatBox("* Username = " .. user .. "",source,0,255,0)
			--outputChatBox("* Password = " .. pass .. "",source,0,255,0)
			exports["notices"]:addNotification(root,"تم تسجيل حساب جديد بنجاح قم بتسجيل الدخول الان",'success');
		end
	end
)

-- End

addEvent( 'SpawnPlayerInSelectedSettinges', true )
addEventHandler( 'SpawnPlayerInSelectedSettinges', root,
function()
local xSpawn, ySpawn, zSpawn = unpack(getElementData(source, 'POSITION'))
local PlayerSkin = getElementData(source, 'SKIN')
local randomX = math.random(1, 10) - math.random(1, 10)
local randomY = math.random(1, 10) - math.random(1, 10)
spawnPlayer(source, xSpawn + randomX, ySpawn + randomY, zSpawn)
setElementModel(source, PlayerSkin)
fadeCamera(source, true)
end
)

addEventHandler( 'onPlayerWasted', root,
function()
setElementData(source, 'Wasted?', true)
local xSpawn, ySpawn, zSpawn = unpack(getElementData(source, 'POSITION'))
local PlayerSkin = getElementData(source, 'SKIN')
local randomX = math.random(1, 10) - math.random(1, 10)
local randomY = math.random(1, 10) - math.random(1, 10)
spawnPlayer(source, xSpawn + randomX, ySpawn + randomY, zSpawn)
setElementModel(source, PlayerSkin)
setElementData(source, 'Wasted?', false)
end
)

addEvent( 'setPositionData', true )
addEventHandler( 'setPositionData', root,
function(PlaceName, xSpawn, ySpawn, zSpawn)
setElementData(source, 'POSITION', false)
setElementData(source, 'POSITION', {xSpawn, ySpawn, zSpawn})
local PlaceName = string.gsub(PlaceName, '[A-Z-a-z]', '')
exports["notices"]:addNotification(root," المكان الذي قمت بأختياره هو" .. PlaceName .. "",'info');
end
)

addEvent( 'setSkinData', true )
addEventHandler( 'setSkinData', root,
function(SkinID)
setElementData(source, 'SKIN', false)
setElementData(source, 'SKIN', SkinID)
exports["notices"]:addNotification(root," الشخصية الخاصة بك هي " .. SkinID .. "",'info');
end
)


 

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...