Jump to content

KING-_-HOHO

Members
  • Posts

    211
  • Joined

  • Last visited

Everything posted by KING-_-HOHO

  1. dx جآب من ذآ آلفنكشن function dx() على مآ آضن لكن هو يبي exports.SDT_GUI:dxDestroyElements(dx) يعني يبي يزيلهآ بس ليه حآط addEventHandler("onClientRender",getRootElement(), dx) آلمقروض تحط كذآ showCursor ( false ) removeEventHandler("onClientRender",getRootElement(), dx) else
  2. تقصد تحسين آلميكرفون آذا كآن مآيجي فآلميكرفون لآيدعم خآصـية آلتحسين
  3. هريسة آيش آلله يصلحك آنآ خليته آذآ ضغط 8 تنخفي السيآرة وتجي وحدهـ جديدة بجوآرهـ آذآ كآن يبغى زي مآتقول فيسير كذآ Vehicle = {} function CreateVehicle(Player) if isElement( Vehicle[Player] ) then return end -- نتحقق إذآ آلسيآرة موجودة ونسحبهآ local = x, y, z = getElementPosition ( Player ) -- جلب إحدآثيآت آللآعب لإنشآء آلسيآرة بجآنبه Vehicle[Player] = createVehicle ( 411, x+4, y+4, z ) -- إنشآء آلسيآرة outputChatBox ( "تم إنشآء آلسيآرة", Player, 255, 0 , 0, true) -- نخرج رسآلة آنه تم إنشآء آلسيآرة end -- نهآية آلوظيفة addEventHandler( "onPlayerJoin", root, function() -- وظيفه باسم + الحدث bindKey( source, "8", "down", CreateVehicle ) -- نفتح آلزر آول مآيدخل آللآعب end) -- نهآية آلوظيفة + إغلاق الإيفنت addEventHandler("onPlayerQuit", root, function() -- حدث عند خروج الاعب + وظيفه باسم destroyElement( Vehicle[source] ) -- نزيل آلسيآرة عند خروج اللآعب end) -- نهآية آلوظيفة + إغلآق آلإفنت
  4. @MR.R : عندك آخطآء كثير Vehicle = {} function CreateVehicle(Player) if isElement( Vehicle[Player] ) then destroyElement( Vehicle[Player] ) end -- نتحقق إذآ آلسيآرة موجودة ونسحبهآ local = x, y, z = getElementPosition ( Player ) -- جلب إحدآثيآت آللآعب لإنشآء آلسيآرة بجآنبه Vehicle[Player] = createVehicle ( 411, x+4, y+4, z ) -- إنشآء آلسيآرة outputChatBox ( "تم إنشآء آلسيآرة", Player, 255, 0 , 0, true) -- نخرج رسآلة آنه تم إنشآء آلسيآرة end -- نهآية آلوظيفة addEventHandler( "onPlayerJoin", root, function() -- وظيفه باسم + الحدث bindKey( source, "8", "down", CreateVehicle ) -- نفتح آلزر آول مآيدخل آللآعب end) -- نهآية آلوظيفة + إغلاق الإيفنت addEventHandler("onPlayerQuit", root, function() -- حدث عند خروج الاعب + وظيفه باسم destroyElement( Vehicle[source] ) -- نزيل آلسيآرة عند خروج اللآعب end) -- نهآية آلوظيفة + إغلآق آلإفنت
  5. موفق آنشآء الله آنآ آللي يهمني آللآق + آلحمآية هل آللآق قوي آم لآ؟ + وش نوع آلخادم اللي عندكم؟
  6. وش دخل الحركات ب موضوعه ياخوي هو كودهـ هريسه انا نصحته يسوي جدول لـ التيمات احسن والتيمات الحين كذا حوسه setTeamFriendlyFire(createTeam("Grove", 0, 500, 0 ), false) setTeamFriendlyFire(createTeam("Vagos", 255, 200, 0 ), false) setTeamFriendlyFire(createTeam("Ballas", 128, 0, 128), false) setTeamFriendlyFire(createTeam("Mafia", 154,205,50 ), false) setTeamFriendlyFire(createTeam("Russians", 160,82,45), false) setTeamFriendlyFire(createTeam("Triads", 104,104,104), false) setTeamFriendlyFire(createTeam("Rifa", 250,128,114 ), false) setTeamFriendlyFire(createTeam("Street", 250,128,0 ), false) setTeamFriendlyFire(createTeam("Aztecas", 24, 198, 238), false) setTeamFriendlyFire(createTeam("Medic", 24, 255, 255 ), false) setTeamFriendlyFire(createTeam("Police", 0, 0, 255 ), false) createTeam("No Team", 255, 255, 255) انا قلت ايش ؟ يسوي لها جدول مثل ماسوى لـ الحركات والأشياء الثانيه المتبعثرهـ local Anims = {"DAN_UP_A", "dnce_M_b", "DAN_Left_A", "DAN_Down_A", "DAN_Loop_A", "dance_loop"} يعني ترتيب فقط لا غير هو القيم مود لهـ يوم تنصحه؟؟ هو ليس قادر على آن يعدل على سطرين بس وتقول له سَوْ جدآول
  7. Client 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) 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
  8. جرب كلنت القيم مود 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) 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
  9. تـــذكـــر فـــتـــشـــكـــر ي ذآ بـسـت
  10. showPanel ShowPanel آنت معرف الايفنت حق التريقر بـ ShowPanel وليه مآتسمي آلفنكشن بـ ShowPanel غلط تحط بين القوسين + آنت تحققت انه داخل القروب قبل ماتتحقق انه مسجل + ناقص قوس اغلاق onMarkerHit يسير كذآ [quote="Mr.R"][lua]-- Server -- معلومات مالها شغل بالكود r, g, b, a = 255, 0, 0, 255 -- لون الماركر size = 1.5 -- حجم الماركر x, y, z = 100, 100, 100 -- احداثيات الماركر myMarker = createMarker(x, y, z, "cylinder", size, r, g, b, a) -- صنع ماركر -- معلومات مالها شغل بالكود -- Server local myMarker = createMarker(x, y, z, "cylinder", size, r, b, g, a) -- صنع ماركر addEventHandler( "onMarkerHit", myMarker, root, function ( theplayer ) -- وظيفة باسم + حدث if getElementType ( thePlayer ) == "player" then -- تحقق ان الي دخل الماركر لاعب local AccountName = getAccountName ( getPlayerAccount ( thePlayer ) ) -- نجلب اسم حساب الاعب local AccountPlayer = getPlayerAccount ( thePlayer ) -- نجلب اسم حساب الاعب if (AccountPlayer) and not isGuestAccount ( AccountPlayer ) then -- نتحقق من حساب الاعب if isObjectInACLGroup ("user."..accName, aclGetGroup ( "هنا اسم الرتبه" ) ) then -- نتحقق من الرتبه triggerClientEvent ( thePlayer, "ShowPanel", thePlayer ) -- هنا ترايقر الى سيرفر اكتب اي شيء end -- اند الفنكشن function end -- اند الف if end -- اند الف if end -- اند الف if ) -- Client local wnd = النافذه اسم هنا function Panel( ) -- وظيفه guiSetVisible (اللوحه اسم هنا, true) -- هنا نحط ترو عشان اذا دخلت الماركر تطلع النافذه showCursor (true) -- هنا نحط ترو عشان مؤئر الماوس يطلع end -- اند الفنكشن function addEvent("ShowPanel", true) -- نحط الاسم الي كتبناه بالترايقر هنا addEventHandler("ShowPanel", root, Panel) -- مثل الكلام الي فوق ^ [/lua]
  11. آيه عدلته كذآ قبل وشكراً على التنبيه
  12. وآصل ي زآحف إبدآع بس لو تضيف ميزهـ تحدد تبي تصنع بيك أب أو مآركر يكون آحسن
  13. Server-Side local x, y, z = 100, 100, 100 -- الاحداثيات local size = 1.5 -- الحجم local r, g, b, a = 255, 0, 0, 255 -- اللون local Marker = createMarker(x, y, z, "cylinder", size, r, g, b, a) -- نسوي ماركر function MarkerHit( thePlayer ) if getElementType ( thePlayer ) == "player" then -- نتحقق أن اللي دخل الماركر لاعب local HoHoName = getAccountName ( getPlayerAccount ( thePlayer ) ) -- نجيب أكاونت اللاعب local AccountG = getPlayerAccount ( thePlayer ) if (AccountG) and not isGuestAccount ( AccountG ) then if isObjectInACLGroup ("user."..HoHoName, aclGetGroup ( "Kill" ) ) then -- Kill نتحقق أن أكاونت اللاعب بقروب triggerClientEvent ( thePlayer, "ShowPanel", thePlayer ) -- نسوي تريقر للكلنت نفتح فيه اللوحة end end end end addEventHandler( "onMarkerHit", Marker, MarkerHit ) Client-Side local Wnd = Window -- اسم اللوحة function Show() guiSetVisible (Wnd, true) -- نفتح اللوحة showCursor (true) -- نطلع الماوس end addEvent("ShowPanel", true) addEventHandler("ShowPanel", root, Show) أعتمد على نفسك ثاني مرهـ #تم آلتعديل
  14. لآتخآفون آذآ مآ آخذهآ آلهلآل آلسنة ذي آلسنة آلجآية آلنصر يفجر آسيآ ويآخذها
  15. الله يباآآآرك فيكك , لعيون الاتحاديه هدمنا السد .. وبكينا العين @UAEPro انت عيناوي ؟؟ ي خي آول مبآرهـ آحس م فيهآ تعصب للآندية آلسعودية يعني عني آنآ آشجع آلنصر بس كنت في ذي آلمبآرة هلآلي ولآول مرهـ بآلتآريخ -- آنت آلييم @UAEPro آكيد عينآوي علشآن كذآ لن ترآهـ لمدة شهر قدآآم
  16. آلشكر لله ولبى قلبك آنت بعد انشآء الله نشوفك من كبآر آلمبرمجين عن قريب
  17. X جرب --[[------------------------------------------------- Created By Mr.R Skype : Httttt7_Ksa --]]------------------------------------------------- GUIEditor = { label = {}, staticimage = {} } WarpTaple = { -- تيبل للانتقالات { "الدائــــــــــري", "d.png", 1815.40515, 870.14069, 10.53743 }, { "النــــخــــيــــل", "n.png", 2077.17993, 868.93744, 6.86413 }, { "الــــــغــــــروب", "g.png", 674.92969, 1931.07874, 5.53906 }, } addEventHandler("onClientResourceStart", resourceRoot, function ( ) wnd = guiCreateWindow(181, 109, 426, 360, "=[ Panel Places v1.0 By Mr.R ]=", false) guiSetVisible (wnd, false ) guiSetProperty(wnd, "CaptionColour", "FFFA0000") guiWindowSetSizable(wnd, false) GridList = guiCreateGridList(9, 22, 202, 328, false, wnd) guiGridListAddColumn(GridList, "Places ...", 0.9) for _,v in ipairs ( WarpTaple ) do local row = guiGridListAddRow ( GridList ) guiGridListSetItemText ( GridList, row, 1, v[1], false, false ) guiGridListSetItemData ( GridList, row, 1, { v[3], v[4], v[5] } ) end Button1 = guiCreateButton(250, 247, 134, 39, "=[ Warp ]=", false, wnd) guiSetProperty(Button1, "NormalTextColour", "FFAAAAAA") Button2 = guiCreateButton(250, 296, 134, 39, "=[ X ]=", false, wnd) setElementData(Button1, "tooltip-text", "انتقل", false) setElementData(Button2, "tooltip-text", "اغلاق", false) guiSetProperty(Button2, "NormalTextColour", "FFAAAAAA") GUIEditor.staticimage[1] = guiCreateStaticImage(221, 28, 178, 155, "MTA.png", false, wnd) GUIEditor.label[1] = guiCreateLabel(264, 188, 24, 28, "*", false, wnd) guiSetFont(GUIEditor.label[1], "sa-gothic") guiLabelSetColor(GUIEditor.label[1], 245, 7, 46) GUIEditor.label[2] = guiCreateLabel(343, 209, 24, 28, "*", false, wnd) guiSetFont(GUIEditor.label[2], "sa-gothic") guiLabelSetColor(GUIEditor.label[2], 191, 25, 226) end ) bindKey ( "F3", "down", function ( )-- وظيفة قفل+فتح النافذه guiSetVisible ( wnd, not guiGetVisible ( wnd ) ) showCursor ( guiGetVisible ( wnd ) ) end ) addEventHandler("onClientGUIClick", resourceRoot, function ( ) if ( source == GridList ) then if ( guiGridListGetSelectedItem ( source ) ~= -1 ) then local fName = guiGridListGetItemText ( GridList, guiGridListGetSelectedItem ( GridList ), 1 ) for _,v in ipairs ( WarpTaple ) do if ( v[1] == fName ) then if ( v[2] ~= "" or v[2] ~= " " ) then guiStaticImageLoadImage ( GUIEditor.staticimage[1], tostring ( v[2] ) ) end end end else guiStaticImageLoadImage ( GUIEditor.staticimage[1], "MTA.png" ) end elseif ( source == Button1 ) then if ( guiGridListGetSelectedItem ( GridList ) ~= -1 ) then if ( isTimer ( Timer ) ) then return end Timer = setTimer ( function ( ) end, 4000, 1 ) for _,v in ipairs ( WarpTaple ) do if ( v[3] ~= "" or v[3] ~= " " and v[4] ~= "" or v[4] ~= " " and v[5] ~= "" or v[5] ~= " " ) then setElementPosition ( localPlayer, tostring ( v[4] ), tostring ( v[4] ), tostring ( v[5] ) ) outputChatBox ( "* تم الإنتقال الى ".. guiGridListGetItemText ( GridList, guiGridListGetSelectedItem ( GridList ), 1 ) .."", 255, 255, 0, true ) end end end elseif ( source == Button2 ) then guiSetVisible ( wnd, false ) showCursor ( false ) end end )
×
×
  • Create New...