Jump to content

Master_MTA

Members
  • Posts

    3,389
  • Joined

  • Last visited

  • Days Won

    55

Everything posted by Master_MTA

  1. السؤال هو وش الاكواد اللي احتاجها السؤال هو وش الاكواد اللي احتاجها +اخوي الصراحه ما فهمت حاولت افهم الكود لكن ما عرفت طريقة استخدام هذا الايفينت لو تعطيني مثال اكون شاكر
  2. السلام عليكم شباب كيف الحال اليوم بغيت اسال عن شي وهو انو لما اللاعب يفوز في سيرفر الشوتر او يخسر يجيه بعض النقاط وبعض النقود وطبعا النقاط والنقود تختلف من مركز لاخر يعني مثلا الاول ياخذ 100$ وياخذ 20 نقطه اما الثاني ياخذ 90$ و 19 نقطه وهكذا
  3. السلام عليكم شباب اليوم عندي استفسار ابي لما اللاعب ياخذ نايترو مره يخلص من الي اجيبها من الادت ماب قصدي اللي تجي بمابات الريس والكلام ذا ابيه لما ياخذها النايترو يجي مره وحده ويخلص ابي اضيف الامر على الكود ذا لوو تسمحو توضحو اكون شاكر واسف على الازعاج -------------------------------- -- by: x#Diego -------------------------------- local x, y = guiGetScreenSize() addEventHandler("onClientVehicleEnter", root, function() addEventHandler("onClientRender", root, nitro) end ) function nitro() playerV = getPedOccupiedVehicle(localPlayer) playerN = getVehicleNitroLevel(playerV) if getVehicleUpgradeOnSlot(playerV,8) then dxDrawRectangle(x/500, y/1.1, x/200, y/-1.5*playerN, tocolor(62,157,225,255)) else end end addEventHandler("onClientVehicleExit", root, function() removeEventHandler("onClientRender", root, nitro) end ) -----------------------------------Funciones utiles :'v--------------------------------------------- function dxDrawEmptyRec(startX, startY, endX, endY, color, width, postGUI) dxDrawLine ( startX, startY, startX+endX, startY, color, width, postGUI ) dxDrawLine ( startX, startY, startX, startY+endY, color, width, postGUI ) dxDrawLine ( startX, startY+endY, startX+endX, startY+endY, color, width, postGUI ) dxDrawLine ( startX+endX, startY, startX+endX, startY+endY, color, width, postGUI ) end ----------------------------------------------------------------------------------------------------
  4. اخوي بالله لو تقدر تحط بس الاحداثيات بالله لانها مو زابطه معي الصراحه
  5. زبط اخوي كنت ما حطيت كود الوظيفه فعلا مشكور
  6. يب اخوي انا مشغل المود بسيرفر شوتر انا افضل اخليه لما المود يشتغل الايفينت لكن معرف كيف بالكلنت
  7. اوكيه اخوي الحين فهمت بس وش الغلط local screenWidth, screenHeight = guiGetScreenSize( ) local stopAngle = 0 addEventHandler( "onClientRender", root, function ( ) if ( getPedOccupiedVehicle ( localPlayer ) ) then local hp = getElementHealth ( getPedOccupiedVehicle ( localPlayer ) ) if ( hp >= 1000 ) then State = 360 else State = hp / 3 - 70 end dxDrawCircle( screenWidth / 5, screenHeight / 5, nil, nil, nil, nil, State ) end end ) ; والميتا <meta> <script src="scorefps_client.lua" type="client"/> </meta>
  8. اخوي ما يظهر شي مثلا شلت 2 وحطيت خمسه للتحكم بالارتفاع وكذا
  9. يعني اخوي فقط اغير nil بالاحداثيات ويزبط +مشكور
  10. مشكور اخوي بيتم التجربه وا وقف شي معي بحاول اسفسر
  11. طيب اخواني معليش مسوي ازعاج بالمنتدى انا كل شوي موضوع لكن اعذروني فقط حبيت اعرف وش الاكواد المفروض استخدمها او المطلوبه وهل اضيف صور وكذا لما اجي اسوي مود صحة السياره على الخريطه زي هذي الصوره
  12. يعطيكم الف عافيه اثنينكم وما يحرمنا منكم مشكورين زبط زي ما قال الاخ تنطيل #Edit: معليش اخوي اسحب كلامي للاسف ما زبط نفس المشكله يعطيني الثاني وانا ميت الثالث #Edit: اخواني مافي رد للان الكود لم يزبط
  13. بانتظار الرد للاسف مافي رد الى الآن شاركني برايك ولو معك احتماليه
  14. يعطيك الف عافيه يا رب يوفقك دنيا واخره واسف على الازعاج تمت الافاده
  15. تسلم يا بعد قلبي بس ممكن اعرف وش الغلط عشان ما اعيده واسف اتعبتك
  16. تسلملي يالغالي لكن ما زبط لو تبي اعرض كامل الاكواد ما عندي مشكله server side ########## addEvent("onFlip", true) addEventHandler("onFlip", root, function() local veh = getPedOccupiedVehicle(client) if veh then if getPlayerMoney(client) >= 1500 then if not getElementData(client, "isBuyFlip") then takePlayerMoney(client, 1500) local rx, ry, rz = getElementRotation(veh) setElementRotation(veh, 0, 0, rx > 90 and rx < 279 and rz + 180 or rz) setElementData(client, "isBuyFlip", true) setTimer(function(player) setElementData(player, "isBuyFlip", false) end, 5000, 1, client) outputChatBox("#555555 [ ShopSystem ]#999999 You Have Been Bought Flip", client, 255, 255, 255, true) else outputChatBox("#555555 [ ShopSystem ]#999999 Wait 5 Seconds To Buy Flip !", client, 255, 0,0, true) end else outputChatBox("#555555 [ ShopSystem ]#999999 You don't have enough money !", client, 255, 0,0, true) end else outputChatBox("#555555 [ ShopSystem ]#999999 You Are Not In Vehicle", client, 255, 0, 0, true) end end) addEvent("onRepair", true) addEventHandler("onRepair", root, function() local veh = getPedOccupiedVehicle(client) if veh then if getPlayerMoney(client) >= 2500 then if not getElementData(client, "isBuyRepair") then takePlayerMoney(client, 2500) local rx, ry, rz = getElementRotation(veh) fixVehicle( getPedOccupiedVehicle ( client ) ) setElementData ( client, "isBuyRepair", true ) setTimer ( function ( player ) setElementData ( player, "isBuyRepair", false ) end, 5000, 1, client ) outputChatBox ( "#555555 [ ShopSystem ]#999999 You Have Been Bought Repair", client, 255, 255, 255, true ) else outputChatBox("#555555 [ ShopSystem ]#999999 Wait 5 Seconds To Buy Repair !", client, 255, 0,0, true) end else outputChatBox("#555555 [ ShopSystem ]#999999 You don't have enough money !", client, 255, 0,0, true) end else outputChatBox("#555555 [ ShopSystem ]#999999 You Are Not In Vehicle", client, 255, 0, 0, true) end end) addEvent("onNitro", true) addEventHandler("onNitro", root, function() local veh = getPedOccupiedVehicle(client) if veh then if getPlayerMoney(client) >= 500 then if not getElementData(client, "isBuyNitro") then takePlayerMoney(client, 500) local rx, ry, rz = getElementRotation(veh) addVehicleUpgrade ( getPedOccupiedVehicle ( client ), 1007 ) triggerClientEvent(client,"onflip2", client,veh) setElementData ( client, "isBuyNitro", true ) setTimer ( function ( player ) setElementData ( player, "isBuyNitro", false ) end, 5000, 1, client ) outputChatBox ( "#555555 [ ShopSystem ]#999999You Have Been Bought Nitro", client, 255, 255, 255, true ) else outputChatBox("#555555 [ ShopSystem ]#999999 Wait 5 Seconds To Buy Nitro !", client, 255, 0,0, true) end else outputChatBox("#555555 [ ShopSystem ]#999999 You don't have enough money !", client, 255, 0,0, true) end else outputChatBox("#555555 [ ShopSystem ]#999999 You Are Not In Vehicle", client, 255, 0, 0, true) end end) client side ################# --[[ // copyrights // Shop Race System v1.0 By AboShanab Welcome In My Script :p // copyrights // --]] local sX, sY = guiGetScreenSize () local direction = "right" local rot = 0 local draw = false local a1 = 79 local a2 = 79 local a3 = 79 local scale = 0.98 local copyrightscale = 1.15 local itemscale = 1.10 addEventHandler("onClientResourceStart", resourceRoot, function () if ( sX == 800 ) then scale = 0.98 copyrightscale = 1.15 itemscale = 1.10 elseif ( sX == 1024 ) then scale = 1.05 copyrightscale = 1.20 itemscale = 1.18 elseif ( sX == 1152 ) then scale = 1.10 copyrightscale = 1.28 itemscale = 1.25 elseif ( sX == 1280 ) then scale = 1.10 copyrightscale = 1.32 elseif ( sX == 1360 ) then scale = 1.25 copyrightscale = 1.35 itemscale = 1.38 elseif ( sX == 1366 ) then scale = 1.28 copyrightscale = 1.40 itemscale = 1.42 elseif ( sX == 1440 ) then scale = 1.27 copyrightscale = 1.39 itemscale = 1.42 elseif ( sX == 1600 ) then scale = 1.30 copyrightscale = 1.43 itemscale = 1.45 end end ) function move () if ( rot == 15 ) then direction = "right" elseif ( rot == -15 ) then direction = "left" end if ( direction == "left" ) then rot = rot + 0.5 elseif ( direction == "right" ) then rot = rot - 0.5 end end function mouse ( _, _, x, y ) if ( x >= sX * 0.24 and y >= sY * 0.70 and x <= ( sX * 0.24 + sX * 0.14 ) and y <= ( sY * 0.70 + sY * 0.05 ) ) then a1 = 255 elseif ( x >= sX * 0.42 and y >= sY * 0.70 and x <= ( sX * 0.42 + sX * 0.14 ) and y <= ( sY * 0.70 + sY * 0.05 ) ) then a2 = 255 elseif ( x >= sX * 0.60 and y >= sY * 0.70 and x <= ( sX * 0.56 + sX * 0.14 ) and y <= ( sY * 0.70 + sY * 0.05 ) ) then a3 = 255 else a1 = 79 a2 = 79 a3 = 79 end end function click ( _, _, x, y,thePlayer ) if ( x >= sX * 0.24 and y >= sY * 0.70 and x <= ( sX * 0.24 + sX * 0.14 ) and y <= ( sY * 0.70 + sY * 0.05 ) ) then triggerServerEvent("onFlip", localPlayer) removeEventHandler("onClientRender", root, drawShop) removeEventHandler("onClientRender", root, move) removeEventHandler("onClientClick", root, click) removeEventHandler("onClientCursorMove", root, mouse) showCursor ( false ) draw = false elseif ( x >= sX * 0.42 and y >= sY * 0.70 and x <= ( sX * 0.42 + sX * 0.14 ) and y <= ( sY * 0.70 + sY * 0.05 ) ) then triggerServerEvent("onRepair", localPlayer) removeEventHandler("onClientRender", root, drawShop) removeEventHandler("onClientRender", root, move) removeEventHandler("onClientClick", root, click) removeEventHandler("onClientCursorMove", root, mouse) showCursor ( false ) draw = false elseif ( x >= sX * 0.60 and y >= sY * 0.70 and x <= ( sX * 0.56 + sX * 0.14 ) and y <= ( sY * 0.70 + sY * 0.05 ) ) then triggerServerEvent("onNitro", localPlayer) removeEventHandler("onClientRender", root, drawShop) removeEventHandler("onClientRender", root, move) removeEventHandler("onClientClick", root, click) removeEventHandler("onClientCursorMove", root, mouse) showCursor ( false ) draw = false end end function drawShop () local name = getPlayerName ( localPlayer ) local money = getPlayerMoney ( ) local level = getElementData ( localPlayer, "Level" ) or "#555555SoOoN" local xp = getElementData ( localPlayer, "Exp" ) or "#555555SoOoN" dxDrawRectangle(sX * 0.20, sY * 0.20, sX * 0.57, sY * 0.62, tocolor(0, 0, 0, 156), true) dxDrawText("#555555Welcome To MXA Shop System", sX * 0.40, sY * 0.20, sX * 0.60, sY * 0.10, tocolor(255, 255, 255, 255), copyrightscale, "default-bold", "center", "top", false, false, true, true, false) dxDrawText("#555555Have A Fun", sX * 0.21, sY * 0.25, sX * 0.41, sY * 0.30, tocolor(255, 255, 255, 255), scale, "default-bold", "left", "top", false, false, true, true, false) dxDrawText("#999999Repair Cost : 2500$", sX * 0.24, sY * 0.37, sX * 0.40, sY * 0.47, tocolor(255, 255, 255, 255), scale, "default-bold", "left", "top", false, false, true, true, false) dxDrawText("#999999Flip Cost : 1500$", sX * 0.24, sY * 0.41, sX * 0.40, sY * 0.50, tocolor(255, 255, 255, 255), scale, "default-bold", "left", "top", false, false, true, true, false) dxDrawText("#999999Your Name :- ".. name, sX * 0.21, sY * 0.29, sX * 0.41, sY * 0.40, tocolor(255, 255, 255, 255), scale, "default-bold", "left", "top", false, false, true, true, false) dxDrawText("#999999Nitro Cost : 500$", sX * 0.24, sY * 0.33, sX * 0.40, sY * 0.44, tocolor(255, 255, 255, 255), scale, "default-bold", "left", "top", false, false, true, true, false) dxDrawText("#999999Shop Items :-", sX * 0.21, sY * 0.45, sX * 0.41, sY * 0.56, tocolor(255, 255, 255, 255), scale, "default-bold", "left", "top", false, false, true, true, false) dxDrawImage(sX * 0.24, sY * 0.52, sX * 0.14, sY * 0.16, "images/Flip.png", rot, 0, 0, tocolor(255, 255, 255, 255), true) dxDrawRectangle(sX * 0.24, sY * 0.70, sX * 0.14, sY * 0.05, tocolor(51, 51, 51, a1), true) dxDrawText("Flip", sX * 0.30, sY * 0.70, sX * 0.60, sY * 0.74, tocolor(255, 255, 255, 255), itemscale, "default-bold", "left", "bottom", false, false, true, true, false) dxDrawImage(sX * 0.42, sY * 0.52, sX * 0.14, sY * 0.16, "images/Repair.png", rot, 0, 0, tocolor(255, 255, 255, 255), true) dxDrawRectangle(sX * 0.42, sY * 0.70, sX * 0.14, sY * 0.05, tocolor(51, 51, 51, a2), true) dxDrawText("Repair", sX * 0.38, sY * 0.71, sX * 0.60, sY * 0.74, tocolor(255, 255, 255, 255), itemscale, "default-bold", "center", "bottom", false, false, true, true, false) dxDrawImage(sX * 0.60, sY * 0.52, sX * 0.14, sY * 0.16, "images/Nitro.png", rot, 0, 0, tocolor(255, 255, 255, 255), true) dxDrawRectangle(sX * 0.60, sY * 0.70, sX * 0.14, sY * 0.05, tocolor(51, 51, 51, a3), true) dxDrawText("Nitro", sX * 0.52, sY * 0.71, sX * 0.69, sY * 0.74, tocolor(255, 255, 255, 255), itemscale, "default-bold", "right", "bottom", false, false, true, true, false) dxDrawText("#999999By : #33FF00Mas#000000ter", sX * 0.21, sY * 0.75, sX * 0.41, sY * 0.80, tocolor(255, 255, 255, 255), scale, "default-bold", "left", "bottom", false, false, true, true, false) end bindKey ("F1", "down", function () if ( draw == false ) then addEventHandler("onClientRender", root, drawShop) addEventHandler("onClientRender", root, move) addEventHandler("onClientClick", root, click) addEventHandler("onClientCursorMove", root, mouse) showCursor ( true ) draw = true else removeEventHandler("onClientRender", root, drawShop) removeEventHandler("onClientRender", root, move) removeEventHandler("onClientClick", root, click) removeEventHandler("onClientCursorMove", root, mouse) showCursor ( false ) draw = false end end ) addEvent("onflip2", true) addEventHandler("onflip2", root, function(veh) setVehicleNitroCount(veh, 1) end)
  17. السلام عليكم ورحمة الله وبركاته اخواني ابي اعرف وش الغلط بهذي الاكواد انا جربته مره يزبط ومره لا بمزاج شي غريب function sortCompareFunction ( s1, s2 ) if type ( s1 ) == "table" and type ( s2 ) == "table" then s1, s2 = s1.name, s2.name; end s1, s2 = s1:lower ( ), s2:lower( ); if s1 == s2 then return false end local byte1, byte2 = string.byte ( s1:sub ( 1, 1 ) ), string.byte ( s2:sub ( 1, 1 ) ); if not byte1 then return true elseif not byte2 then return false elseif byte1 < byte2 then return true elseif byte1 == byte2 then return sortCompareFunction ( s1:sub ( 2 ), s2:sub ( 2 ) ); else return false end end function getAliveGuys ( mode ) if not mode then return end if mode == 1 then pAlive = { }; for _, player in ipairs ( getElementsByType ( "player" ) ) do if ( getElementData ( player, "state" ) == "alive" ) then table.insert ( pAlive, player ); end end return pAlive; elseif mode == 2 then return #pAlive; elseif mode == 3 then if pAlive then pAlive = nil; end return false end end function getDeadGuys ( ) local pDead = 0 for _, player in ipairs ( getElementsByType ( "player" ) ) do if getElementData ( player, "state" ) == "dead" then pDead = pDead + 1; end end return pDead; end function giveMoneyWinDie ( ) local account = getPlayerAccount ( source ); local playersAlive = getAliveGuys ( 2 ); local playersDead = getDeadGuys ( ); local pAll = playersAlive + playersDead; local checkYourPos = pAll - playersDead; local pos = nil; if tonumber ( checkYourPos ) == 1 then pos = 1 else pos = checkYourPos+1 ; end if tonumber ( checkYourPos ) == 2 then pos = 2; end if pos == 1 or pos == 21 or pos == 31 then posName = "st"; elseif pos == 2 or pos == 22 or pos == 32 then posName = "nd"; elseif pos == 3 or pos == 23 or pos == 33 then posName = "rd"; else posName = "th"; end if not getElementData ( source, "gotMoney" ) then local money = math.ceil ( getPlayerCount ( ) * 50 / pos ); givePlayerMoney ( source, money ); outputChatBox ( "* You were #abcdef[#ff0000" .. pos .. posName .. "#abcdef]#ffffff and #abcdefearned #ffffff" .. money .. "#00ff00$!", source, 255, 255, 255, true ); setElementData ( source, "gotMoney", true ); if account then setAccountData ( account, "money", tostring ( getPlayerMoney ( source ) ) ); end end end addEventHandler ( "onPlayerWasted", root , giveMoneyWinDie ) واسف لاتعابكم
  18. للاسف اخوي لم زبط addEvent("onNitro", true) addEventHandler("onNitro", root, function() local veh = getPedOccupiedVehicle(client) if veh then if getPlayerMoney(client) >= 500 then if not getElementData(client, "isBuyNitro") then takePlayerMoney(client, 500) local rx, ry, rz = getElementRotation(veh) addVehicleUpgrade ( getPedOccupiedVehicle ( client ), 1007 ) triggerClientEvent(client,"onflip2", client) setElementData ( client, "isBuyNitro", true ) setTimer ( function ( player ) setElementData ( player, "isBuyNitro", false ) end, 5000, 1, client ) outputChatBox ( "#555555 [ ShopSystem ]#999999You Have Been Bought Nitro", client, 255, 255, 255, true ) else outputChatBox("#555555 [ ShopSystem ]#999999 Wait 5 Seconds To Buy Nitro !", client, 255, 0,0, true) end else outputChatBox("#555555 [ ShopSystem ]#999999 You don't have enough money !", client, 255, 0,0, true) end else outputChatBox("#555555 [ ShopSystem ]#999999 You Are Not In Vehicle", client, 255, 0, 0, true) end end) كلنت addEvent("onflip2", true) addEventHandler("onflip2", root, function(client) setVehicleNitroCount(client, 1) end)
  19. يا ليت توضح اخوي لاني بحثت وما لقيت غير اقل شي مرتين انا ابي مره فقط
  20. حبيبي ذا معناه اخذ فلوس انا قصدي عدد مرات تعبئة النايترو وايا كان مشكور على المرور
  21. تسلملي حبيب قلبي والله مشكور اخوي بس للاسف ما لقيت مره وحده فقط مرتين اقل شي رغم اني شفته في سيرفر مره وحده
  22. تم نقل الموقع الى Masters-Host
  23. مشكور اخوي بيتم التجربه بس من وين اعرف اضافات السياره انا ابيها مره وحده لو امكن
×
×
  • Create New...