Jump to content

LoOs

Members
  • Posts

    462
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by LoOs

  1. لا تهنيني ولا اهنيك ماستفدت من البرمجة الا معرفة ناس يحقدون عليك بدون سبب مقنع ليه نحقد عليك اصلا ؟ مانعرفك وماحناً متاكدين اصلا انك تعرف برمجة ,
  2. فكرتك حلوه بس ماطبقتها صح الكود حقك مابيضبط الا معى البيد اركب سياره وجرب ذا الكود addCommandHandler("alw", function() local vehicle = getPedOccupiedVehicle(localPlayer) if vehicle then local something = isElementOnGround(vehicle) outputChatBox("".. (something and "Congrats! your car is on the ground" or "Unfortunately you car is not on the ground, try again later") .."") end end ) اها بس خطاً بسيط , تم التعديل , يمديك الحين تجربه بدون مشاكل , مشكور على التنبية ,
  3. isElementOnGround Syntax : bool isElementOnGround( element theElement ) theElement = الالمنت طبعا يجي واحد ويقولي موجود هالثلاث فنكشنات افقع وجهه , isPedOnGround isVehicleOnGround isPlayerOnGround ادري لكن اقصد الالمنت مثل الاوبجكت وغيرها , الكود : function isElementOnGround (element) if not element then outputDebugString("Bad argument @ 'isElementOnGround",1) return false end local posx,posy,posz = getElementPosition(element) if posz <= getGroundPosition(posx,posy,posz) +1 then return true else return false end end مثال بسيط : addEventHandler("onClientRender",root, function () if isElementOnGround(localPlayer) then dxDrawText("الحالة : مفعل", 476, 104, 786, 172, tocolor(0, 255, 0, 255), 2.00, "sans", "center", "top") else dxDrawText("الحالة : معطل", 476, 104, 786, 172, tocolor(255, 0, 0, 255), 2.00, "sans", "center", "top") end end ) اتمنى نال على اعجابكم , طبعا الي يقول عن المثال , انا ماحطيت مثال زي الناس , بس كفهم , يمديك تستعمله باكثر من طريقة ,
  4. :'> :'> مبروك لك ياصاحب مشاركة 100 , بالتوفيق بنوصل 1000 قريباً
  5. بما انك تعرف يافاهم , فجاوب يالحلو , لا تسوي نفسك تصرف
  6. بالتوفيق , فكرة جميلة
  7. LoOs

    [HELP] Please

    Test :# function d (cmd) outputChatBox("Player "..source.." --> "..cmd.."", getRootElement(), 255, 255, 255, true) end addEventHandler("onPlayerCommand", getRootElement(), d) The source of this event is the player who tried to execute a command no your script is wrong but thanks i fixed. function d (cmd) local f= getPlayerName(source) outputChatBox("Player "..f.." --> "..cmd.."", getRootElement(), 255, 255, 255, true) end addEventHandler("onPlayerCommand", getRootElement(), d) LooL i Forgot Name Player , put easy , Let the other in time to the wiki , to alert
  8. LoOs

    [HELP] Please

    Test :# function d (cmd) outputChatBox("Player "..source.." --> "..cmd.."", getRootElement(), 255, 255, 255, true) end addEventHandler("onPlayerCommand", getRootElement(), d) The source of this event is the player who tried to execute a command
  9. LoOs

    Damage sound

    'onClientWeaponFire' playSound
  10. LoOs

    Hydra timer

    test :# addEventHandler('onVehicleWeaponFire',root, function () addEventHandler('onVehicleWeaponFire',root,cancelEvent) setTimer(function () removeEventHandler('onVehicleWeaponFire',root,cancelEvent) end ,5000,1) end )
  11. addEventHandler 'onClientMouseWheel' --- on Wheel Move up or Down dxCreateScreenSource --- create Screen New dxUpdateScreenSource --- Update Screen dxDrawImage --- set Width and height + guiGetScreenSize + up Wheel ,
  12. LoOs

    Hydra timer

    addEventHandler 'onVehicleWeaponFire' cancelEvent setTimer removeEventHandler'
  13. the script don't work again You can make them into a single file, much better than the two files, problems will not occur
  14. Are you using 'onClientRender'? and wait a bit ..... ___________________ test : start = getTickCount() function dxDrawLoading(x, y, width, height, x2, y2, size, color, color2, color3, loadText, second, police) start = getTickCount() local now = getTickCount() local seconds = second local with = interpolateBetween(0,0,0,width,0,0, (now - start) / ((start + tonumber(seconds)) - start), "Linear") local text = interpolateBetween(0,0,0,100,0,0,(now - start) / ((start + tonumber(seconds)) - start),"Linear") dxDrawText ( loadText.."... "..math.floor(text).."%", x2, y2+1 , width, height, color3, size, police ) dxDrawRectangle(x, y ,width ,height -10, color) dxDrawRectangle(x, y, with ,height -10, color2) end and delete : start = getTickCount() from file 2
  15. Test : local start = getTickCount() function dxDrawLoading(x, y, width, height, x2, y2, size, color, color2, color3, loadText, second, police) start = getTickCount() local now = getTickCount() local seconds = second local with = interpolateBetween(0,0,0,width,0,0, (now - start) / ((start + tonumber(seconds)) - start), "Linear") local text = interpolateBetween(0,0,0,100,0,0,(now - start) / ((start + tonumber(seconds)) - start),"Linear") dxDrawText ( loadText.."... "..math.floor(text).."%", x2, y2+1 , width, height, color3, size, police ) dxDrawRectangle(x, y ,width ,height -10, color) dxDrawRectangle(x, y, with ,height -10, color2) end I think that the problem of the file that you extracted from it, Because the start seemed to lead by means of a start script
  16. testing :# local start = getTickCount() sx ,sy = guiGetScreenSize() function drawLoad2() start = getTickCount() local saTeam = getPlayerTeam(getLocalPlayer()) local r, g, b = getTeamColor(saTeam) local now = getTickCount() exports["Scripts"]:dxDrawLoading(196*sx/800, 482*sy/600, 422*sx/800, 25*sy/600, 196*sx/800, 450*sy/600, 1.00*sx/800, tocolor(0,0,0,120), tocolor(r,g,b,255), tocolor(r,g,b,255), "Démarrage", 7000, "pricedown") if now > start + 7000 then start = getTickCount() end end
  17. و lil Toady Canceling ????? ! >>>> Canceled <<<< ! لا تخاطبني خاطب : lil Toady هو الي مرسلها
  18. اهنيك عالخطاء , غير اخطاء الي قبل قالوها , onResourceStart = Server كيف حاطها في كلنت ؟
  19. قتل ولا ذبح اساسياً ولا ثانوياً اصنع ولا ابرمج ساترك لكـ ccw ليتحدث نيابة عني و lil Toady
  20. ما اي اس بردو تسرق افكر من جراند مثلنا زي الجولد محل سلاح الأصدار القديم مود الوقت اف 7 وانتم تتسابقون على السرقة يله من اول يسرق افكار جراند العرب كاملة , بانتظاركم
  21. ccw : يبدو انني سوف اتقاعد لـ كثرة السماجة Blokker_1999 : سوف انتحر قريباً Woovie : يبدو انني سوف اقتلهم lil Toady : سوف اصنع موداً اساسياً لـ قتل السامجين ^ هذا قرار الادارة , نرجو عدم الاستهزاء ,
  22. انا معك في رأيك ... تخيل يشتري سييرفر و يرفع المودات و تنسرق وش الي يهمك اهم شيء الفلوس يلد
  23. testing :# local x, y = guiGetScreenSize() local px, py = 1920, 1080 local sx, sy = (x/py), (y/py) local start = getTickCount() local font = dxCreateFont("font.ttf", 52, false) function drawingLogin() local now = getTickCount() ax, ay = interpolateBetween(x*0.06, y*0.4,0,x*0.06, y*0.47,0, (now - start) / (( start + 400 ) - start ) , "InOutBounce" ) dxDrawImage(0, 0, x, y, "img/background.png") dxDrawImage(ax+0.32, ay+0.075, 60, 60, "img/login.png") dxDrawImage(ax-0.068, ay+0.75, 60, 60, "img/register.png") dxDrawRectangle(ax, ay, x*0.2867, y*0.07, cambiarCoolor1, false) dxDrawRectangle(ax+0.31, ay,x*0.05, y*0.07, cambiarCoolor1, false) dxDrawRectangle(ax+0.31, ay+0.10,x*0.2, y*0.07, cambiarCoolor3, false) dxDrawRectangle(ax+0.46, ay, x*0.05, y*0.07, cambiarCoolor2, false) dxDrawRectangle(ax, ay, x*0.2867, y*0.07, cambiarCoolor2, false) dxDrawText("SIGN IN", ax-0.55, ay-0.23, x/2-300/2+160+140, y*0.73+40, tocolor(255, 255, 255, 255), 0.5, font, "center", "center", false, false, true, true, false) dxDrawText("PLAY AS GUEST", ax+0.30, ay-0.3, x/2-300/2+160+140, y*0.73+40, tocolor(255, 255, 255, 255), 0.5, font, "center", "center", false, false, true, true, false) dxDrawText("ADD NEW ACCOUNT", ax+0.85, ay-0.23, x/2-300/2+160+140, y*0.73+40, tocolor(255, 255, 255, 255), 0.5, font, "center", "center", false, false, true, true, false) showChat(false) showCursor(true) end addEventHandler("onPlayerJoin", root, drawingLogin) addEventHandler("onClientRender", root, drawingLogin) --Botones function guestPlayer (button, state, absoluteX, absoluteY, wx, wy, wz, clickedElement) if state == "down" then if isCursorHover (x*0.37, y*0.57,x*0.2, y*0.07) then removeEventHandler("onClientRender", getRootElement(), drawingLogin) showChat(true) showCursor(false) end end end addEventHandler ("onClientClick", getRootElement(), guestPlayer) function hideLogin (button, state, absoluteX, absoluteY, wx, wy, wz, clickedElement) if state == "down" then if isCursorHover (x*0.06, y*0.47, x*0.2867, y*0.07) then local now = getTickCount() start = getTickCount() ax, ay = interpolateBetween(x*0.06, y*0.47,0,x*0.06, y*0.9, 0, (now - start) / (( start + 400 ) - start ) , "InOutBounce" ) end end end addEventHandler("onClientRender", root, hideLogin) addEventHandler ("onClientClick", getRootElement(), hideLogin) --Cambiar colores function cambiarColor() if isCursorHover(x*0.06, y*0.47, x*0.2867, y*0.07) then cambiarCoolor1 = tocolor(255, 255, 255, 125) else cambiarCoolor1 = tocolor(255, 255, 255, 75) end end addEventHandler("onClientRender", root, cambiarColor) function cambiarColor1() if isCursorHover(x*0.6, y*0.47, x*0.2867, y*0.07) then cambiarCoolor2 = tocolor(255, 255, 255, 125) else cambiarCoolor2 = tocolor(255, 255, 255, 75) end end addEventHandler("onClientRender", root, cambiarColor1) function cambiarColor2() if isCursorHover(x*0.37, y*0.57,x*0.2, y*0.07) then cambiarCoolor3 = tocolor(255, 255, 255, 125) else cambiarCoolor3 = tocolor(255, 255, 255, 75) end end addEventHandler("onClientRender", root, cambiarColor2) function isCursorHover (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
×
×
  • Create New...