Jump to content

طلب كود


3ssol

Recommended Posts

جرب

    -- # Server Side .. 
      
      
    local marker = createMarker ( x,y,z,"cylinder",2,255,255,255,255 ) 
    local TableWeapons = { 
        [3] = true, 
    } 
  
    local TableWeapons2 = { 
        [31] = true, 
        [38] = true, -- حط الاسلحه الي تبيها 
    } 
      
    addEventHandler ( "onMarkerHit",marker, 
        function (   player     ) 
            if getElementType ( player ) == "player" and not isPedInVehicle  ( player ) then 
                local PlayerWeapon = getPedWeapon ( player ) 
            if  ( TableWeapons [ PlayerWeapon ] ) and not ( TableWeapons2 [ PlayerWeapon ] ) then 
                    return 
                        outputChatBox ( "عذراً ليس لديك آي سلاح", player, 255, 0, 0 ) 
                else 
                        outputChatBox ( "حسناً لديك آسلحة", player, 0, 255, 0 ) 
                        setPedArmor ( player,100 ) 
            end 
        end 
    end ) 
Link to comment

ي ذا كيلر

نفس مشكلت برستيج مافيش فرق :(

انا ابي اذا كان معاك فقط عصي شرطي مايدخلك واذا معاك عصي شرطي ومعك اسلحه ثانيه يدخلك

اذا معاك العصي بس مايدخل

فهمتوني ؟؟؟؟

لأن اكوادكم ماهي ضاببطه

Link to comment

ججرب .

Server Side !

   
local marker = createMarker ( x,y,z,"cylinder",2,255,255,255,255 ) 
  
local TableWeapons = { 
       [3] = true, 
} 
  
local NotAllow = { 
        [31] = true, 
        [38] = true, -- حط الاسلحه الي تبيها 
} 
      
    addEventHandler ( "onMarkerHit",marker, 
        function (   player     ) 
            if getElementType ( player ) == "player" and not isPedInVehicle  ( player ) then 
               local PlayerWeapon = getPedWeapon ( player ) 
               if ( NotAllow [ PlayerWeapon ] and not TableWeapons [ PlayerWeapon ] ) then return end 
                if  ( TableWeapons [ PlayerWeapon ] ) ) then 
                        outputChatBox ( "عذراً ليس لديك آي سلاح", player, 255, 0, 0 ) 
                else 
                        outputChatBox ( "حسناً لديك آسلحة", player, 0, 255, 0 ) 
                        setPedArmor ( player,100 ) 
            end 
        end 
    end ) 
Link to comment

نفس الشي للحين مافيه احد يعرف يسوي نفس الطلب

لو نقول انا ابيه مايدخل سلاح العصي حقت الشرطي

يعني لو لمست الماركر ومعاك فقط عصي الشرطي مايدخلك بس اذا لمست الماركر وماسك بيدك عصي الشرطي

بس معك اسلحه ثانيه يدخلك , انت كودك لو معك اسلحه ومعك عصي الشرطي وماسكها بيدي ولمست الماركر مايدخلني

وانا الي ابيه المهم يتحقق ان معك اسلحه ثاانيه غير الي انا احط الايدي حقهم بل جدول فهمت ؟

Link to comment

اسف بس حنا ما نشتغل عندك عشان تقول كلامك ذا

+

الكود شغال ,, بس انت اذا لمست الماركر ,, وانت حاط السلاح عصى ماراح يدخلك

بس اذا دخلت وانت معك سلاح يعني ماسك بيدك سلاح راح يدخلك !!

Link to comment

^ اولأ تكلم ب احترام

ثانين انا قلت مافيه احد للحين عرف يسوي الكود

واذا انت مااتعرف لاترد + انت لو قرائت موضوعي عدل بتفهم انا وش طلبت

كودك شغال صح بس مو نفس الطلب الي ابيه

انا ابي العصي ممنوعه بس اذا لمست الماركر ومعك عصي بس

يقولك ممنوع الدخول واذا مسكت الماركر و بيدك العصي بس معك اسلحه ثانيه مثل رشاش وكذا يدخلك

وصلت "؟

Link to comment

القصه مو قصه اننا ما نعرف , بس في رد يكفي عن كل الردود الثانيه وهو :

استخدم الوظيفة الخارجية الا حاطنها ف كودي getPedWeapons

يعني لو تسوي مثل ما قالك بيضبط وضعك ذذ

سوي جدول للاسلحه المسموحه والاسلحه الممنوعه وسوي تحققات بسيطه واذا ما عرفت اطرح المحاوله ,,

Link to comment
^ اولأ تكلم ب احترام

ثانين انا قلت مافيه احد للحين عرف يسوي الكود

واذا انت مااتعرف لاترد + انت لو قرائت موضوعي عدل بتفهم انا وش طلبت

كودك شغال صح بس مو نفس الطلب الي ابيه

