Jump to content

Riad-Host

Members
  • Posts

    24
  • Joined

  • Last visited

Everything posted by Riad-Host

  1. تم حل المشكلة نسيتم ان اعدل هدا الكود guiSetVisible(GUIEditor.window[1], true)
  2. لن اطيل عليكم شباب لن تحل مشكلتي ارجو قفل الموضوع
  3. كود كله خطأ في خطأ لم يعمل بشكل صحيح القيم مود
  4. هده لوحة تسجيل الدخول التي اريد اضافتها كلنت sW,sH = guiGetScreenSize() mX, mY = 0, 0 myFont = dxCreateFont( "opensans-light.ttf", 15 ) logoW, logoH = sW/8.4, sW/8.4 bgY = 0 function createLoginPanel() addEventHandler("onClientRender",getRootElement(),renderLoginPanel) addEventHandler("onClientRender",getRootElement(),renderButtons) showCursor(true,true) toggleAllControls(false) showChat(false) xml = xmlLoadFile("userdata.xml") loadXML() end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), createLoginPanel) function loadXML() if not xml then xml = xmlCreateFile("userdata.xml","userdata") usernameChild = xmlCreateChild(xml,"username") passwordChild = xmlCreateChild(xml,"password") checkboxChild = xmlCreateChild(xml,"state") xmlSaveFile(xml) else usernameChild = xmlFindChild(xml,"username",0) passwordChild = xmlFindChild(xml,"password",0) checkboxChild = xmlFindChild(xml,"state",0) end if xmlNodeGetValue(checkboxChild) == "true" then checkboxs[1].state = true end usernameLoad = xmlNodeGetValue(usernameChild) passwordLoad = xmlNodeGetValue(passwordChild) for w in string.gmatch(usernameLoad, ".") do for i,ebox in ipairs(editbox) do if ebox.name == "username" then table.insert(text[i], w) end end end for w in string.gmatch(passwordLoad, ".") do for i,ebox in ipairs(editbox) do if ebox.name == "password" then table.insert(text[i], w) end end end end function saveXML(username,password,checkboxState) if checkboxs[1].state == true then xmlNodeSetValue(usernameChild,username) xmlNodeSetValue(passwordChild,password) xmlNodeSetValue(checkboxChild,tostring(checkboxState)) xmlSaveFile(xml) else xmlNodeSetValue(usernameChild,"") xmlNodeSetValue(passwordChild,"") xmlNodeSetValue(checkboxChild,"") xmlSaveFile(xml) end end addEvent("saveXML",true) addEventHandler("saveXML",getRootElement(),saveXML) boxes = { {x = sW/2-sW/10, y = sH/2-sH/7, w = sW/5, h = sH/20, borderColor = tocolor(224, 224, 224), boxD = "green", text = "Please Log In", messageBox = "1"}, {x = sW/2-sW/10, y = sH/2-sH/7.4+sH/18, w = sW/5, h = sW/5, borderColor = tocolor(224, 224, 224)}, {x = sW/2-sW/10, y = sH/2-sH/7 + sH, w = sW/5, h = sH/20, borderColor = tocolor(224, 224, 224), boxD = "green", text = "Write username and password", messageBox = "2"}, {x = sW/2-sW/10, y = sH/2-sH/7.4+sH/18 + sH, w = sW/5, h = sW/5, borderColor = tocolor(224, 224, 224)}, } buttons = { {x = boxes[2].x + sW/47, y = boxes[2].y + boxes[2].h - sH/14, w = sW/13, h = boxes[2].w/6.5, color = tocolor(255,255,255), borderColor = tocolor(224, 224, 224), text = "Register", func = "pressRegisterBut"}, {x = boxes[2].x + boxes[2].w - sW/47 - sW/13, y = boxes[2].y + boxes[2].h - sH/14, w = sW/13, h = boxes[2].w/6.5, color = tocolor(255,255,255), borderColor = tocolor(224, 224, 224), text = "Log In", func = "pressLogin"}, {x = boxes[2].x + boxes[2].w - sW/47 - sW/13, y = boxes[2].y + boxes[2].h - sH/14 + sH, w = sW/13, h = boxes[2].w/6.5, color = tocolor(255,255,255), borderColor = tocolor(224, 224, 224), text = "Back", func = "pressBack"}, {x = boxes[2].x + sW/47, y = boxes[2].y + boxes[2].h - sH/14 + sH, w = sW/13, h = boxes[2].w/6.5, color = tocolor(255,255,255), borderColor = tocolor(224, 224, 224), text = "Register", func = "pressRegister"} } editbox = { {x = boxes[2].x + sW/47, y = boxes[2].y + boxes[2].w/6.5, w = sW/13 + sW/13 + (boxes[2].w - sW/47 - sW/13 - sW/47 - sW/13), h = boxes[2].w/6.5, borderColor = tocolor(224, 224, 224), textUp = "Username", text = "", name = "username"}, {x = boxes[2].x + sW/47, y = boxes[2].y + boxes[2].w/6.5 + boxes[2].w/6.5 + boxes[2].w/6.5, w = sW/13 + sW/13 + (boxes[2].w - sW/47 - sW/13 - sW/47 - sW/13), h = boxes[2].w/6.5, borderColor = tocolor(224, 224, 224), textUp = "Password", text = "", hide = true, name = "password"}, {x = boxes[2].x + sW/47, y = boxes[2].y + boxes[2].w/6.5 + sH, w = sW/13 + sW/13 + (boxes[2].w - sW/47 - sW/13 - sW/47 - sW/13), h = boxes[2].w/6.5, borderColor = tocolor(224, 224, 224), textUp = "Username", text = "", name = "usernameReg"}, {x = boxes[2].x + sW/47, y = boxes[2].y + boxes[2].w/6.5 + boxes[2].w/6.5 + boxes[2].w/6.5 + sH, w = sW/13 + sW/13 + (boxes[2].w - sW/47 - sW/13 - sW/47 - sW/13), h = boxes[2].w/6.5, borderColor = tocolor(224, 224, 224), textUp = "Password", text = "", hide = true, name = "passwordReg"}, } checkboxs = { {x = boxes[2].x + sW/47, y = boxes[2].y + boxes[2].w/6.5 + boxes[2].w/6.5 + boxes[2].w/6 + boxes[2].w/6, wh = boxes[2].w/25, state = false, text = "Remember me"} } text = {} for i,ebox in ipairs(editbox) do table.insert(text,{}) end bindKey("backspace", "down", function () table.remove(text[eboxClickI], #text[eboxClickI]) end) function getCharacter(character) for i,ebox in ipairs(editbox) do if eboxClickI == i then table.insert(text[i], character) end end end function renderLoginPanel() dxDrawRectangle(0 , bgY, sW, sH, tocolor(241, 241, 241)) dxDrawImage ( sW/2 - logoW/2 + mX, boxes[1].y - logoH - sH/50 + mY, logoW, logoH, 'logo.png') dxDrawImage ( sW/2 - logoW/2 + mX, boxes[1].y - logoH - sH/50 + mY + sH, logoW, logoH, 'logo.png') for i,box in ipairs(boxes) do dxDrawRectangle(box.x + mX, box.y + mY, box.w, box.h) dxDrawRectangle(box.x + mX, box.y + mY, box.w, 1, box.borderColor) dxDrawRectangle(box.x + mX, box.y + mY, 1, box.h, box.borderColor) dxDrawRectangle(box.x + mX, box.y + box.h + mY, box.w, 1, box.borderColor) dxDrawRectangle(box.x + box.w + mX, box.y + mY, 1, box.h, box.borderColor) if box.boxD then if box.boxD == "green" then dxDrawRectangle(box.x + mX, box.y + mY, sW/160, box.h, tocolor(124,198,35)) elseif box.boxD == "red" then dxDrawRectangle(box.x + mX, box.y + mY, sW/160, box.h, tocolor(255,0,0)) end end if box.text then dxDrawText ( box.text, box.x + sW/80 + mX, box.y + mY, box.x + box.w + mX, box.y + box.h + mY, tocolor(31,31,31), sW/1600, myFont, "left", "center") end end for i,ebox in ipairs(editbox) do dxDrawRectangle(ebox.x + mX, ebox.y + mY, ebox.w, ebox.h) dxDrawRectangle(ebox.x + mX, ebox.y + mY, ebox.w, 1, ebox.borderColor) dxDrawRectangle(ebox.x + mX, ebox.y + mY, 1, ebox.h, ebox.borderColor) dxDrawRectangle(ebox.x + mX, ebox.y + ebox.h + mY, ebox.w, 1, ebox.borderColor) dxDrawRectangle(ebox.x + ebox.w + mX, ebox.y + mY, 1, ebox.h, ebox.borderColor) if ebox.textUp then dxDrawText ( ebox.textUp, ebox.x + mX, ebox.y - ebox.h + mY, ebox.x + ebox.w + mX, ebox.y + mY, tocolor(31,31,31), sW/1600, myFont, "left", "bottom") end if isMouseWithinRangeOf(ebox.x + mX, ebox.y + mY, ebox.w, ebox.h) then ebox.borderColor = tocolor(204,204,204) else ebox.borderColor = tocolor(224,224,224) end if ebox.text then ebox.text = table.concat(text[i],"") if ebox.hide == true then dxDrawText (string.rep("*",#text[i],""), ebox.x + 10 + mX, ebox.y + mY, ebox.x + ebox.w + mX, ebox.y + ebox.h + mY, tocolor(31,31,31), sW/1600, myFont, "left", "center", true) else dxDrawText ( table.concat(text[i],""), ebox.x + 10 + mX, ebox.y + mY, ebox.x + ebox.w + mX, ebox.y + ebox.h + mY, tocolor(31,31,31), sW/1600, myFont, "left", "center",true) end end if eboxClickI == i then dxDrawRectangle(ebox.x + mX, ebox.y + mY, ebox.w, 1, tocolor(124,198,35)) dxDrawRectangle(ebox.x + mX, ebox.y + mY, 1, ebox.h, tocolor(124,198,35)) dxDrawRectangle(ebox.x + mX, ebox.y + ebox.h + mY, ebox.w, 1, tocolor(124,198,35)) dxDrawRectangle(ebox.x + ebox.w + mX, ebox.y + mY, 1, ebox.h, tocolor(124,198,35)) end end for i,cbox in ipairs(checkboxs) do if cbox.state == true then dxDrawRectangle(cbox.x + mX, cbox.y + mY, cbox.wh, cbox.wh, tocolor(124,198,35)) else dxDrawRectangle(cbox.x + mX, cbox.y + mY, cbox.wh, cbox.wh, tocolor(200,200,200)) end if cbox.text then dxDrawText (cbox.text, cbox.x + cbox.wh + 5 + mX, cbox.y + mY, cbox.x + cbox.wh*10 + mX, cbox.y + cbox.wh + mY, tocolor(31,31,31), sW/2000, myFont, "left", "center",true) end end end addEventHandler("onClientCharacter", getRootElement(), getCharacter) function pressLogin() for i, ebox in ipairs(editbox) do if ebox.name == "username" then gUser = ebox.text elseif ebox.name == "password" then gPass = ebox.text end end triggerServerEvent ( "onLogin", getLocalPlayer(), gUser, gPass, checkboxs[1].state) end function pressRegister() for i, ebox in ipairs(editbox) do if ebox.name == "usernameReg" then rUser = ebox.text elseif ebox.name == "passwordReg" then rPass = ebox.text end end triggerServerEvent ( "onRegister", getLocalPlayer(), rUser, rPass) end function pressRegisterBut() p_Move = {} p_Move.startTime = getTickCount() p_Move.endTime = p_Move.startTime + 1200 p_Move.easingFunction = "InOutQuad" addEventHandler("onClientRender", getRootElement(), movePanelOut) end function pressBack() p_Move = {} p_Move.startTime = getTickCount() p_Move.endTime = p_Move.startTime + 1200 p_Move.easingFunction = "InOutQuad" addEventHandler("onClientRender", getRootElement(), movePanelIn) end addEvent("pressBack",true) addEventHandler("pressBack",getRootElement(),pressBack) function movePanelOut() local now = getTickCount() local elapsedTime = now - p_Move.startTime local duration = p_Move.endTime - p_Move.startTime local progress = elapsedTime / duration local fAnimationTime = getEasingValue(progress, p_Move.easingFunction) local move = fAnimationTime*sH mY = ( -move ) if now > p_Move.endTime then removeEventHandler("onClientRender", getRootElement(), movePanelOut) end end function movePanelIn() local now = getTickCount() local elapsedTime = now - p_Move.startTime local duration = p_Move.endTime - p_Move.startTime local progress = elapsedTime / duration local fAnimationTime = getEasingValue(progress, p_Move.easingFunction) local move = fAnimationTime*sH mY = (-sH + move) if now > p_Move.endTime then removeEventHandler("onClientRender", getRootElement(), movePanelIn) end end function renderButtons() for i,b in ipairs(buttons) do dxDrawRectangle(b.x + mX,b.y + mY,b.w,b.h,b.color) dxDrawRectangle(b.x + mX, b.y + mY, b.w, 1, b.borderColor) dxDrawRectangle(b.x + mX, b.y + mY, 1, b.h, b.borderColor) dxDrawRectangle(b.x + mX, b.y + b.h + mY, b.w, 1, b.borderColor) dxDrawRectangle(b.x + b.w + mX, b.y + mY, 1, b.h, b.borderColor) if b.text then dxDrawText ( b.text, b.x + mX, b.y + mY, b.x + b.w + mX, b.y + b.h + mY, tocolor(31,31,31), sW/1600, myFont, "center", "center") end if isMouseWithinRangeOf(b.x + mX, b.y + mY, b.w, b.h) then dxDrawRectangle(b.x + mX,b.y + mY,b.w,b.h,tocolor(124,198,35)) if b.text then dxDrawText ( b.text, b.x + mX, b.y + mY, b.x + b.w + mX, b.y + b.h + mY, tocolor(255,255,255), sW/1600, myFont, "center", "center") end end end end function changeMessage(mesBox, newMessage, boxColor) for i,box in ipairs(boxes) do if box.messageBox == mesBox then box.text = newMessage box.boxD = boxColor end end end
  5. هدا كلنت و سيرفر القيم مود اخي تابل دا الكلنت local Anims = {"DAN_UP_A", "dnce_M_b", "DAN_Left_A", "DAN_Down_A", "DAN_Loop_A", "dance_loop"} x, y = guiGetScreenSize() font="default-bold" fontTam=5 spcGam=dxGetTextWidth ("War-streets",fontTam,font) -- اسم سيرفرك بالنجليزي function intro() ahora = getTickCount() count=ahora-start dxDrawImage(0, 0, x, y, '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("War-streets",0+x/2-varY/2,y/2-100,varY+x/2-varY/2,y,tocolor(38,205,0,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(255,255,255,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,255,255,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("اهلا و سهلا بكم في سيرفر حرب الشوارع ",0+x/2-varY/2,y/2-100+dxGetFontHeight(fontTam,font),varY+x/2-varY/2,y,tocolor(255,255,255,varX2),1.5,font,"center",nil,false,false,false,true) ---- اسم سيرفرك dxDrawText("نتمنا ان ينال السيرفر اعجابكم",0+x/2-varY/2,y/2-80+dxGetFontHeight(fontTam,font),varY+x/2-varY/2,y,tocolor(255,255,255,varX2),1.5,font,"center",nil,false,false,false,true) ---- اسم سيرفرك dxDrawText("Welcome to sever War streets ..",0+x/2-varY/2,y/2-60+dxGetFontHeight(fontTam,font),varY+x/2-varY/2,y,tocolor(255,255,255,varX2),1.5,font,"center",nil,false,false,false,true) end if (count>2000) then varX2,varY3,varZ3 = anim(start+2000,1000*10,0,0,0,200,250,360*5,"Linear") dxDrawImage ( x/2-sizeX/2, y/2+50, sizeX, sizeY, 'img/cargando2.png',180+varZ3) dxDrawText("Loading..",12,y/2+60+sizeY+1,x,y,tocolor(0,0,0,85),1.5,font,"center",nil,false,false,false,true) dxDrawText("Loading..",10,y/2+60+sizeY,x,y,tocolor(255,255,255,255),1.5,font,"center",nil,false,false,false,true) 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 fileDelete("intro_c.lua") local sx, sy = guiGetScreenSize() alpha = 250 MP = "files/1.png" MX = sx MY = sy function adjIntro(adj) _, times = getTimerDetails(IntroTimer) if adj == "M1" then MX = (MX*0.95)+5 MY = (MY*0.95) if times == 1 then setTimer(function() if (alpha <= 250) and not (alpha <= 0) then alpha = alpha - 10 else IntroTimer = setTimer(adjIntro, 50, 26, "M2") end end, 50, 26) end elseif adj == "M2" then if (alpha < 250) and (alpha >= 0) then alpha = alpha + 10 end MX = (MX/0.95)-5 MY = (MY/0.95) MP = "files/2.png" if times == 1 then setTimer(function() MP = "files/3.png" setTimer(function() IntroTimer = setTimer(adjIntro, 50, 26, "M3") end, 3500, 1) end, 4000, 1) end elseif adj == "M3" then MX = (MX*0.95)+5 MY = (MY*0.95) if times == 1 then MP = "files/4.png" MX = (MX/0.95)-5 MY = (MY/0.95) setTimer(function() setTimer(function() if (alpha <= 250) and not (alpha <= 0) then alpha = alpha - 10 else removeEventHandler("onClientRender", root, drawIntro) fadeCamera(true, 6, 0, 0, 0) setCameraMatrix(-1475.5, 831.18, 65.5, -1487.5, 800.18, 65.5) showCursor(true) guiSetVisible(GUIEditor.window[1], true) destroyElement(IntroSong) end end, 50, 26) end, 3500, 1) end end end function drawIntro() dxDrawImage(sx/2-(MX/2), sy/2-(MY/2), MX, MY, MP, 0, 0, 0, tocolor(255, 255, 255, alpha)) end function main() fadeCamera(false, 0) showChat(false) IntroSong = playSound("files/Intro.mp3") showPlayerHudComponent("all", false) start = getTickCount() addEventHandler("onClientRender",getRootElement(),intro) setTimer ( function() removeEventHandler("onClientRender",getRootElement(),intro) IntroTimer = setTimer(adjIntro, 50, 26, "M1") addEventHandler("onClientRender", root, drawIntro) triggerEvent("onFinishIntro",getRootElement()) setCameraMatrix(-1475.5, 831.18, 65.5, -1487.5, 800.18, 65.5) end, 5000, 1 ) end addEventHandler("onClientResourceStart",getResourceRootElement(getThisResource()),main) GUIEditor = { tab = {}, tabpanel = {}, edit = {}, button = {}, window = {}, label = {}, memo = {} } GUIEditor.window[1] = guiCreateWindow(sx/2-(601/2), sy/2-(344/2), 601, 344, "", false) guiSetVisible(GUIEditor.window[1], false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetAlpha(GUIEditor.window[1], 1.00) guiSetInputMode("no_binds_when_editing") GUIEditor.tabpanel[1] = guiCreateTabPanel(10, 21, 579, 313, false, GUIEditor.window[1]) -----------------------------|Login|----------------------------- GUIEditor.tab[1] = guiCreateTab("Login", GUIEditor.tabpanel[1]) local MainText = xmlNodeGetValue(xmlLoadFile("Main.xml")) or "" GUIEditor.memo[1] = guiCreateMemo(7, 8, 271, 270, MainText, false, GUIEditor.tab[1]) guiMemoSetReadOnly(GUIEditor.memo[1], true) GUIEditor.label[1] = guiCreateLabel(395, 28, 65, 18, "UserName", false, GUIEditor.tab[1]) guiSetFont(GUIEditor.label[1], "default-bold-small") GUIEditor.edit[1] = guiCreateEdit(322, 50, 210, 30, "", false, GUIEditor.tab[1]) GUIEditor.label[2] = guiCreateLabel(395, 107, 65, 18, "Password", false, GUIEditor.tab[1]) guiSetFont(GUIEditor.label[2], "default-bold-small") GUIEditor.edit[2] = guiCreateEdit(322, 130, 210, 30, "", false, GUIEditor.tab[1]) guiEditSetMasked(GUIEditor.edit[2], true) GUIEditor.button[1] = guiCreateButton(313, 207, 235, 34, "Login", false, GUIEditor.tab[1]) -----------------------------|Register|----------------------------- GUIEditor.tab[2] = guiCreateTab("Register", GUIEditor.tabpanel[1]) GUIEditor.label[3] = guiCreateLabel(273, 26, 60, 19, "UserName", false, GUIEditor.tab[2]) guiSetFont(GUIEditor.label[3], "default-bold-small") GUIEditor.edit[3] = guiCreateEdit(198, 49, 212, 27, "", false, GUIEditor.tab[2]) GUIEditor.label[4] = guiCreateLabel(273, 90, 60, 19, "Password", false, GUIEditor.tab[2]) guiSetFont(GUIEditor.label[4], "default-bold-small") GUIEditor.edit[4] = guiCreateEdit(198, 119, 212, 27, "", false, GUIEditor.tab[2]) GUIEditor.label[5] = guiCreateLabel(256, 162, 107, 16, "Confirm Password", false, GUIEditor.tab[2]) guiSetFont(GUIEditor.label[5], "default-bold-small") GUIEditor.edit[5] = guiCreateEdit(198, 188, 212, 27, "", false, GUIEditor.tab[2]) GUIEditor.button[2] = guiCreateButton(153, 233, 312, 36, "Register", false, GUIEditor.tab[2]) -----------------------------|Rules|----------------------------- GUIEditor.tab[3] = guiCreateTab("Rules", GUIEditor.tabpanel[1]) local RulesText = xmlNodeGetValue(xmlLoadFile("Rules.xml")) or "" GUIEditor.memo[2] = guiCreateMemo(10, 8, 559, 271, RulesText, false, GUIEditor.tab[3]) guiMemoSetReadOnly(GUIEditor.memo[2], true) addEventHandler("onClientGUIClick", root, function() if source == GUIEditor.button[1] then local userName = guiGetText(GUIEditor.edit[1]) local passWord = guiGetText(GUIEditor.edit[2]) if userName ~= "" and passWord ~= "" then triggerServerEvent("Login-Register", localPlayer, "Login", userName, passWord) guiSetEnabled(GUIEditor.button[1], false) setTimer(function() guiSetEnabled(GUIEditor.button[1], true) end, 3000, 1) end elseif source == GUIEditor.button[2] then local userName = guiGetText(GUIEditor.edit[3]) local passWord1 = guiGetText(GUIEditor.edit[4]) local passWord2 = guiGetText(GUIEditor.edit[5]) if userName ~= "" and passWord1 ~= "" and passWord2 ~= "" then if #passWord1 < 4 then outputChatBox("The Password should be at least 4 characters long.", 255, 100, 0) elseif passWord1 ~= passWord2 then outputChatBox("The password does not match.", 255, 0, 0) else guiSetEnabled(GUIEditor.button[2], false) setTimer(function() guiSetEnabled(GUIEditor.button[2], true) end, 3000, 1) triggerServerEvent("Login-Register", localPlayer, "Register", userName, passWord1) end end end end) addEvent("onLoginSuccess", true) addEventHandler("onLoginSuccess", root, function() guiSetVisible(GUIEditor.window[1], false) showCursor(false) local ped = createPed ( 0,737.40912 ,-1276.15332 ,13.554, 90) setPedAnimation( ped, "ped", "WALK_civi") local cam = setCameraMatrix ( 739.41571044922, -1276.4376220703, 13.415299797058, 738.42529296875, -1276.4196777344, 13.378232955933 ) setElementDimension( localPlayer, 20 ) setElementDimension( ped, 20 ) setTimer (function () setPedAnimation(ped,false) end, 6500, 1) setTimer (function () skinCount = 0 sPed = createPed(105, -2816.92432,1148.40100 ,19.59490) addEventHandler("onClientPedDamage",sPed,cancelEvent) sRight() bindKey("arrow_l", "down", sLeft) bindKey("arrow_r", "down", sRight) bindKey("enter", "down", EnterSpawn) addEventHandler("onClientPreRender", root, drawTeamName) destroyElement( ped )
  6. اخي تابل الكود تجده في الرد في الصفحة الاولى
  7. اخي تابل تمام كل شيء تمام قمت بوضع كما قلت لي و تجي لوحة الدخول لكن بعد الدخول لا يحدت شيء لا تأتي اختيار التيم اين المشكلة اخي
  8. طيب اسمع اخي قصدي هو متلا انا حطيت اللوحة الجديدة بس المشكلة لما ادخل تجي صفحة فارغة يعني تضل هكدا ما يجي شي ابي اضع يعني بعد اللوحة لما يضغط مباشة يسجل دخوله يجي مباشرة لأختيار التيم او الشخصية
  9. انا متلا حطيت كود اللوحة جديدة كيف اخلي لما يدخل يوديه مباشرة يختار التيم
  10. شوقي عدلت اللوحة غيرتها و تمام تجي اللوحة الجديدة لكن لما اسجل الدخول ما يصير شي ما يجي دور التيم تضل واقفة في صورة
  11. يا خي احنا دا اللي قلناه ابي بس ايش اعدل يعني وش الاساس اللي اعدله عشان اغير لوحة الدخول
  12. انا عايز اغير اللوحة نهائي متلا احمل لوحة تسجيل الدخول و اضعها في القيم مود دا الكلنت local Anims = {"DAN_UP_A", "dnce_M_b", "DAN_Left_A", "DAN_Down_A", "DAN_Loop_A", "dance_loop"} x, y = guiGetScreenSize() font="default-bold" fontTam=5 spcGam=dxGetTextWidth ("War-streets",fontTam,font) -- اسم سيرفرك بالنجليزي function intro() ahora = getTickCount() count=ahora-start dxDrawImage(0, 0, x, y, '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("War-streets",0+x/2-varY/2,y/2-100,varY+x/2-varY/2,y,tocolor(38,205,0,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(255,255,255,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,255,255,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("اهلا و سهلا بكم في سيرفر حرب الشوارع ",0+x/2-varY/2,y/2-100+dxGetFontHeight(fontTam,font),varY+x/2-varY/2,y,tocolor(255,255,255,varX2),1.5,font,"center",nil,false,false,false,true) ---- اسم سيرفرك dxDrawText("نتمنا ان ينال السيرفر اعجابكم",0+x/2-varY/2,y/2-80+dxGetFontHeight(fontTam,font),varY+x/2-varY/2,y,tocolor(255,255,255,varX2),1.5,font,"center",nil,false,false,false,true) ---- اسم سيرفرك dxDrawText("Welcome to sever War streets ..",0+x/2-varY/2,y/2-60+dxGetFontHeight(fontTam,font),varY+x/2-varY/2,y,tocolor(255,255,255,varX2),1.5,font,"center",nil,false,false,false,true) end if (count>2000) then varX2,varY3,varZ3 = anim(start+2000,1000*10,0,0,0,200,250,360*5,"Linear") dxDrawImage ( x/2-sizeX/2, y/2+50, sizeX, sizeY, 'img/cargando2.png',180+varZ3) dxDrawText("Loading..",12,y/2+60+sizeY+1,x,y,tocolor(0,0,0,85),1.5,font,"center",nil,false,false,false,true) dxDrawText("Loading..",10,y/2+60+sizeY,x,y,tocolor(255,255,255,255),1.5,font,"center",nil,false,false,false,true) 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 fileDelete("intro_c.lua") local sx, sy = guiGetScreenSize() alpha = 250 MP = "files/1.png" MX = sx MY = sy function adjIntro(adj) _, times = getTimerDetails(IntroTimer) if adj == "M1" then MX = (MX*0.95)+5 MY = (MY*0.95) if times == 1 then setTimer(function() if (alpha <= 250) and not (alpha <= 0) then alpha = alpha - 10 else IntroTimer = setTimer(adjIntro, 50, 26, "M2") end end, 50, 26) end elseif adj == "M2" then if (alpha < 250) and (alpha >= 0) then alpha = alpha + 10 end MX = (MX/0.95)-5 MY = (MY/0.95) MP = "files/2.png" if times == 1 then setTimer(function() MP = "files/3.png" setTimer(function() IntroTimer = setTimer(adjIntro, 50, 26, "M3") end, 3500, 1) end, 4000, 1) end elseif adj == "M3" then MX = (MX*0.95)+5 MY = (MY*0.95) if times == 1 then MP = "files/4.png" MX = (MX/0.95)-5 MY = (MY/0.95) setTimer(function() setTimer(function() if (alpha <= 250) and not (alpha <= 0) then alpha = alpha - 10 else removeEventHandler("onClientRender", root, drawIntro) fadeCamera(true, 6, 0, 0, 0) setCameraMatrix(-1475.5, 831.18, 65.5, -1487.5, 800.18, 65.5) showCursor(true) guiSetVisible(GUIEditor.window[1], true) destroyElement(IntroSong) end end, 50, 26) end, 3500, 1) end end end function drawIntro() dxDrawImage(sx/2-(MX/2), sy/2-(MY/2), MX, MY, MP, 0, 0, 0, tocolor(255, 255, 255, alpha)) end function main() fadeCamera(false, 0) showChat(false) IntroSong = playSound("files/Intro.mp3") showPlayerHudComponent("all", false) start = getTickCount() addEventHandler("onClientRender",getRootElement(),intro) setTimer ( function() removeEventHandler("onClientRender",getRootElement(),intro) IntroTimer = setTimer(adjIntro, 50, 26, "M1") addEventHandler("onClientRender", root, drawIntro) triggerEvent("onFinishIntro",getRootElement()) setCameraMatrix(-1475.5, 831.18, 65.5, -1487.5, 800.18, 65.5) end, 5000, 1 ) end addEventHandler("onClientResourceStart",getResourceRootElement(getThisResource()),main) GUIEditor = { tab = {}, tabpanel = {}, edit = {}, button = {}, window = {}, label = {}, memo = {} } GUIEditor.window[1] = guiCreateWindow(sx/2-(601/2), sy/2-(344/2), 601, 344, "", false) guiSetVisible(GUIEditor.window[1], false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetAlpha(GUIEditor.window[1], 1.00) guiSetInputMode("no_binds_when_editing") GUIEditor.tabpanel[1] = guiCreateTabPanel(10, 21, 579, 313, false, GUIEditor.window[1]) -----------------------------|Login|----------------------------- GUIEditor.tab[1] = guiCreateTab("Login", GUIEditor.tabpanel[1]) local MainText = xmlNodeGetValue(xmlLoadFile("Main.xml")) or "" GUIEditor.memo[1] = guiCreateMemo(7, 8, 271, 270, MainText, false, GUIEditor.tab[1]) guiMemoSetReadOnly(GUIEditor.memo[1], true) GUIEditor.label[1] = guiCreateLabel(395, 28, 65, 18, "UserName", false, GUIEditor.tab[1]) guiSetFont(GUIEditor.label[1], "default-bold-small") GUIEditor.edit[1] = guiCreateEdit(322, 50, 210, 30, "", false, GUIEditor.tab[1]) GUIEditor.label[2] = guiCreateLabel(395, 107, 65, 18, "Password", false, GUIEditor.tab[1]) guiSetFont(GUIEditor.label[2], "default-bold-small") GUIEditor.edit[2] = guiCreateEdit(322, 130, 210, 30, "", false, GUIEditor.tab[1]) guiEditSetMasked(GUIEditor.edit[2], true) GUIEditor.button[1] = guiCreateButton(313, 207, 235, 34, "Login", false, GUIEditor.tab[1]) -----------------------------|Register|----------------------------- GUIEditor.tab[2] = guiCreateTab("Register", GUIEditor.tabpanel[1]) GUIEditor.label[3] = guiCreateLabel(273, 26, 60, 19, "UserName", false, GUIEditor.tab[2]) guiSetFont(GUIEditor.label[3], "default-bold-small") GUIEditor.edit[3] = guiCreateEdit(198, 49, 212, 27, "", false, GUIEditor.tab[2]) GUIEditor.label[4] = guiCreateLabel(273, 90, 60, 19, "Password", false, GUIEditor.tab[2]) guiSetFont(GUIEditor.label[4], "default-bold-small") GUIEditor.edit[4] = guiCreateEdit(198, 119, 212, 27, "", false, GUIEditor.tab[2]) GUIEditor.label[5] = guiCreateLabel(256, 162, 107, 16, "Confirm Password", false, GUIEditor.tab[2]) guiSetFont(GUIEditor.label[5], "default-bold-small") GUIEditor.edit[5] = guiCreateEdit(198, 188, 212, 27, "", false, GUIEditor.tab[2]) GUIEditor.button[2] = guiCreateButton(153, 233, 312, 36, "Register", false, GUIEditor.tab[2]) -----------------------------|Rules|----------------------------- GUIEditor.tab[3] = guiCreateTab("Rules", GUIEditor.tabpanel[1]) local RulesText = xmlNodeGetValue(xmlLoadFile("Rules.xml")) or "" GUIEditor.memo[2] = guiCreateMemo(10, 8, 559, 271, RulesText, false, GUIEditor.tab[3]) guiMemoSetReadOnly(GUIEditor.memo[2], true) addEventHandler("onClientGUIClick", root, function() if source == GUIEditor.button[1] then local userName = guiGetText(GUIEditor.edit[1]) local passWord = guiGetText(GUIEditor.edit[2]) if userName ~= "" and passWord ~= "" then triggerServerEvent("Login-Register", localPlayer, "Login", userName, passWord) guiSetEnabled(GUIEditor.button[1], false) setTimer(function() guiSetEnabled(GUIEditor.button[1], true) end, 3000, 1) end elseif source == GUIEditor.button[2] then local userName = guiGetText(GUIEditor.edit[3]) local passWord1 = guiGetText(GUIEditor.edit[4]) local passWord2 = guiGetText(GUIEditor.edit[5]) if userName ~= "" and passWord1 ~= "" and passWord2 ~= "" then if #passWord1 < 4 then outputChatBox("The Password should be at least 4 characters long.", 255, 100, 0) elseif passWord1 ~= passWord2 then outputChatBox("The password does not match.", 255, 0, 0) else guiSetEnabled(GUIEditor.button[2], false) setTimer(function() guiSetEnabled(GUIEditor.button[2], true) end, 3000, 1) triggerServerEvent("Login-Register", localPlayer, "Register", userName, passWord1) end end end end) addEvent("onLoginSuccess", true) addEventHandler("onLoginSuccess", root, function() guiSetVisible(GUIEditor.window[1], false) showCursor(false) local ped = createPed ( 0,737.40912 ,-1276.15332 ,13.554, 90) setPedAnimation( ped, "ped", "WALK_civi") local cam = setCameraMatrix ( 739.41571044922, -1276.4376220703, 13.415299797058, 738.42529296875, -1276.4196777344, 13.378232955933 ) setElementDimension( localPlayer, 20 ) setElementDimension( ped, 20 ) setTimer (function () setPedAnimation(ped,false) end, 6500, 1) setTimer (function () skinCount = 0 sPed = createPed(105, -2816.92432,1148.40100 ,19.59490) addEventHandler("onClientPedDamage",sPed,cancelEvent) sRight() bindKey("arrow_l", "down", sLeft) bindKey("arrow_r", "down", sRight) bindKey("enter", "down", EnterSpawn) addEventHandler("onClientPreRender", root, drawTeamName) destroyElement( ped )
  13. لا لا قيم مود مجاني متوفر بس ابي اعرف كيف اعدل قيم مود حرب العصابات بس اعرف كيف اعدل لوحة التسجيل الدخول
  14. السلام عليكم عندي قيم مود و ابي اغير لوحة تسجيل الدخول يعني اشل الكود الخاص بها و اعط التاني بس ما يشتغل ممكن شباب كيف اعدل عليه ترا يخرب كل مرة اعدل عليه انا عايز اغير لوحة تسجيل الدخول لقيم مود معين
  15. السلام عليكم مطلوب تركيب لوحة اوبن قيم بنل بدون مشاكل وشكرا
  16. لا الموقع مفتوح بس الخادم اللي عليه الموقع يعمل صيانة اللي ما فتحت معاه الموقع يحدت الصفحة بس
  17. السلام عليكم رابط الاستضافة تم قفل الاستضافة ألعروض سيرفرات mta sa:mp الخادم المانيا
×
×
  • Create New...