Jump to content

^^ تــــم ... شكـرا للمبــدعيــن


Recommended Posts

السلام عليكم و رحمة الله تعالى و بركاته

شباب بدي اطلب مود .. صراحة مو مود واحد

الاول اللي يخلي الاسلحة تختفي و الشوب يطفى بعد ما تطلع من ساحة القتال

بشوفه في سيرفرات .. في اف 11 تشوف مكان ساحة القتال منطقة خضراء

F2 عندي شوب حق سعد او العقرب ، ينفتح ب

_________________________________________________________

اما المود الثاني هو اللي يمنع اسلحة معينة

مثلا المينيجن و البازوكا

عندي واحد بس فيه خلل

يعني لما تمنع المينيجن (ID:38)

يمنع السيف كمان (ID:8)

لان 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 by Guest
Link to comment
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
يا طلال

ماني مبرمج ولا اعرف كيف اسوي ذا

اذا ممكن تسويو لي المود لاهنتو

اذا تبون احداثيات ساحة القتال قولون ...

تعلم [= +

لية ماخذ حقوق سعد بالشوب حقة ؟؟؟

Edited by Guest
Link to comment

عاشق الشرق

الشوب مشفر *-*

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

ملف ال كلينت 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
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
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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...