d43dr4 Posted December 3, 2012 Share Posted December 3, 2012 (edited) السلام عليكم و رحمة الله تعالى و بركاته شباب بدي اطلب مود .. صراحة مو مود واحد الاول اللي يخلي الاسلحة تختفي و الشوب يطفى بعد ما تطلع من ساحة القتال بشوفه في سيرفرات .. في اف 11 تشوف مكان ساحة القتال منطقة خضراء F2 عندي شوب حق سعد او العقرب ، ينفتح ب _________________________________________________________ اما المود الثاني هو اللي يمنع اسلحة معينة مثلا المينيجن و البازوكا عندي واحد بس فيه خلل يعني لما تمنع المينيجن (ID:38) يمنع السيف كمان (ID: لان 8 رقم من 38 الكود حق السكربت : "meta.xml" : <meta> <info author="Tockra" version="1.2" type="misc" name="Forbid Weapons (runs with freeroam and other Resources)" description="You can forbid some weapons on your server by changing the settings.xml" /> <script src="start.lua" type="server" /> </meta> "settings.xml" : <settings> <WeaponIDs>38,37,36,10,11,39,40,4,9</WeaponIDs> </settings> "start.lua" : local settingFile = xmlLoadFile ( "settings.xml" ) local node = xmlFindChild(settingFile,"WeaponIDs",0) local ids = tostring(xmlNodeGetValue ( node )) function forbidWeapons( previousWeaponID, currentWeaponID ) local s,st = string.find(ids,tostring(currentWeaponID) ) if(s) then setTimer(takeWeapon,50,1,source,currentWeaponID) end end addEventHandler ( "onPlayerWeaponSwitch", getRootElement(), forbidWeapons ) ابي المود الاول عاجل واذا ممكن تصحيح للمود الثاني Edited December 5, 2012 by Guest Link to comment
abu5lf Posted December 3, 2012 Share Posted December 3, 2012 (edited) https://wiki.multitheftauto.com/wiki/OnP ... aponSwitch شف المثال ذاه انا مسويه يمنع السلاح حط الايد الي تبيه من الاسلحة الرادار في الخريطة : createRadarArea منع الشوب setElementData getElementData Edited December 3, 2012 by Guest Link to comment
./BlackBird# Posted December 3, 2012 Share Posted December 3, 2012 WeaponID = { [31] = true, [36] = true, [38] = true, } --add an event handler for onPlayerWeaponSwitch addEventHandler ( 'onPlayerWeaponSwitch', getRootElement ( ), function ( previousWeaponID, currentWeaponID ) if ( WeaponID[currentWeaponID] ) then toggleControl ( source, 'fire', false ) --disable the fire button else toggleControl ( source, 'fire', true ) --enable it end end ) Link to comment
d43dr4 Posted December 3, 2012 Author Share Posted December 3, 2012 يا عاشق الشرق لهنت السكربت كامل لمنع الاسلحة و الشوب خارج الساحة Link to comment
==>ҭᾄlᾄl Posted December 4, 2012 Share Posted December 4, 2012 https://wiki.multitheftauto.com/wiki/OnPlayerWeaponSwitchشف المثال ذاه انا مسويه يمنع السلاح حط الايد الي تبيه من الاسلحة الرادار في الخريطة : createRadarArea منع الشوب setElementData getElementData bindKey unbindKey Link to comment
d43dr4 Posted December 4, 2012 Author Share Posted December 4, 2012 يا طلال ماني مبرمج ولا اعرف كيف اسوي ذا اذا ممكن تسويو لي المود لاهنتو اذا تبون احداثيات ساحة القتال قولون ... Link to comment
iPrestege Posted December 4, 2012 Share Posted December 4, 2012 (edited) يا طلالماني مبرمج ولا اعرف كيف اسوي ذا اذا ممكن تسويو لي المود لاهنتو اذا تبون احداثيات ساحة القتال قولون ... تعلم [= + لية ماخذ حقوق سعد بالشوب حقة ؟؟؟ Edited December 4, 2012 by Guest Link to comment
d43dr4 Posted December 4, 2012 Author Share Posted December 4, 2012 ليه شباب الله يعافيكم ممكن المود ذا ؟؟ Link to comment
abu5lf Posted December 4, 2012 Share Posted December 4, 2012 bindKey unbindKey مايحتاج هذي ي شاطر Link to comment
d43dr4 Posted December 4, 2012 Author Share Posted December 4, 2012 عاشق الشرق لهنت السكربت كامل Link to comment
abu5lf Posted December 4, 2012 Share Posted December 4, 2012 عاشق الشرق لهنت السكربت كامل سكربت ويش؟ Link to comment
d43dr4 Posted December 4, 2012 Author Share Posted December 4, 2012 اقصد اذا ممكن كود كامل حق تختفى الاسللحة و يطفى الشوب لما تطلع برا الساحة Link to comment
abu5lf Posted December 4, 2012 Share Posted December 4, 2012 اقصد اذا ممكن كود كاملحق تختفى الاسللحة و يطفى الشوب لما تطلع برا الساحة حاول تسويه بنفسك ، واذا فيه خطأ اصححه لك. Link to comment
d43dr4 Posted December 4, 2012 Author Share Posted December 4, 2012 معرف برمجة انا .. للاسف Link to comment
abu5lf Posted December 4, 2012 Share Posted December 4, 2012 ابساعدك لانك كسرت خاطري جب لي كود فتح نافذة الشوب ، واحداثيات مكان المنع وارقام الاسلحة. Link to comment
d43dr4 Posted December 5, 2012 Author Share Posted December 5, 2012 عاشق الشرق الشوب مشفر *-* F2 لكنه ينفتح ب الاسلحة مسموحة في ساحة القتال فقط : ـ كود المنطقة الخضراء بالرادار local hillRadar = createRadarArea ( -3112.8400878906, -3183.6437988281, 200, 86, 0, 255, 0, 175 ) احداثيات الساحة :ـ -3113.6340332031 -- اقصى اليسار X -3183.6298828125 -- اقصى الجنوب Y -2916.1879882813 -- اقصى اليمين X -3107.737065469 -- اقصى الشمال Y ارقـآم الاسلحة :ـ "4", "9", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "16", "17" شكرا مسبقا على المساعدة Link to comment
abu5lf Posted December 5, 2012 Share Posted December 5, 2012 للأسف لازم كود فتح النافذة ، شوب من هو ؟ Link to comment
d43dr4 Posted December 5, 2012 Author Share Posted December 5, 2012 شوب العقرب او سعد المهم ذاك اللي فيه عصابات GX- HD- MFI Link to comment
abu5lf Posted December 5, 2012 Share Posted December 5, 2012 والله الطريقة لازم كود فتح النافذة مقدر افيدك بشئ من دونه Link to comment
d43dr4 Posted December 5, 2012 Author Share Posted December 5, 2012 اوك بغير شوب اخر مو مشفر Link to comment
d43dr4 Posted December 5, 2012 Author Share Posted December 5, 2012 ملف ال كلينت Client : root = getRootElement() localPlayer = getLocalPlayer() outputChatBox("#000000===[#ff0000Shop Panel #000000v.1 #ff0000BY #000000===|#ff0000Na#000000IF|=== & ===|NaIF|=== #000000| #000000Press #ff0000F2 #000000To Open It #000000]===",0,255,0,true) shopWindow = guiCreateWindow(400,70,540,610,"Shop Panel BY ===|OSAMA|=== & ===|$AFAH|=== ",false) guiSetVisible (shopWindow, false) guiWindowSetSizable(shopWindow,false) guiWindowSetMovable(shopWindow,true) tabPanel = guiCreateTabPanel(11,23,599,600,false,shopWindow) ------------------------------------------------------------------------------------------------------- tab2 = guiCreateTab("Weapons",tabPanel) --------- ????? 1 -line 1 ------------------------------------------------------------------------------------ guiCreateStaticImage( 10,10,90,75, "weapon/21.png", false,tab2 ) weapButton_14 = guiCreateButton(10,80,90,30,"Pistol $600",false,tab2 ) guiCreateStaticImage( 110,10,90,75, "weapon/2.png", false,tab2 ) weapButton_18 = guiCreateButton(110,80,85,30,"Silenced $700",false,tab2 ) --------------------------------- guiCreateStaticImage( 210,10,90,75, "weapon/24.png", false,tab2 ) weapButton_1 = guiCreateButton(210,80,95,30,"Desert Eeagle $700",false,tab2) --------------------------------- guiCreateStaticImage( 310,10,90,75, "weapon/31.png", false,tab2 ) weapButton_2 = guiCreateButton(310,80,90,30,"M4 $750",false,tab2) -------------------------------- guiCreateStaticImage( 410,10,90,75, "weapon/19.png", false,tab2 ) weapButton_17 = guiCreateButton(410,80,95,30,"Fire Extinguisher 400$",false,tab2 ) -------------------------2 ?????----------------------------------------------------------------------------------------------------------- guiCreateStaticImage( 10,110,90,80, "weapon/5.png", false,tab2 ) weapButton_4 = guiCreateButton(10,190,90,30,"AK-47 $700",false,tab2) guiCreateStaticImage( 110,110,90,80, "weapon/6.png", false,tab2 ) weapButton_5 = guiCreateButton(110,190,90,30,"MP5 $600",false,tab2) guiCreateStaticImage( 210,110,90,80, "weapon/7.png", false,tab2 ) weapButton_11 = guiCreateButton(210,190,90,30,"Sawn off $750",false,tab2 ) guiCreateStaticImage( 310,110,90,80, "weapon/8.png", false,tab2 ) weapButton_6 = guiCreateButton(310,190,90,30,"TEC-9 $600",false,tab2 ) guiCreateStaticImage( 410,110,90,80, "weapon/26.png", false,tab2 ) weapButton_24 = guiCreateButton(410,190,90,30,"Katana $400",false,tab2 ) -------------------------------------------------------------------------- line 3 guiCreateStaticImage( 10,220,90,80, "weapon/11.png", false,tab2 ) weapButton_8 = guiCreateButton(10,300,90,30,"Uzi $650",false,tab2) guiCreateStaticImage( 110,220,90,80, "weapon/17.png", false,tab2 ) weapButton_10 = guiCreateButton(110,300,90,30,"Shotgun $600",false,tab2) guiCreateStaticImage( 210,220,90,80, "weapon/10.png", false,tab2 ) weapButton_12 = guiCreateButton(210,300,90,30,"Combat $700",false,tab2 ) guiCreateStaticImage( 310,220,90,75, "weapon/3.png", false,tab2 ) weapButton_35 = guiCreateButton(310,300,90,30,"Rifle $1800",false,tab2) guiCreateStaticImage( 410,220,90,80, "weapon/14.png", false,tab2 ) weapButton_7 = guiCreateButton(410,300,90,30,"Sniper $700",false,tab2) --------------------------------------------------------------------------------------line 4 guiCreateStaticImage( 10,330,90,80, "weapon/18.png", false,tab2 ) weapButton_15 = guiCreateButton(10,410,90,30,"Chainsaw $500",false,tab2 ) guiCreateStaticImage( 110,330,90,80, "weapon/1.png", false,tab2 ) weapButton_13 = guiCreateButton(110,410,90,30,"Knife $500",false,tab2 ) guiCreateStaticImage( 210,330,90,80, "weapon/13.png", false,tab2 ) weapButton_16 = guiCreateButton(210,410,90,30,"Tear gas $1500",false,tab2 ) guiCreateStaticImage( 310,330,90,75, "weapon/20.png", false,tab2 ) weapButton_3 = guiCreateButton(310,410,90,30,"Grenade $1800",false,tab2) guiCreateStaticImage( 410,330,90,80, "weapon/9.png", false,tab2 ) weapButton_19 = guiCreateButton(410,410,90,30,"Satchel $2000",false,tab2 ) --------------------------------------------------------------------------------------line 5 guiCreateStaticImage( 10,440,90,80, "weapon/23.png", false,tab2 ) weapButton_23 = guiCreateButton(10,520,90,30,"Spraycan $500",false,tab2 ) guiCreateStaticImage( 110,440,90,80, "weapon/16.png", false,tab2 ) weapButton_9 = guiCreateButton(110,520,90,30,"Parachute $250",false,tab2) guiCreateStaticImage( 210,440,90,80, "weapon/15.png", false,tab2 ) weapButton_20 = guiCreateButton(210,520,90,30,"Minigun $2500",false,tab2 ) guiCreateStaticImage( 310,440,102,80, "weapon/25.png", false,tab2 ) weapButton_21 = guiCreateButton(310,520,98,30,"Rocket Launcher $2500",false,tab2 ) guiCreateStaticImage( 410,440,105,80, "weapon/22.png", false,tab2 ) weapButton_22 = guiCreateButton(410,520,103,30,"Heat-Seeking RPG $3000",false,tab2 ) --------------------------------------الشوب-------------------------------------------------3tab tab3 = guiCreateTab("Shop-1",tabPanel) --------------------------------------------------------------------------------------------------------- -------------------------------- --------------------------------------الشوب-------------------------------------------------4tab tab4 = guiCreateTab("Shop-2",tabPanel) --------------------------------------------------------------------------------------------------------- -------------------------------- ----------------------------------------------------------------------------------------------------------- bindKey ( "F2" , "down" , function() if ( guiGetVisible ( shopWindow ) == true ) then guiSetVisible ( shopWindow ,false ) showCursor (false ) guiSetInputEnabled(false) elseif ( guiGetVisible ( shopWindow ) == false ) then guiSetVisible ( shopWindow ,true ) showCursor (false ) guiSetInputEnabled(true) playSound("xOSAMA.mp3") end end ) ------------------------------------------------------------------------------------------------------ -------------------------------------------------------------------بدايه ربط الازرار بالسيرفر server---------- addEventHandler ("onClientGUIClick", getRootElement(), function(button, state, absoluteX, absoluteY) if ( source == weapButton_1 ) then triggerServerEvent("gived",getLocalPlayer()) end end ) addEventHandler ("onClientGUIClick", getRootElement(), function(button, state, absoluteX, absoluteY) if ( source == weapButton_2 ) then triggerServerEvent("givem4",getLocalPlayer()) end end ) addEventHandler ("onClientGUIClick", getRootElement(), function(button, state, absoluteX, absoluteY) if ( source == weapButton_3 ) then triggerServerEvent("givegrn",getLocalPlayer()) end end ) addEventHandler ("onClientGUIClick", getRootElement(), function(button, state, absoluteX, absoluteY) if ( source == weapButton_4 ) then triggerServerEvent("givemk",getLocalPlayer()) end end ) addEventHandler ("onClientGUIClick", getRootElement(), function(button, state, absoluteX, absoluteY) Link to comment
abu5lf Posted December 5, 2012 Share Posted December 5, 2012 ياخي الكريم انا لا اقصد الملف كامل بس جزئية bindKey واستخدم زر lua عند وضع الكود Link to comment
d43dr4 Posted December 5, 2012 Author Share Posted December 5, 2012 bindKey ( "F2" , "down" , function() if ( guiGetVisible ( shopWindow ) == true ) then guiSetVisible ( shopWindow ,false ) showCursor (false ) guiSetInputEnabled(false) elseif ( guiGetVisible ( shopWindow ) == false ) then guiSetVisible ( shopWindow ,true ) showCursor (false ) guiSetInputEnabled(true) playSound("xOSAMA.mp3") end end ) Link to comment
./BlackBird# Posted December 5, 2012 Share Posted December 5, 2012 function bind() guiSetVisible ( shopWindow ,not guiSetVisible(guiSetVisible )) showCursor (guiSetVisible(guiSetVisible )) guiSetInputEnabled(guiSetVisible(guiSetVisible )) end bindKey('f2','down',bind) col = createColCuboid( ... ) addEventHandler('onClientColShapeHit',col, function(hit) if(getElementType(hit)=='player')then bindKey('f2','down',bind) end end) addEventHandler('onClientColShapeLeave',col, function(leave) if(getElementType(leave)=='player')then unbindKey('f2','down',bind) end end) Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now