nony Posted August 1, 2012 Share Posted August 1, 2012 السلام عليكم ورحمه الله وبركاته يا شباب عندي مود في مشكله المود اول مايدخل الاعب تجيه اماكن يختار منها اي واحد بس المشكله اذا اختار مكان الصوره تبقا معلقه على المكان gui.lua newFont = guiCreateFont ( "customfont.ttf", 20 ) function guiCreateWindow( x2, y2, width2, height2, titleBarText2, relative2 ) local mainBackground = guiCreateStaticImage ( x2, y2, width2, height2, "OSAMA.png", relative2 ) local mainBackgroundLabel = guiCreateLabel ( 0, 0, 250, 100, titleBarText2, false, mainBackground ) guiSetFont ( mainBackgroundLabel, newFont ) guiSetEnabled ( mainBackgroundLabel, false ) return mainBackground end ----------------------------------------------------- ------spawn point ---------------------------------------------------- local x, y = guiGetScreenSize() SpawnWnd = guiCreateWindow(550, y / 3 - 0, 230, 180, "لوحة البدايات || By x===|RYAN|===x ", false) guiSetVisible(SpawnWnd, false) SpawnGrid = guiCreateGridList(20, 30, 190, 110, false, SpawnWnd) Column = guiGridListAddColumn(SpawnGrid, "الأمـاكـن ", 0.9) row1 = guiGridListAddRow(SpawnGrid) row2 = guiGridListAddRow(SpawnGrid) row3 = guiGridListAddRow(SpawnGrid) row4 = guiGridListAddRow(SpawnGrid) row5 = guiGridListAddRow(SpawnGrid) guiGridListSetItemText(SpawnGrid, row1, Column, "1- البــدايـة الرئـيـسـيـة |●|", false, true) guiGridListSetItemText(SpawnGrid, row2, Column, "2- بــدايـة الـطـعـس |●|", false, true) guiGridListSetItemText(SpawnGrid, row3, Column, "3- بــدايـة سـاحـة الـقـتـال |●|", false, true) guiGridListSetItemText(SpawnGrid, row4, Column, "4- بــدايـة الـدائـــري |●|", false, true) guiGridListSetItemText(SpawnGrid, row5, Column, "5- بــدايـة الـشـارع الـطـويـل |●|", false, true) SpawnButton = guiCreateButton(55, 145, 120, 20, "اختيار", false, SpawnWnd) function ActionClick() if source == SpawnGrid then local grid = guiGridListGetSelectedItem(SpawnGrid) local getgrid1 = guiGridListGetItemText(SpawnGrid, grid, Column) if not grid or not getgrid1 then return end ShowCamera(getgrid1) else if source == SpawnButton then local grid = guiGridListGetSelectedItem(SpawnGrid) local getgrid = guiGridListGetItemText(SpawnGrid, grid, Column) if not grid or not getgrid then return end if getgrid == "" then return end triggerServerEvent("SpawnMe", localPlayer, getgrid,getElementModel(ped)) guiSetVisible(SpawnWnd, false) setTimer(destroyElement, 500, 1, ped) destroyElement(bin) showCursor(false) visble() end end end addEventHandler("onClientGUIClick", root, ActionClick) function ShowCamera (getgrid1) if getgrid1 == "1- البــدايـة الرئـيـسـيـة |●|" then setCameraMatrix (-3707.19458, -3086.20947, 93.65739) elseif getgrid1 == "2- بــدايـة الـطـعـس |●|" then setCameraMatrix(-2541.21655, -2897.66601, 18.39924) elseif getgrid1 == "3- بــدايـة سـاحـة الـقـتـال |●|" then setCameraMatrix(-2854.25512, -2912.02514, 38.53991) elseif getgrid1 == "4- بــدايـة الـدائـــري |●|" then setCameraMatrix(1785.9481201172, 837.67370605469, 10.671875) elseif getgrid1 == "5- بــدايـة الـشـارع الـطـويـل |●|" then setCameraMatrix(-3070.94921, -3083.84301, 45.22809) end end function StartRenderDisplay() Slect = guiCreateStaticImage(0, 0, 1, 1, "Wnd.png", true) setTime(12, 0) setWeather(3) setCloudsEnabled(false) ped = createPed(46, 2909.4663085938, -2347.1797578125, 201.4604486084, 90) setElementFrozen(ped, true) setSkyGradient(105, 140, 120, 190, 130, 150) fadeCamera(true) timeshow = setTimer(showCursor, 500, 0, (guiGetVisible(Slect))) bin = createObject(1337, 2909.5014648438, -2347.2185058594, 200.16800079346, 90, 0, 0) setElementAlpha(bin, 0) setTimer(discoTime1, 500, 1) setPedAnimation(ped, "STRIP", "PUN_LOOP", -1, true, false, true) end function discoTime1() if not ped then return end setTimer(setPedRotation, 50, 1, ped, getPedRotation(ped) + 5) discTimer1 = setTimer(discoTime2, 50, 1) end function discoTime2() if not ped then return end setTimer(setPedRotation, 50, 1, ped, getPedRotation(ped) + 5) discTimer2 = setTimer(discoTime1, 50, 1) end function StopRenderDisplay() destroyElement(Slect) kill() setElementAlpha(ped, 0) destroyElement(sound) setTime(12, 0) setWeather(3) resetSkyGradient() showChat(true) guiSetVisible(SpawnWnd, true) radar = guiCreateStaticImage(0, 0.751666666666, 0.22125, 0.248333333333, "radar.png", true) guiMoveToBack(radar) showPlayerHudComponent("all", true) end function onStop() resetSkyGradient() showChat(true) showPlayerHudComponent("all", true) setElementData(localPlayer, "IsSpawned", false) end addEventHandler("onClientResourceStop", resourceRoot, onStop) function click(l_6_0, l_6_1, l_6_2, l_6_3) local l_6_4, l_6_5 = fixScreen(544, 660) local l_6_6, l_6_7 = fixScreen(960, 705) local l_6_8, l_6_9 = fixScreen(80, 660) local l_6_10, l_6_11 = fixScreen(110, 700) local l_6_12, l_6_13 = fixScreen(435, 660) local l_6_14, l_6_15 = fixScreen(470, 699) if source ~= Slect then return end if l_6_4 < l_6_2 and l_6_2 < l_6_6 and l_6_5 < l_6_3 and l_6_3 < l_6_7 then StopRenderDisplay() setCameraMatrix(-2865.09838, 1488.72497, 155.71398, -2261.01758, 2327.17847, 19.21039) elseif l_6_8 < l_6_2 and l_6_2 < l_6_10 and l_6_9 < l_6_3 and l_6_3 < l_6_11 then goLeft() elseif l_6_12 < l_6_2 and l_6_2 < l_6_14 and l_6_13 < l_6_3 and l_6_3 < l_6_15 then goRight() end end addEventHandler("onClientGUIClick", root, click) ---------------- --go left and right --------------- function goRight() newSkin = getElementModel(ped) + 1 local x, y, z = getElementPosition(ped) createExplosion(x, y, z - 1.3, 12, true, 0.2, false) while not setElementModel(ped, newSkin) do newSkin = newSkin + 1 end end function goLeft() newSkin = getElementModel(ped) - 1 local x, y, z = getElementPosition(ped) createExplosion(x, y, z - 1.3, 12, true, 0.2, false) while not setElementModel(ped, newSkin) do newSkin = newSkin - 1 end end function visble() if isTimer(timeshow) then killTimer(timeshow) setTimer(showCursor, 500, 1, false) kill() end end function kill() if isTimer(discTimer1) then killTimer(discTimer1) if isTimer(discTimer2) then killTimer(discTimer2) end end end function fixScreen(l_11_0, l_11_1) local l_11_2, l_11_3 = guiGetScreenSize() local l_11_4 = math.floor(l_11_0 * l_11_2 / 1024) local l_11_5 = math.floor(l_11_1 * l_11_3 / 768) return l_11_4, l_11_5 end ----------- --logo ------------ local logoo = guiCreateStaticImage(0, 0, 1, 1, "logo.png", true) guiSetVisible(logoo, false) showChat(false) setTimer(function() guiSetAlpha(logoo, tonumber(0)) guiSetVisible(logoo, true) showPlayerHudComponent("all", false) fadeCamera(true) setCameraMatrix(2906.0004882813, -2347.9750976563, 201.94299316406, 2906.9938964844, -2348.0361328125, 201.84664916992) sound = playSound("sound.mp3", true) local Timer = setTimer Timer(function() guiSetAlpha(logoo, tonumber(0.1)) end, 150, 1, true) Timer = setTimer Timer(function() guiSetAlpha(logoo, tonumber(0.2)) end, 250, 1, true) Timer = setTimer Timer(function() guiSetAlpha(logoo, tonumber(0.3)) end, 350, 1, true) Timer = setTimer Timer(function() guiSetAlpha(logoo, tonumber(0.4)) end, 450, 1, true) Timer = setTimer Timer(function() guiSetAlpha(logoo, tonumber(0.5)) end, 650, 1, true) Timer = setTimer Timer(function() guiSetAlpha(logoo, tonumber(0.6)) end, 740, 1, true) Timer = setTimer Timer(function() guiSetAlpha(logoo, tonumber(0.7)) end, 900, 1, true) Timer = setTimer Timer(function() guiSetAlpha(logoo, tonumber(0.-- s8) -->) end, 1000, 1, true) Timer = setTimer Timer(function() guiSetAlpha(logoo, tonumber(0.9)) end, 1800, 1, true) Timer = setTimer Timer(function() guiSetAlpha(logoo, tonumber(1)) Link to comment
TAPL Posted August 1, 2012 Share Posted August 1, 2012 المود مسروق ذا مود اختيار الشخصية حق سيرفري الهجولة يغلق. Link to comment
Recommended Posts