Jump to content

Mhmd.z

Members
  • Posts

    498
  • Joined

  • Last visited

Everything posted by Mhmd.z

  1. المفروض يسوي if sound then destroyElement(sound) else sound = playerSound("sound.mp3") end
  2. سوي اول ما الاعب يضغط الزر خليه يشيل كل الكلام وبعدها يحط الكلام الي تبيه .... textDestroyTextItem ( text )
  3. وش يقلك بالضبط ؟ + تأكد لو الصوره موجوده بالمكان الي انت محدده
  4. local x, y = guiGetScreenSize() function addDxText() dxDrawText("Text", (x - 300) / 1, (y - 350) / 1, 300, 350, tocolor(120, 255, 120, 150), 4, "default-bold", "center", "top", false, false, true, false, false) end addEventHandler("onClientPlayerWasted", root, function () addEventHandler("onClientRender", root, addDxText) setTimer(removeEventHandler, 5000, 1, "onClientRender", root, addDxText) end )
  5. يعني لو كان الماوس على زر التشغيل راح يشغل الاغنيه , لو كان على زر ايقاف الاغنيه راح يوقفها
  6. ناقص تحط كلمة جيرد ليست بجدول GUIEditor GUIEditor = { button = {}, staticimage = {}, checkbox = {}, label = {}, edit = {}, gridlist = {}, } local Interpolate = {} local sX, sY = guiGetScreenSize () local sizeY = sY * 0.03 local positionX = sX * 0.01 local r, g, b, a1, a2 = 131, 195, 254, 79, 79 local restangleX, restangleY = sX * 0.04, sY * 0.04 local showItemsLog_ = false local showItemsLod_ = true local Skins = { { "Saudi dress | ????? ??????? ", 46 }, { "Black dress | ????? ?????? ", 124 }, { "CJ | ?? ??", 0 }, } local mainTable = { { -3363.34082, -3146.86963, 5.75354 }, { -3361.39941, -3129.69287, 5.75354 }, { -3349.14819, -3117.84546, 5.75354 }, { -3355.51538, -3101.37817, 5.75354 }, { -3361.49097, -3183.07007, 5.75354 }, { -3349.14380, -3175.81006, 5.75354 }, --{ X, Z, Y },- } local aldayariTable = { { 1820.47192, 872.12341, 10.62148 }, { 1771.59448, 880.22327, 10.45102 }, { 1772.50061, 820.93781, 10.65572 }, { 1832.46057, 807.70935, 10.82031 }, --{ X, Z, Y },- } local alnakheelTable = { { 274.96768, 1990.04614, 17.64063 }, { 274.96768, 1990.04614, 17.64063 }, { 274.96768, 1990.04614, 17.64063 }, --{ X, Z, Y },- } local longTable = { { -3709.8203125, -2999.9025878906, 53.955368041992 }, { -3709.8203125, -2999.9025878906, 53.955368041992 }, { -3709.8203125, -2999.9025878906, 53.955368041992 }, { -3709.8203125, -2999.9025878906, 53.955368041992 }, --{ X, Z, Y },- } local Places = { { "Main Place | ???????", longTable }, { "AlDayari | ???????", aldayariTable }, { "AlTas| ?????", alnakheelTable }, { "SA7H| ???? ??????", alnakheelTable }, } function onEnter ( _, _, x, y ) if ( x >= sX * 0.16 and y >= sY * 0.65 and x <= ( sX * 0.16 + sX * 0.18 ) and y <= ( sY * 0.65 + sY * 0.06 ) ) then a1 = 255 elseif ( x >= sX * 0.16 and y >= sY * 0.75 and x <= ( sX * 0.16 + sX * 0.18 ) and y <= ( sY * 0.75 + sY * 0.06 ) ) then a2 = 255 else a1 = 79 a2 = 79 end end addEventHandler( 'onClientGUIClick', root, function() if GUIEditor.button[1] == source then if ( guiGetText ( GUIEditor.edit[1] ) ~= "" and guiGetText ( GUIEditor.edit[1] ) ~= " " ) then if ( guiGetText ( GUIEditor.edit[2] ) ~= "" and guiGetText ( GUIEditor.edit[2] ) ~= " " ) then if ( string.len ( guiGetText ( GUIEditor.edit[1] ) ) >= 3 ) then if ( string.len ( guiGetText ( GUIEditor.edit[2] ) ) >= 4 ) then if ( guiCheckBoxGetSelected ( GUIEditor.checkbox[1] ) ) then remeber = true else remeber = false end if ( guiCheckBoxGetSelected ( GUIEditor.checkbox[2] ) ) then destroyElement ( sound ) end triggerServerEvent("onRegister", localPlayer, guiGetText ( GUIEditor.edit[1] ), guiGetText ( GUIEditor.edit[2] ), remeber) else outputChatBox("* Password should be at least 4 characters long !", 255, 0, 0, true, 5) end else outputChatBox("* Username should be at least 3 characters long !", 255, 0, 0, true) end else outputChatBox("* Please Write Password !", 255, 0, 0, true) end else outputChatBox("* Please Write Username !", 255, 0, 0, true) end elseif GUIEditor.button[2] == source then if ( guiGetText ( GUIEditor.edit[1] ) ~= "" and guiGetText ( GUIEditor.edit[1] ) ~= " " ) then if ( guiGetText ( GUIEditor.edit[2] ) ~= "" and guiGetText ( GUIEditor.edit[2] ) ~= " " ) then if ( guiCheckBoxGetSelected ( GUIEditor.checkbox[1] ) ) then remeber = true else remeber = false end if ( guiCheckBoxGetSelected ( GUIEditor.checkbox[2] ) ) then if ( isElement ( sound ) ) then destroyElement ( sound ) end end triggerServerEvent("onLogin", localPlayer, guiGetText ( GUIEditor.edit[1] ), guiGetText ( GUIEditor.edit[2] ), remeber) else outputChatBox("* Please Write Password !", 255, 0, 0, true) end else outputChatBox("* Please Write Username !", 255, 0, 0, true) end end end ) --------------------------- function loadingSystem () dxDrawRectangle ( sX * 0.41, sY * 0.97, positionX, sY * 0.02, tocolor(255, 255, 0, 255), true ) dxDrawText ( "loading...", sX * 0.69, sY * 1, sX * 0.42, sY * 0.10, tocolor(255, 0, 255, 255), 1.30, "default-bold", "center", "center", false, false, true, false, false ) end function loginSystem() GUIEditor.staticimage[1] = guiCreateStaticImage(131, 56, 613, 503, ":guieditor/images/SSSS.png", false) guiSetVisible (GUIEditor.staticimage[1], false) GUIEditor.edit[1] = guiCreateEdit(135, 211, 124, 30, "", false, GUIEditor.staticimage[1]) guiSetAlpha(GUIEditor.edit[1], 0.58) guiSetVisible ( GUIEditor.edit[1], false ) GUIEditor.edit[2] = guiCreateEdit(131, 285, 123, 27, "", false, GUIEditor.staticimage[1]) guiSetAlpha(GUIEditor.edit[2], 0.58) guiSetVisible ( GUIEditor.edit[2], false ) GUIEditor.button[1] = guiCreateButton(80, 414, 91, 64, "", false, GUIEditor.staticimage[1]) guiSetAlpha(GUIEditor.button[1], 0.00) GUIEditor.button[2] = guiCreateButton(214, 414, 91, 64, "", false, GUIEditor.staticimage[1]) guiSetAlpha(GUIEditor.button[2], 0.00) GUIEditor.label[1] = guiCreateLabel(456, 210, 112, 44, "", false, GUIEditor.staticimage[1]) guiLabelSetHorizontalAlign(GUIEditor.label[1], "center", false) guiLabelSetVerticalAlign(GUIEditor.label[1], "center") GUIEditor.checkbox[1] = guiCreateCheckBox(150, 318, 118, 32, "????? !", true, false, GUIEditor.staticimage[1]) guiSetProperty(GUIEditor.checkbox[1], "NormalTextColour", "FFF87806") guiSetVisible ( GUIEditor.checkbox[1], false ) end function startLoginSystem () local now = getTickCount() local elapsedTime = now - Interpolate.startTime local duration = Interpolate.endTime - Interpolate.startTime local progress = elapsedTime / duration local _, height, _ = interpolateBetween ( 0, Interpolate.startSize[1], 0, 0, Interpolate.endSize[1], 0, progress, "Linear") sizeY = height if now >= Interpolate.endTime then removeEventHandler ( "onClientRender", root, startLoginSystem ) addEventHandler ( "onClientCursorMove", root, onEnter ) addEventHandler ( "onClientClick", root, onClick ) showItemsLog_ = true guiSetVisible ( GUIEditor.staticimage[1], true ) guiSetVisible ( GUIEditor.edit[1], true ) guiSetVisible ( GUIEditor.edit[2], true ) guiSetVisible ( GUIEditor.checkbox[1], true ) triggerServerEvent ( "onGetData", localPlayer ) showCursor ( true ) guiSetInputEnabled ( true ) end end function stopLoginSystem () local now = getTickCount() local elapsedTime = now - Interpolate.startTime local duration = Interpolate.endTime - Interpolate.startTime local progress = elapsedTime / duration local _, height, _ = interpolateBetween ( 0, Interpolate.startSize[1], 0, 0, Interpolate.endSize[1], 0, progress, "Linear") setTimer ( function () Interpolate.startTime = getTickCount () Interpolate.startSize = { restangleX, restangleY } Interpolate.endSize = { sX * 0.26, sY * 0.70 } Interpolate.endTime = Interpolate.startTime + 4000 addEventHandler("onClientRender", root, SpawnSystem) addEventHandler("onClientRender", root, startSpawnSystem) ped = createPed ( 46, 2021.6166992188,1007.6680908203 ,10.1 ,370 ) end, 11000, 1 ) end addEventHandler( 'onClientGUIClick', root, function() if GUIEditor.button[1] == source then outputChatBox("Welcome To The Server", 255, 0, 0) end end ) function startLoadingSystem () local now = getTickCount() local elapsedTime = now - Interpolate.startTime local duration = Interpolate.endTime - Interpolate.startTime local progress = elapsedTime / duration local width, _, _ = interpolateBetween ( Interpolate.startPosition[1], 0, 0, Interpolate.endPosition[1], 0, 0, progress, "Linear") positionX = width if now >= Interpolate.endTime then removeEventHandler ( "onClientRender", root, startLoadingSystem ) removeEventHandler ( "onClientRender", root, loadingSystem ) sound = playSound ( "ss.mp3" ) setCameraMatrix ( 2041.28455, -1458.69348, 29.88905 ) fadeCamera ( true, 5 ) setTimer ( function () Interpolate.startTime = getTickCount () Interpolate.startSize = { sY * 0.03 } Interpolate.endSize = { sY * 0.80 } Interpolate.endTime = Interpolate.startTime + 3000 addEventHandler("onClientRender", root, loginSystem) addEventHandler("onClientRender", root, startLoginSystem) end, 6000, 1 ) end end --------------------------- addEventHandler("onClientResourceStart", resourceRoot, function() window = guiCreateWindow(0, 164, 203, 350, "?????????? ?????????", false) guiWindowSetSizable( window, false) guiSetVisible ( window, false ) GUIEditor.button[3] = guiCreateButton(37, 313, 122, 27, "- * Spawn * -", false, window) guiSetVisible ( GUIEditor.button[3], false ) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFFF0000") GUIEditor.gridlist[1] = guiCreateGridList(10, 40, 184, 120, false, window) guiGridListAddColumn(GUIEditor.gridlist[1], "#", 0.5)
  7. client لو تبي تستعمل ب كلنت "onClientResourceStart" playSound server لو كنت تبي تستعمل ب سيرفر "onPlayerJoin" triggerClientEvent playSound
  8. يعني عند الفنكشن الي مستعمل فيه يوم الاعب يضغط اف 1, ضيف ذا التعريف if getElementDimension(localPlayer) ~= 30 then ذا هو تحقق لو ما كان الاعب موجود بالعالم الوهمي الي انت تبيه
  9. أخي العزيز , هل تسمح بعدم كتابة اسمي في ردودك المقبله, يستطيع صاحب الموضوع توضيح الفكره او تجربة الفنكشن الي اعطيناه اياه, وشكرا
  10. استخدم الداتا, اول ما الاعب يدخل الماركر يعطيه داتا , ويوم يخرج من الماركر يشيل الداتا, وبعدها روح للمود الي فيه ذي الازرار وحط تعريف لو ما كان معه الاعب الداتا يشتغل الزر, يعني رح تستعمل setElementData getElementData او تقدر تضع تعريف لو كان الاعب بذا العالم الوهمي ما يقدر يستعمل الزر
  11. طيب خذ ذا, بس عليك تعدل احداثيات المنطقه local theShape = createColRectangle(X1, Y1, X2, XY) addEventHandler("onResourceStart",resourceRoot, function() for i , v in ipairs (getElementsByType('vehicle')) do if isElementWithinColShape(v, theShape) then setElementFrozen(v, true) end end end )
  12. تقصد انك صانع السيارات بملف .map ?
  13. انت مسوي السيارات عن طريق جدول ولوب؟ لو مسويها بجدول تقدر تعطي السيارات كلها داتا باسم VehiclesResource وبعدها تسوي addEventHandler('onResourceStart',resourceRoot, function() for i , v in ipairs (getElementsByType('vehicle')) do if getElementData(v, "VehiclesResource") then setElementFrozen(v,false) end end end )
  14. اول شيئ لازم تجيب كل الاعبين الموجودين بالسيرفر, وتجيب اسمائهم عن طريق لوب, بالنسبه ل ارسال فلوس للاعب لازم تجيب الاعب من اسمه, للتوضيع اكثر هذي الفنكشنات الي راح تستعملها "onClientResourceStart" -- تستخدم اللوب guiGridListAddRow--تضيف الروات guiGridListSetItemText--تضع فيه اسماء كل الاعبين الي باللوب ذي مشان تجيب اسماء كل الاعبين, اما مشان ترسل فلوس للاعب الي محدده لازم تستعمل guiGridListGetSelectedItem--تجيب الكلام الي محدده ا guiGridListGetItemText--راح تجيب اسم الاعب الي محدده getPlayerFromName--راح تجيب الاعب من اسمه الي محدده بالجيرد ليست
  15. تقدر تعطي حساب الاعب داتا , ويوم تبي تشيلها منه عطيه نفس الداتا ولكن بقيمة false وحدد بس حد يكتب بالعاجل لو كان معه الداتا ذي يقدريكتب بالعاجل setAccountData getAccountData طريقة كثير سهله, بالنسبه للي يقولون انه الداتا راح تأثر, ما اتوقع انها تسوي تأثير
  16. انت وش وظيفتك هنا يا شسمك ؟ المفروض الاعب يحاول , عطيناه المبدأ من الفكره وخليه يحاول يعدل ع اكواده ! بعدين مسوي فيها مبرمج ومستوا متطور؟ انت ما تعرفني مستواي متطور اكثر منك لكن ما احب ادخل نفسي بمواضيع كذه , لآنه بعض الناس ما تفهم وبعضها بس للتعليق الي ما منه فايده
  17. انا الي فهمته انك تبي تشيل الجيت باك من الاعب بعد 5 دقائق من بعد ما يضغط الزر, ذا مثال انت عدل ع اكوادك --client addEventHandler("onClientGUIClick", root, function () if source == button then setTimer(function() triggerServerEvent("After5Mins_removePlayerJetPack", localPlayer) end, 5*60*1000, 1) end end ) --server addEvent("After5Mins_removePlayerJetPack", true) addEventHandler("After5Mins_removePlayerJetPack", root, function () removePlayerJetPack(source) end )
  18. طيب شيل التايمر فنكشن ما اتوقع في منه فايده ؟ وشيل ال removeEventHandler
  19. ايش ذا setTimer( function() removeEventHandler( 'onClientRender', root, render ) addEventHandler( 'onClientRender', root, render ) سوي اغلاق للتايمر فنكشن وحط الوقت الي تبيه, وشيل removeEventHandler
  20. addEventHandler( 'onClientGUIClick', function() if(source == GUIEditor.button[1]) then if guiGetText (GUIEditor.edit[1]) ~= '' then sound = playSound3D(" ", 373.14, -125.21, 1001, true) end elseif(source == GUIEditor.button[2]) then stopSound(sound) end end )
  21. المره الجايه لا تفهم غلط بكون احسن
  22. هو يقول يبي الي يقف جنبه يسمع الاغنيه
×
×
  • Create New...