Jump to content

Max+

Members
  • Posts

    1,363
  • Joined

  • Last visited

Everything posted by Max+

  1. function testSirene( player, cmd ) local commandant = createVehicle ( 554, 1227.746, -1422.281, 13.5432, 0, 0, 0, "COMM1" ) triggerClientEvent ( "startSirene", player, commandant ) end addCommandHandler ( "testsirene", testSirene) function startSirene ( vehicle ) local x,y,z = getElementPosition( vehicle ) local sound = playSound3D( "sons\\sirene1.wav", x, y, z, true) attachElements ( sound, vehicle) end addEvent( "startSirene", true ) addEventHandler("startSirene", getResourceRootElement(), startSirene)
  2. مشكلتك مو راضي تقتنع شوف اللي حطيته انت للاوبجكت والسيارة واللي انا حطيته للاعب ، وصاحب الموضوع يبي للاعب https://forum.multitheftauto.com/viewtopic.php?f=160&t=62393
  3. ياخوي حنا هنا نستفيد ونفيد ممكن انت تفيديني انا لي سنتين مارجعت للبرمجه الا قبل يومين بس انا اقول كلهم يضبطو ، ولو تجرب كلها تؤدي نفس الغرض دام صاحب الموضوع اخذ كوده خلاص ..
  4. ياطويل العمر يقول لاتستخدم الامر ذا لاحضار اللاعب لانه يسبب مشاكل مثل نقل الاعب داخل السيارة يفضل استخدام spawnPlayer افضل لك تقرأ انت ، ^ كلام الويكي يقول لاتستخدم ذا الامر عشان ترسبن لاعب ذا كلر كوده صحيح وراعي الموضوع قال ابي كود اذا كتبت امر يوديني لمكان معين طيب كلها تؤدي الغرض لاكن اللي حطه كلر يسوي اخطاء في السكربت يعني حنا افهم من الويكي نفسه ؟ تقدر تسأل تبوله ، وهو قبل كذا عضو نزل كود وقال له تابل يستبدله بـــ spawnPlayer
  5. ياطويل العمر يقول لاتستخدم الامر ذا لاحضار اللاعب لانه يسبب مشاكل مثل نقل الاعب داخل السيارة يفضل استخدام spawnPlayer افضل لك تقرأ انت ،
  6. Required Arguments thePed: the player or ped you want to apply an animation to. Optional Arguments NOTE: When using optional arguments, you must supply all arguments before the one you wish to use. For more information on optional arguments, see Optional Arguments. block: the animation block's name. anim: the name of the animation within the block. time: how long the animation will run for in milliseconds. loop: indicates whether or not the animation will loop. updatePosition: will change the actual coordinates of the ped according to the animation. Use this for e.g. walking animations. interruptable: if set to 'false' other tasks wont be able to interupt the animation. Setting this to 'false' also gives this function more power to override other animations that are running. For example, squatting after a jump can be terminated. freezeLastFrame: ... (From 1.1 onwards).
  7. Max+

    Hud Windows 8

    Very Nice Job , i Really liked it, Keep it Up !
  8. Max+

    [HELP]

    Yeah , i think so to , Well He can use something like this , setTimer ( function ( ) for _, vehicle in ipairs ( getElementsByType ( "vehicle" ) ) do if isElementInWater ( vehicle ) then blowVehicle ( vehicle, true ) end end end , 10000, 0 ) it well check all vehicle in water every 10 sec and blow them up .
  9. سكربت جميل ، بس عندي ملاحظه ودي انك منسق اللوحة زيادة مكبرها شوي ، وحاط كل زر جنبه الوظيفة حقته مثلا اصلاح - جنبه صورة اصلاح نيترو - جنبة صوره نيترو ، وفلوس وتحويل فلوس .. الخ بداية جميلة ، بالتوفيق لك يارب
  10. Max+

    [HELP]

    why do you use ( player ) inside function while you want to set the health of the vehicle remove this , ( player ) and do it like this , setElementHealth(vehicle, 0) or use destroyElement
  11. Do not use this function to spawn a ped/player. It will cause problems with other functions like warpPedIntoVehicle. Use spawnPlayer and createPed instead.
  12. Good Job , Et-win , i think Your Gonna Be Amazing , Scripter ?
  13. Max+

    [Question]

    As JR10 , Said You Can't Block theme Because They're hard-coded in MTA
  14. ----ServerSide local weaponmarker = createMarker(296.42404,-38.29199,1000.5,"cylinder",1.5,0,255,0) setElementInterior(weaponmarker,1) function showClientGUI(marker) if marker == weaponmarker then if getPlayerTeam(source) and getTeamName(getPlayerTeam(source)) ~= "Criminal" then triggerClientEvent(source,"showweaponGUI",source) else outputChatBox("Ammunation won't sell guns&ammos to criminals, buy it in black market",source,255,0,0) end end end addEventHandler("onPlayerMarkerHit",getRootElement(),showClientGUI) addEvent("GiveWeapon",true) addEventHandler("GiveWeapon",getRootElement(), function(buyer,quantity) if getPlayerMoney(buyer) >= math.floor(quantity * 10) then giveWeapon(buyer,getElementData(buyer,"WeaponChosen"),quantity) takePlayerMoney(buyer,math.floor(quantity * 10)) else outputChatBox("You don't have enough money for this",buyer,255,0,0) end end) ---ClientSide addEventHandler("onClientResourceStart", resourceRoot, function() local screenW, screenH = guiGetScreenSize() AmmoMenu = guiCreateWindow((screenW - 465) / 2, (screenH - 834) / 2, 465, 834, "Ammu-Nation", false) guiWindowSetSizable(AmmoMenu, false) AmmuNationImage = guiCreateStaticImage(67, 54, 332, 88, ":weapons/ammu-nation.png", false, AmmoMenu) TazerImage = guiCreateStaticImage(52, 179, 70, 56, ":weapons/Tazer.png", false, AmmoMenu) PistolImage = guiCreateStaticImage(52, 253, 70, 59, ":weapons/Pistol.png", false, AmmoMenu) DeserteagleImage = guiCreateStaticImage(52, 328, 70, 55, ":weapons/Desert_Eagle.png", false, AmmoMenu) Ak47Image = guiCreateStaticImage(33, 739, 113, 44, ":weapons/ak47.png", false, AmmoMenu) UziImage = guiCreateStaticImage(53, 401, 69, 52, ":weapons/uzi.png", false, AmmoMenu) Tec9Image = guiCreateStaticImage(53, 468, 69, 50, ":weapons/tec9.png", false, AmmoMenu) Mp5Image = guiCreateStaticImage(46, 532, 86, 45, ":weapons/mp5.png", false, AmmoMenu) Spas12Image = guiCreateStaticImage(33, 592, 113, 50, ":weapons/Spas-12.png", false, AmmoMenu) M4Image = guiCreateStaticImage(33, 663, 114, 55, ":weapons/M4A1.png", false, AmmoMenu) AmmountLabel = guiCreateLabel(196, 478, 55, 17, "Ammount", false, AmmoMenu) AmmountTextbox = guiCreateEdit(172, 508, 104, 24, "", false, AmmoMenu) guiEditSetMaxLength(QuantityTextbox, 6) BuyButton = guiCreateButton(172, 729, 126, 59, "Buy Cart", false, AmmoMenu) guiSetFont(BuyButton, "default-bold-small") guiSetProperty(BuyButton, "NormalTextColour", "FF0000FF") QuitButton = guiCreateButton(315, 729, 126, 59, "Quit", false, AmmoMenu) guiSetFont(QuitButton, "default-bold-small") guiSetProperty(QuitButton, "NormalTextColour", "FFFF0000") Cartlist = guiCreateGridList(172, 551, 269, 122, false, AmmoMenu) Weaponcolumn = guiGridListAddColumn(Cartlist, "Weapon", 0.3) Amountcolumn = guiGridListAddColumn(Cartlist, "Amount", 0.3) Pricecolumn = guiGridListAddColumn(Cartlist, "Price", 0.3) AddcartButton = guiCreateButton(314, 508, 89, 27, "Add to cart", false, AmmoMenu) WeaponInfo = guiCreateScrollPane(177, 179, 223, 238, false, AmmoMenu) Infolabel = guiCreateLabel(17, 150, 150, 19, "Press icon for information", false, AmmoMenu) guiSetFont(Infolabel, "default-bold-small") guiGridListSetSortingEnabled (Cartlist,false) guiSetVisible(AmmoMenu,false) end ) function chooseweapon() if source == TazerImage then setElementData(localPlayer,"WeaponChosen",23) end if source == PistolImage then setElementData(localPlayer,"WeaponChosen",22) end if source == DeserteagleImage then setElementData(localPlayer,"WeaponChosen",24) end if source == Ak47Image then setElementData(localPlayer,"WeaponChosen",30) end if source == UziImage then setElementData(localPlayer,"WeaponChosen",28) end if source == Tec9Image then setElementData(localPlayer,"WeaponChosen",32) end if source == Mp5Image then setElementData(localPlayer,"WeaponChosen",29) end if source == Spas12Image then setElementData(localPlayer,"WeaponChosen",27) end if source == M4Image then setElementData(localPlayer,"WeaponChosen",31) end if source == BuyButton then if guiGridListGetRowCount(Cartlist) > 0 then triggerServerEvent("GiveWeapon",resourceRoot,localPlayer,guiGetText(AmmountTextbox)) else outputChatBox("You don't have anything in your cart!",localPlayer,255,0,0) end end if source == QuitButton then showCursor(false) guiSetVisible(AmmoMenu,false) guiGridListClear (Cartlist) guiSetText (AmmountTextbox,"") end if source == AddcartButton then if getElementData("weaponprice") ~= false then if tonumber(guiGetText(AmmountTextbox)) > 0 and tonumber(guiGetText(AmmountTextbox)) ~= nil then guiGridListSetItemText(Cartlist,guiGridListAddRow(Cartlist),Weaponcolumn ..getWeaponNameFromID(getElementData(localPlayer,"WeaponChosen"))) guiGridListSetItemText(Cartlist,guiGridListAddRow(Cartlist),Amountcolumn ..guiGetText(AmmountTextbox)) guiGridListSetItemText(Cartlist,guiGridListAddRow(Cartlist),Pricecolumn,"$"..tostring(math.floor(10 * guiGetText(AmmountTextbox)))) else outputChatBox("Please enter a integer as the ammount of ammo",localPlayer,255,0,0) end else outputChatBox("Please choose a weapon by clicking on the icon of it",localPlayer,255,0,0) end end end addEventHandler("onClientGUIClick",resourceRoot,chooseweapon) addEvent("showweaponGUI",true) function showGUI() outputChatBox("true") showCursor(true) guiSetVisible(AmmoMenu,true) end addEventHandler("showweaponGUI",getRootElement(),showGUI)
  15. 'onPlayerLogin' triggerClientEvent stopSound
  16. لاوالله غلط صدقني قوقل ماتستفيد منه الا دجه انا حاليا لي فوق 4 سنين على البرمجه طبعا كان معي انجليزي 48 % وقفت برمجه وتكيت اقوي اللغه معي والحمد لله اسولف بريطاني اصلي ههههههههههههههه والبرمجه امس رجعت لها عارف شوية طقطقة لاني تركتها فترة ،
  17. ياخوي صدقني يمديك توفر على نفسك بس تحتاج لغة انجليزية .؟ ليه تخلي احد يعلمك دام يمديك بعد ماتقوي اللغه معك ـ واقولك ماتوقع احد بيتكي يعلمك من الاول ، انت ابدأ زي اي واحد واذا واجهت مشاكل نساعدك فيها وراح تتعلم من الاخطاء ..
  18. انت حايس امها الافنت لحاله والفنكشن لحاله
  19. Try This , ---Client.lua addEventHandler("onClientMarkerHit", root, function ( ) if ( localPlayer == dMarker ) then eatMenu = guiCreateWindow(441, 242, 130, 111, "Lobby v0.1", false) guiWindowSetSizable(eatMenu, false) wDrink = guiCreateButton(11, 32, 108, 29, "Whiskey", false, eatMenu) wFood = guiCreateButton(11, 67, 108, 29, "Sandwich", false, eatMenu) showCursor(true) end end ) addEventHandler("onClientGUIClick", root, function ( ) if (localPlayer == wDrink ) then triggerServerEvent("tDrink", localPlayer) guiSetVisible(eatMenu,false) showCursor(false) end end )6 --Server.lua addEvent('tDrink', true ) addEventHandler('tDrink', root, function ( ) daBlockz = getElementData(root,"blockz") daAnimz = getElementData(root,"animz") if daBlockz == "DANCING" and daAnimz == "dnce_m_b" then setPedAnimation(source,false) else setTimer( setPedAnimation, 100, 1, source, "DANCING", "dnce_m_b" ) end end )
  20. جرب ، function centerWindow (center_window) local screenW, screenH = guiGetScreenSize() local windowW, windowH = guiGetSize(center_window, false) local x, y = (screenW - windowW) /2,(screenH - windowH) /2 guiSetPosition(center_window, x, y, false) end wnd = guiCreateWindow(0.86, 0.00, 0.14, 1.00, "", false) guiSetVisible(wnd, false) centerWindow( wnd ) b1 = guiCreateStaticImage(1248, 129, 108, 106, "shop.png", false, wnd) setElementData(b1, "tooltip-text", "الشوب", false) b2 = guiCreateStaticImage(1248, 235, 108, 106, "weth.png", false, wnd) setElementData(b2, "tooltip-text", "اسلحة الثوار", false) b3 = guiCreateStaticImage(1248, 370, 108, 89, "wepo.png", false, wnd) setElementData(b3, "tooltip-text", "اسلحة المرتزقة", false) b4 = guiCreateStaticImage(1197, 469, 159, 106, "car.png", false, wnd) setElementData(b4, "tooltip-text", "السيارات", false) b5 = guiCreateStaticImage(1251, 579, 105, 105, "skins.png", false, wnd) setElementData(b5, "tooltip-text", "الشخصيات", false) wnd2 = guiCreateWindow(0.32, 0.21, 0.31, 0.35, "Shop", true) guiWindowSetSizable(wnd2, false) guiSetVisible ( wnd2, false ) shophe = guiCreateStaticImage(45, 28, 80, 77,"shop/health.png", false, wnd2) health = guiCreateButton(28, 106, 113, 30, "Health", false, wnd2) shopar = guiCreateStaticImage(168, 28, 76, 77,"shop/armor.png", false, wnd2) armor = guiCreateButton(151, 106, 113, 30, "Armor", false, wnd2) shopfi = guiCreateStaticImage(292, 29, 76, 77, "shop/fix.png", false, wnd2) fix = guiCreateButton(274, 105, 113, 31, "Fix", false, wnd2) shopfl = guiCreateStaticImage(44, 146, 81, 76,"shop/flip.png", false, wnd2) flip = guiCreateButton(28, 222, 113, 30, "Flip", false, wnd2) shopin = guiCreateStaticImage(169, 145, 75, 77,"shop/invisible.png", false, wnd2) invisible = guiCreateButton(151, 222, 113, 30, "Invisible", false, wnd2) wnd3 = guiCreateWindow(0.37, 0.32, 0.21, 0.31, "اسلحة خاصة بالثوار", true) guiWindowSetSizable(wnd3, false) guiSetVisible(wnd3, false) guiSetProperty(wnd3, "CaptionColour", "FFFB0000") thwar = guiCreateStaticImage(161, 54, 111, 111,"weth/000.png", false, wnd3) thwar2 = guiCreateStaticImage(23, 51, 102, 114,"weth/18.png", false, wnd3) weth1 = guiCreateButton(161, 177, 111, 45, "$300 قاذف الملتوف", false, wnd3) guiSetFont(weth1, "default-bold-small") guiSetProperty(weth1, "NormalTextColour", "FFFB0000") weth2 = guiCreateButton(21, 176, 104, 46, "$50 ملتوف", false, wnd3) guiSetFont(weth2, "default-bold-small") guiSetProperty(weth2, "NormalTextColour", "FFFB0000") wnd4 = guiCreateWindow(0.31, 0.37, 0.22, 0.31, "اسلحة خاصة بالمرتزقة", true) guiWindowSetSizable(wnd4, false) guiSetVisible(wnd4, false) guiSetProperty(wnd4, "CaptionColour", "FF0006FE") police = guiCreateStaticImage(210, 40, 87, 107,"wepo/25.png", false, wnd4) police2 = guiCreateStaticImage(10, 40, 88, 107,"wepo/30.png", false, wnd4) police3 = guiCreateStaticImage(108, 40, 90, 107,"wepo/24.png", false, wnd4) wepo = guiCreateButton(10, 157, 88, 63, "$100 مسيل الدموع", false, wnd4) guiSetFont(wepo, "default-bold-small")guiSetProperty(wepo, "NormalTextColour", "FF0059FD") wepo2 = guiCreateButton(108, 157, 90, 63, "$500 مسدس", false, wnd4) guiSetFont(wepo2, "default-bold-small") guiSetProperty(wepo2, "NormalTextColour", "FF0059FD") wepo3 = guiCreateButton(211, 157, 86, 63, "$300 شوزن ", false, wnd4) guiSetFont(wepo3, "default-bold-small") guiSetProperty(wepo3, "NormalTextColour", "FF0059FD") wnd5 = guiCreateWindow(0.22, 0.23, 0.54, 0.48, "FreeCar", true) guiSetVisible(wnd5, false) centerWindow ( wnd5, 2, 4 ) car1 = guiCreateStaticImage(17, 199, 159, 150, "car/maverick.png", false, wnd5) setElementData(car1, "tooltip-text", "PoliceMaverick", false) car2 = guiCreateStaticImage(192, 33, 165, 150, "car/bobcat.png", false, wnd5) setElementData(car2, "tooltip-text", "Bobcat", false) car3 = guiCreateStaticImage(374, 33, 167, 150, "car/bullet.png", false, wnd5) setElementData(car3, "tooltip-text", "Bullet", false) car4 = guiCreateStaticImage(560, 33, 162, 150, "car/supergt.png", false, wnd5) setElementData(car4, "tooltip-text", "SuperGT", false) car5 = guiCreateStaticImage(17, 34, 158, 149, "car/tursimo.png", false, wnd5) setElementData(car5, "tooltip-text", "Tursimo", false) car6 = guiCreateStaticImage(192, 199, 165, 150, "car/modaraa.png", false, wnd5) setElementData(car6, "tooltip-text", "S.W.A.T", false) car7 = guiCreateStaticImage(374, 199, 167, 150, "car/ranger.png", false, wnd5) setElementData(car7, "tooltip-text", "Police Ranger", false) car8 = guiCreateStaticImage(560, 199, 162, 150, "car/coaster.png", false, wnd5) setElementData(car8, "tooltip-text", "Coaster", false) wnd6 = guiCreateWindow(0.26, 0.25, 0.46, 0.38, "Skins", true) guiSetVisible(wnd6, false) centerWindow ( wnd6, 2, 4 ) skin1 = guiCreateStaticImage(15, 30, 138, 244, "skins/102.png", false, wnd6) setElementData(skin1, "tooltip-text", "Jeesh $3000", false) skin2 = guiCreateStaticImage(168, 30, 138, 244, "skins/104.png", false, wnd6) setElementData(skin2, "tooltip-text", "Msawr $3000", false) skin3 = guiCreateStaticImage(321, 30, 138, 244, "Skins/108.png", false, wnd6) setElementData(skin3, "tooltip-text", "Ninja $2500", false) skin4 = guiCreateStaticImage(475, 30, 138, 244, "Skins/109.png", false, wnd6) setElementData(skin4, "tooltip-text", "Susake $3500", false) addEventHandler ( "onClientGUIClick", resourceRoot, function () if (source == b1) then guiSetVisible (wnd2, true) elseif (source == b2) then guiSetVisible (wnd3, true) elseif (source == b3) then guiSetVisible (wnd4, true) elseif (source == b4) then guiSetVisible (wnd5, true) elseif (source == b5) then guiSetVisible (wnd6, true) end end) bindKey( "F7", "down", function ( ) guiSetVisible ( wnd, not guiGetVisible ( wnd ) ) showCursor ( guiGetVisible ( wnd ) ) guiSetInputEnabled( guiGetVisible ( wnd ) ) guiSetVisible(wnd, false) guiSetVisible(wnd2, false) guiSetVisible(wnd3, false) guiSetVisible(wnd4, false) guiSetVisible(wnd5, false) guiSetVisible(wnd6, false) end )
  21. الحين تبي تغير حجم النافذه صح ؟ عطني الحجم اللي تبيه
×
×
  • Create New...