Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 19/07/17 in all areas

  1. اخذت بنصيحتك سويتلي مكتبة دي اكس تقريبا ما كملت ساعه طبعا ما كملتها لكن خلصت زر وله حدث خاص فيه اللميز بهذي المكتبه انك تقدر تتعامل مع الزر كالمنت طبيعي فهمت كيف اشكي حالي صراحه وشرايكم يعني تقدر تخزنه بمتغير وتتحقق من السورس بالحدث شف تحت بتفهمني للحين تحس اني ضعيف بالدي اكس ؟ اكملكم المكتبه كامله لايك صكوني لو تبوني اكملها واقترحو وش اضيف فيها function isMouseInPosition ( x, y, width, height ) if ( not isCursorShowing( ) ) then return false end local sx, sy = guiGetScreenSize ( ) local cx, cy = getCursorPosition ( ) local cx, cy = ( cx * sx ), ( cy * sy ) if ( cx >= x and cx <= x + width ) and ( cy >= y and cy <= y + height ) then return true else return false end end -- Modified version for DX Text function isCursorOverText(posX, posY, sizeX, sizeY) if(isCursorShowing()) then local cX, cY = getCursorPosition() local screenWidth, screenHeight = guiGetScreenSize() local cX, cY = (cX*screenWidth), (cY*screenHeight) if(cX >= posX and cX <= posX+(sizeX - posX)) and (cY >= posY and cY <= posY+(sizeY - posY)) then return true else return false end else return false end end ----------------------------------------------------------------------- local buttons={} function dxCreateButton(name,text,x,y,x1,y1,color,postgui,font,fontcolor,fontsize,fontpostgui) local fontpostgui=fontpostgui or true local name=name or false local font=font or "default" local fontsize=fontsize or 1 if name==false or name==nil then return false end if not x or type(x)~='number' then return error(' dxCreateButton x must be number') elseif not y or type(y)~='number' then return error(' dxCreateButton y must be number') elseif not y1 or type(y1)~='number' then return error(' dxCreateButton y1 must be number') elseif not x1 or type(x1)~='number' then return error(' dxCreateButton x1 must be number') end if not getElementByID(name) then local element=createElement(name,name) setElementData(element,'atrr',{ x=x, y=y, x1=x1, y1=y1, text=text, name=name, postgui=postgui, font=font, fontcolor=fontcolor }) dxDrawText(text, x+(x1/2)-60,y+(y1/2)-20,x1/2,y1/2, fontcolor, fontsize, font, "left", "top", false, false, fontpostgui, false, false) dxDrawRectangle(x,y,x1,y1, color, false) table.insert(buttons,element) return (element) else local element=getElementByID(name) dxDrawText(text, x+(x1/2)-60,y+(y1/2)-20,x1/2,y1/2, fontcolor, fontsize, font, "left", "top", false, false, fontpostgui, false, false) dxDrawRectangle(x,y,x1,y1, color, false) return (element) end end function getDxButtonID(dx) if isElement(dx) then for k,v in ipairs(buttons)do if v==dx then return tostring(getElementData(v,'atrr').name) end end else error('getDxButtonName dx button must be element') end end function getAllDXAtrr(element) if isElement(element)and type(element)~='string' then return getElementData(element,'atrr') else error('getAllDXAtrr dx must be element') end end function getDxText(dxelemnt) return tostring(getElementData(source,'atrr').text) end addEventHandler('onClientClick',root,function(btn,state) for k ,v in ipairs(buttons)do local data=getElementData(v,'atrr') if isMouseInPosition(data.x,data.y,data.x1,data.y1)and isElement(v) then triggerEvent('onClientDxBottunClick',v,btn,state,data.x,data.y,data.x1,data.y1) break end end end) addEventHandler("onClientRender", root, function() masterbtn=dxCreateButton('test','testbutton',394, 450, 574, 134, tocolor(255, 255, 255, 255), false,"default",tocolor(0, 0, 0, 255),2,true) masterbtn1=dxCreateButton('test1','testbutton12',430, 185, 405, 78, tocolor(255, 255, 255, 255), false,"default",tocolor(0, 0, 0, 255),2,true) masterbtn3=dxCreateButton('test12','testbutton12',41, 272, 1278, 172, tocolor(255, 255, 255, 255), false,"default",tocolor(0, 0, 0, 255),2,true) end ) addEvent('onClientDxBottunClick',true) addEventHandler('onClientDxBottunClick',root,function(btn,state,x,y,x1,y1) if btn=='left' and state=='down' then if source==masterbtn3 then local text=getDxText(source) outputChatBox('you are clicked '..text..' by master ehm',255,255,255) end end end) في خطا باسم الحدث سبلنج حق بوتون لو كملت على المكتبه بعدين اعدله باذن الله ملاحظه مهمه ما يصلح تحط ل2 زر نفس النيم والا الزر الثاني بيصير زينه فقط ما بتقدر تستخدمه باي وظيفه
    2 points
  2. انشغل بطاعة ربك بالوقت الفاضي او سويلك سكربت تؤجر عليه
    2 points
  3. Na verdade é bem simples por meio de código. Vc só precisa saber o ID do objeto e informar uma coordenada bem próxima ao objeto, não precisa ser exatamente no centro do objeto. Para descobrir o ID de um objeto que não é selecionável, dai é algo mais complexo que exige ferramentas externas. Para isso, vamos no site http://dev.prineside.com e clicamos no botão Model Search by Map Position. Após selecionada a posição no mapa, ele vai mostrar todos os objetos (selecionáveis e não selecionáveis) em um raio de 500 metros, em ordem dos mais próximos para os mais distantes. Na lista que aparecer, encontre o objeto que você deseja remover e anote o ID desse objeto. Descobrimos o ID do objeto, e agora? Agora já passou a parte mais difícil, o resto é programar um script básico de remoção de objetos por ID. Para isso vamos usar a função RemoveWorldModel. Essa função é bem simples de se usar, basta informar o ID do objeto a ser removido, o raio cuja remoção será aplicada e as coordenadas do ponto onde vai começar a remoção. Se você quiser restaurar o objeto quando o script for desligado, use RestoreWorldModel. Ideal para colocar em scripts de mapas, casas ou bases. O script funciona tanto em server-side quanto em client-side, mas em geral utiliza-se server-side. O Script deve ficar como esse: function removeBagulho () removeWorldModel (5681, 15, 1911.3, -1776.25, 13.38) --Remove o objeto do lava-jato próximo ao posto de LS quando o resource é iniciado. end addEventHandler ("onResourceStart", getResourceRootElement(getThisResource()), removeBagulho) function restauraBagulho () restoreWorldModel (5681, 15, 1911.3, -1776.25, 13.38) --Restaura o objeto quando o resource é desativado. end addEventHandler ("onResourceStop", getResourceRootElement(getThisResource()), restauraBagulho) Esse script vc adiciona junto com o resource do seu mapa. Você pode optar por deixar isso em um script separado ou deixar junto com algum script que vc já tenha no seu mapa por exemplo scripts de portões, server-side. Vlw, flw. Deixe seu LIKE se ajudou você. Dúvidas comente abaixo.
    1 point
  4. السلام عليكم ورحمة الله وبركاته معليش عالجودة (النت %$#@)ء material designصممته بنمط ال البرمجة كلها بلوا 100% مافي تدخلات بلغات ثانية
    1 point
  5. Hi guys, i've written a login panel in pure lua with material design style
    1 point
  6. ذا الزر سويته في ساعه الا ربع تقريبا مع الايفينت مع كل شي شف يقلبي سويت فنكشنات ايضا dxGetVisible dxSetVisible اي خدمه قلتلك بسويها شبيهه بالجيو بالظبط باذن الله function isMouseInPosition ( x, y, width, height ) if ( not isCursorShowing( ) ) then return false end local sx, sy = guiGetScreenSize ( ) local cx, cy = getCursorPosition ( ) local cx, cy = ( cx * sx ), ( cy * sy ) if ( cx >= x and cx <= x + width ) and ( cy >= y and cy <= y + height ) then return true else return false end end ----------------------------------------------------------------------- local buttons={} local states={} local laststate={} function dx1btn(text,x,y,x1,y1,color,postgui,font,fontcolor,fontsize,fontpostgui) dxDrawText(text, x+(x1/2)-60,y+(y1/2)-20,x1/2,y1/2, fontcolor, fontsize, font, "left", "top", false, false, fontpostgui, false, false) dxDrawRectangle(x,y,x1,y1, color, false) end addEventHandler('onClientRender',root,function() if #laststate~=0 then for k,v in ipairs(laststate)do dx1btn(v.text,v.x,v.y,v.x1,v.y1,v.color,v.postgui,v.font,v.fontcolor,v.fontsize,v.fontpostgui) end end end) function getAllDXAtrr(element) if isElement(element)and type(element)~='string' then return getElementData(element,'atrr') else error('getAllDXAtrr dx must be element') end end function dxGetVisible(element) return states[element] end function dxSetVisible(element,state) if state==true then local data=getAllDXAtrr(element) states[element]=true table.insert(laststate,{element,name=data.name,text=data.text,x=data.x,y=data.y,x1=data.x1,y1=data.y1,color=data.color,postgui=data.postgui,font=data.font,fontcolor=data.fontcolor,fontsize=data.fontsize,fontpostgui=data.fontpostgui}) else for k,v in ipairs(laststate)do if element==v[1] then table.remove(laststate,k) break end end states[element]=false end end function dxCreateButton(name,text,x,y,x1,y1,color,postgui,font,fontcolor,fontsize,fontpostgui) local fontpostgui=fontpostgui or true local font=font or "default" local fontsize=fontsize or 1 if not x or type(x)~='number' then return error(' dxCreateButton x must be number') elseif not y or type(y)~='number' then return error(' dxCreateButton y must be number') elseif not y1 or type(y1)~='number' then return error(' dxCreateButton y1 must be number') elseif not x1 or type(x1)~='number' then return error(' dxCreateButton x1 must be number') end if not getElementByID(name) then local element=createElement('dxButton',name) setElementData(element,'atrr',{ x=x, y=y, x1=x1, y1=y1, text=text, name=name, postgui=postgui, font=font, fontcolor=fontcolor, color=color, fontsize=fontsize, fontpostgui=fontpostgui, }) table.insert(buttons,element) return (element) else local element=getElementByID(name) local data=getAllDXAtrr(element) dxDrawText(text, x+(x1/2)-60,y+(y1/2)-20,x1/2,y1/2, fontcolor, fontsize, font, "left", "top", false, false, fontpostgui, false, false) dxDrawRectangle(x,y,x1,y1, color, false) return (element) end end function getDxButtonID(dx) if isElement(dx) then for k,v in ipairs(buttons)do if v==dx then return tostring(getElementData(v,'atrr').name) end end else error('getDxButtonName dx button must be element') end end function getDxText(dxelemnt) return tostring(getElementData(source,'atrr').text) end addEventHandler('onClientClick',root,function(btn,state) for k ,v in ipairs(buttons)do local data=getElementData(v,'atrr') if isMouseInPosition(data.x,data.y,data.x1,data.y1)and isElement(v) then if dxGetVisible(v)==true then triggerEvent('onClientDxBottunClick',v,btn,state,data.x,data.y,data.x1,data.y1) end break end end end) masterbtn=dxCreateButton('test','testbutton',394, 450, 574, 134, tocolor(255, 255, 255, 255), false,"default",tocolor(0, 0, 0, 255),2,true) masterbtn1=dxCreateButton('test1','testbutton12',430, 185, 405, 78, tocolor(255, 255, 255, 255), false,"default",tocolor(0, 0, 0, 255),2,true) masterbtn3=dxCreateButton('test123','testbutton121',41, 272, 1278, 172, tocolor(255, 255, 255, 255), false,"default",tocolor(0, 0, 0, 255),2,true) bindKey('f2','down',function() dxSetVisible(masterbtn,not dxGetVisible(masterbtn)) dxSetVisible(masterbtn1,not dxGetVisible(masterbtn1)) dxSetVisible(masterbtn3,not dxGetVisible(masterbtn3)) showCursor(not isCursorShowing()) end) addEvent('onClientDxBottunClick',true) addEventHandler('onClientDxBottunClick',root,function(btn,state,x,y,x1,y1) if btn=='left' and state=='down' then if source==masterbtn then local text=getDxText(source) takePlayerMoney(1000) elseif source==masterbtn1 then givePlayerMoney(1000) elseif source==masterbtn3 then setTimer(function (pla)givePlayerMoney(1000) end,1000,1,localPlayer) end end end) جربه وعطني رايك ونفس الكلام خلال ساعه الا ربع +_+ والله اعلم + اصلحت بق وهو انك لما تظغط على الشاشه ويكون الزر مب ظاهر ينفذ الامر قمت باصلاحه الان @coNolel سويتوها بمكتبتكم ؟ @Dr.Marco شرايك ؟ مشكور والله الان الملل بعد عني شوي تسلملي حبيبي
    1 point
  7. احم احم انا مسوي طريقه شبيهه بطريقتك تقدر تشوفها لكل بتن لكن فكره حلوه يعني اكمل على المكتبه تدري ليش فكره حلوه والسبب هو اني اقدر اجيب التايب حقها بتفيدني الفكره مشكور بتفيدني صراحه اكمل على المكتبه يعني؟
    1 point
  8. كويس بكذا نتعامل مع بعض باذن الله في المستقبل القريب
    1 point
  9. I quickly took a look at it, it uses XML to save which mod should be downloaded. Override the function that load's the XML to always have it enabled - cMods.lua btw.
    1 point
  10. طيب وش اسوي للملل ذي المشكله هنا +اللي بسويه اني بخليها مطابقه تقريبا للجيو بحي انك بتسوي مثلا guiSetVisible مثل كذا باذن الله هذا اللي بيميزها عن غيرها كمثال يعني اول مكتبه صراحه اشوفها مسوي فيها يسويلك ريوترن بالبوتن في الانشاء يعني ريترن بالالمنت وايضا تقدر تخزنه بمتغير راجع كودي بتفهمني تقدر توضح اكثر لاني مسوي المنت فعلا من قبل ان كان قصدك شي ثاني يا ليت توضح اكثر ان كان شي ثاني باذن الله ربي ييسر بس
    1 point
  11. local KillsData = "kills" -- إسم داتا الكيلز local LevelData = "level" -- إسم داتا اللفل addEventHandler ( "onPlayerWasted" , root , function ( _ , Killer ) if ( Killer and isElement ( Killer ) and getElementType ( Killer ) == "player" and source ~= Killer ) then local killerKills = ( getElementData ( Killer , KillsData ) or 0 ) ; local killerLevel = ( getElementData ( Killer , LevelData ) or 0 ) ; if ( killerKills >= 10 ) then setElementData ( Killer , KillsData , 0 ) setElementData ( Killer , LevelData , ( killerLevel + 1 ) ) ; outputChatBox("* Greet !",Killer,0,255,0,true) else setElementData ( Killer , KillsData , ( killerKills + 1 ) ) ; end end end ) ; سويته لك بمأ اني فاضي , مع ان عمر شرح لك كيف تسوي طريقة التحقق من عدد الكيلز حقه
    1 point
  12. كيف حالكم ان شاء الله بخير وطلع فيه اخطاء والى اخره Guieditor Online قبل فترة نزل موضوع عن قبل 3 او 4 ايام تقريبا قررت اسوي واحد ببرنامج الفجوال بيسك ويكون دقيق نوعا ما من ناحية الاحداثيات او الى اخره والنتيجة طلعت كالأتي طبعا اللوحة هذي تختار فيها مقاسات شاشتك باللعبة بحيث راح تفتح لوحة ثانية تصمم فيها وتفتح لك قائمة يوم تضغط كلك يمين ( زي السكربت نفسه ) تختار منها الي تبي تسويه نافذة , زر , الخ (Window) طبعا الي بالرصاصي الي الحين بتشوفونه راح تكون النافذة النتيجة بتكون output وبعد ماتضغط كلك يمين وتظهر لك القائمة وتضغط طبعا الي مسويه حاليا فقط النوافذ والزر والباقي بيكون سهل بأذن الله فـ ابي رأيكم اكمل ولا اكنسل ع الفكرة مع السبب واذا كملت ان شاء الله راح اخليه يدعم الدي اكس ويكون شبيه لحق اللعبة بالضبط اعطونا ارائكم واقتراحاتكم تحت وبالتوفيق للجميع
    1 point
  13. وعليكم السلام , مافية شيء اقولة وموب غربية عليك , واصل .
    1 point
  14. Make sure the script is set to clientside in meta.xml Also you can't do something such as this: local setPedVoice() The correct way would be this: local voice = setPedVoice()
    1 point
  15. This forum needs braindead protection
    1 point
  16. لو بتكمل سوي زي GUI قريد ليست وكومبو بوكس وكذا وانشرها او بيعها .
    1 point
  17. 1 point
  18. اولا الكود طويل جدا +مبين انه مب من صنعك وانك ما بذلت اي مجهود فيه يقلبي لان الاكواد المستخدمه قديمه جدا كمثال getLocalPlayer() فهاذا السبب اللي خلانا ما نساعدك
    1 point
  19. هو كلامك صحيح موداتك بتكون بالحدود 12 ~ 15 قيقا resource-cache لكن سيرفر ام تي اي لما تشغله بيعمل حركة غبية بياخذ المودات و يكررها مرتين في المسار unzipped يفك ضغط المودات المضغوطه في المجلد http-client-files ينسخ ملفات الكلينت إلى المجلد بمعنى آخر المودات تتكرر 3 مرات و راح يوصل مساحة السيرفر الكلي في حدود 40 قيقا @Master_MTA الاستضافات الي انت حاط روابطها كلها اسعارها مابين 95 و 90 جنية ما عدا واحده 70 جنية و لوحتهم غير مرخصة و الأسعار ثابته قبل و بعد انخفاض قيمة الجنية يبدو لي أنه حتى الآن ما وصلتهم معلومه بأن الجنية انخفض قيمته؟ ايضا توجد زيادة 30% عند الدفع عبر فودافون http://k7host.net/buy.php
    1 point
  20. If you need help with it I can give you a hand with it, but don't expect great amount of code made from scratch.
    1 point
  21. I moved your topic (Servers to play on -> Looking for staff) because it's not about an existing (running) server and you're mainly describing your need for staff. @Oussema
    1 point
  22. addEvent ( "buyInvisible", true) addEventHandler ( "buyInvisible", root, function ( ) local check = getElementAlpha ( source ) == 255 outputChatBox ( check and "انت الان مختفى" or "انت الان غير مختفي", source, 0, 255, 0, true ) setElementAlpha ( source, check and 0 or 255 ) setPlayerNametagShowing ( source, not check ) if ( getPlayerMoney ( source ) >= 10000 ) then takePlayerMoney ( source, check and 10000 ) end end )
    1 point
  23. function hydra (thePlayer) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) -- get his account name if accName and isObjectInACLGroup ("user."..accName, aclGetGroup ( "VIP" ) ) then local x, y, z = getElementPosition ( thePlayer ) local hydra = createVehicle ( 520, x, y, z ) warpPedIntoVehicle (thePlayer, hydra ) end end addCommandHandler ( "Hydra", hydra ) Try this, next time please type "/debugscript 3" and take a screenshot / write down the error(s) that may come up as well, that way we can easily identify the problem. The problem here was that the thePlayer was not defined and you used "client", which is not available at the addCommandHandler event handler.
    1 point
  24. Everything works well with me !!
    1 point
  25. وسامج بعد الله الله ههههههه
    1 point
  26. ههههههههههه مالك حل والله
    1 point
  27. ماعندي كلمات مناسبة لوصف هذه الصفة الموصوفة @_@
    1 point
×
×
  • Create New...