انا ابي العصي ممنوعه بس اذا لمست الماركر ومعك عصي بس

يقولك ممنوع الدخول واذا مسكت الماركر و بيدك العصي بس معك اسلحه ثانيه مثل رشاش وكذا يدخلك

وصلت "؟

وش الي تكلم بأحترام ,, سبيتك ولا غلط عليك تكلم بأحترام ,, اقولك حنا ما نشتغل عندك كذا سبيت ؟

وبعدين لاحظ قلت لك اسف ,,, خخخ ويقول تكلم بأحترام اذا فيه واحد لازم يتكلم بأحترام فهو انت

+

كيف اذا ما تعرف لا ترد ؟؟؟

والكود الي طارحه لك ,, ذا وش وضعه ؟

الله يصلحك بس

Link to comment

فيه طريقه طويله شوي تحتاج جدولين ذذ,جرب,

-- Server Side # 
local weaponsDisable = {[1]=true,[2]=true,[3]=true,[4]=true,[5]=true,[6]=true,[7]=true,[8]=true,[9]=true,[10]=true,[11]=true,[12]=true,[14]=true,[15]=true,[42]=true,[43]=true,[44]=true,[45]=true} 
local weaponsAllow = {[16]=true,[17]=true,[18]=true,[22]=true,[23]=true,[24]=true,[25]=true,[26]=true,[27]=true,[28]=true,[29]=true,[30]=true,[31]=true,[32]=true,[33]=true,[34]=true,[35]=true,[36]=true,[37]=true,[38]=true,[39]=true,[40]=true,[41]=true,[42]=true} 
local marker = createMarker(...) 
  
addEventHandler('onMarkerHit', marker,function ( plr ) 
    if getElementType ( plr ) == "player" then 
        if #getPedWeapons(plr) == 0 or weaponsDisable[#getPedWeapons(plr)] and not weaponsAllow[#getPedWeapons(plr)] then  
            outputChatBox('ليس لديك اسلحة',plr,255,0,0)  end  
            if weaponsDisable[#getPedWeapons(plr)] or not weaponsDisable[#getPedWeapons(plr)] and weaponsAllow[#getPedWeapons(plr)] then 
                outputChatBox('لديك اسلحة',plr,0,0,255) 
                    setElementPosition(plr,x,y,z) 
            end 
        end 
    end 
) 
  
function getPedWeapons(ped) 
    local playerWeapons = {} 
    if ped and isElement(ped) and getElementType(ped) == "ped" or getElementType(ped) == "player" then 
        for i=2,9 do 
            local wep = getPedWeapon(ped,i) 
            if wep and wep ~= 0 then 
                table.insert(playerWeapons,wep) 
            end 
        end 
    else 
        return false 
    end 
    return playerWeapons 
end 
Edited by Guest
Link to comment

كفوو والله ي ذا بست ضبططط

بس المشكله

اذا معاي اسلحه ومعي عصي الشرطي ومسكت

الماركر يقولي

معك اسلحه

وبنفس الوقت يقولي

مامعك اسلحه بس ينقلني ض1

انا ابيه اذا ماسك العصي ومعي اسلحه ثانيه يدخلني ويقولي لديك اسلحه فقط

بدون مايقولي ليس لديك اسلحه

وبنفس الوقت يقول

لديك اسلحه

اتمني فهمت وشكككرا

Link to comment

-- Server Side # 
local weaponsDisable = {[1]=true,[2]=true,[3]=true,[4]=true,[5]=true,[6]=true,[7]=true,[8]=true,[9]=true,[10]=true,[11]=true,[12]=true,[14]=true,[15]=true,[42]=true,[43]=true,[44]=true,[45]=true} 
local weaponsAllow = {[16]=true,[17]=true,[18]=true,[22]=true,[23]=true,[24]=true,[25]=true,[26]=true,[27]=true,[28]=true,[29]=true,[30]=true,[31]=true,[32]=true,[33]=true,[34]=true,[35]=true,[36]=true,[37]=true,[38]=true,[39]=true,[40]=true,[41]=true,[42]=true} 
local marker = createMarker(...) 
  
  
addEventHandler('onMarkerHit', marker,function ( plr ) 
    if getElementType ( plr ) == "player" then 
        if  weaponsDisable[#getPedWeapons(plr)] or not weaponsDisable[#getPedWeapons(plr)] and weaponsAllow[#getPedWeapons(plr)] then 
            outputChatBox('لديك اسلحة',plr,0,0,255) 
                setElementPosition(plr,x,y,z) 
    else  
            if #getPedWeapons(plr) == 0 or weaponsDisable[#getPedWeapons(plr)] and not weaponsAllow[getPedWeapon(plr)] then 
                outputChatBox('ليس لديك اسلحة',plr,255,0,0)  
                end 
            end 
        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...