Jump to content

ديربي


mody134

Recommended Posts

Posted (edited)

معاى كود قفل الوحة فى الديربي 
عايز اخلية يفتح الوحة لسريال محدد
الكود 
buttons = { 
    ['F1'] = true, 
    ['F3'] = true, 
    ['b'] = true, 
    ['F4'] = true, 
    ['F5'] = true, 
    ['F6'] = true, 
    ['F7'] = true, 
    ['F9'] = true,
    ['p'] = true,
    ['h'] = true,
    

  
addEventHandler( 'onClientKey', root, function (button , prees) 
    if prees and getElementDimension(localPlayer) == 30 then 
        if buttons[button] then 
            outputChatBox("غير مصرح لك بفتح اللوحة ", 255, 0, 0) 
            cancelEvent() 
        end 
    end 
end) 

 

 

Edited by mody134
Posted

جربت ذا الكود وخربت الوحة 

 

  1. Serial = { -- سريال الاعب المصرح لهم
  2. ["ضع سريالك هنا"] = true,
  3. --["ضع سريالك هنا"] = true,
  4. --["ضع سريالك هنا"] = true,
  5. --["ضع سريالك هنا"] = true,
  6. }
  7.  
  8.  
  9. local buttons = { -- لوحات الي تمنعها
  10. ['F1'] = true,
  11. ['p'] = true,
  12. ['['] = true,
  13. [']'] = true,
  14. }
  15.  
  16. addEventHandler( 'onClientKey', root, function (button , press)
  17. if press and getElementDimension(localPlayer) == 30 or getElementDimension(localPlayer) == العالم الثاني then -- رقم العالم
  18. if buttons[button] then -- عند الضغط على الازرار
  19. local PlayerSerial = getPlayerSerial(localPlayer) --- يجيب سريال الاعب
  20. if ( Serial[PlayerSerial] ) then -- اذا كان سريال الاعب من ضمن الجدول
  21. outputChatBox(" تم فتح الوحة ", 255, 0, )
  22. else --- العكس
  23. outputChatBox("غير مصرح لك بفتح اللوحة الان ", 255, 0, 0)
  24. cancelEvent() -- يكنسل الشي
  25. end
  26. end
  27. end
  28. end
  29. )
Posted
buttons = { 
    ['F1'] = true, 
    ['F3'] = true, 
    ['b'] = true, 
    ['F4'] = true, 
    ['F5'] = true, 
    ['F6'] = true, 
    ['F7'] = true, 
    ['F9'] = true,
    ['p'] = true,
    ['h'] = true,
} 
  
addEventHandler( 'onClientKey',root, 
    function ( button,prees ) 
    if prees and getElementDimension ( localPlayer ) == 30 then 
        if buttons [ button ] then 
        if getPlayerSerial () == 'Your Serial Here' then return end
            outputChatBox ( 'غير مصرح لك بفتح اللوحة',255,0,0 ) 
            cancelEvent (       ) 
        end 
    end 
end
) 

 

 

Posted

حطت السريال ولسة الوحة مقفولة

 

buttons = { 
    ['F1'] = true, 
    ['F3'] = true, 
    ['b'] = true, 
    ['F4'] = true, 
    ['F5'] = true, 
    ['F6'] = true, 
    ['F7'] = true, 
    ['F9'] = true,
    ['p'] = true,
    ['h'] = true,

  
addEventHandler( 'onClientKey',root, 
    function ( button,prees ) 
    if prees and getElementDimension ( localPlayer ) == 30 then 
        if buttons [ button ] then 
        if getPlayerSerial () == '28251FCA0FFFFBEC7F5F8FC619B14902' then return end
            outputChatBox ( 'غير مصرح لك بفتح اللوحة',255,0,0 ) 
            cancelEvent (       ) 
        end 
    end 
end

 

Posted
 

حطت السريال ولسة الوحة مقفولة

 

buttons = { 
    ['F1'] = true, 
    ['F3'] = true, 
    ['b'] = true, 
    ['F4'] = true, 
    ['F5'] = true, 
    ['F6'] = true, 
    ['F7'] = true, 
    ['F9'] = true,
    ['p'] = true,
    ['h'] = true,

  
addEventHandler( 'onClientKey',root, 
    function ( button,prees ) 
    if prees and getElementDimension ( localPlayer ) == 30 then 
        if buttons [ button ] then 
        if getPlayerSerial () == '28251FCA0FFFFBEC7F5F8FC619B14902' then return end
            outputChatBox ( 'غير مصرح لك بفتح اللوحة',255,0,0 ) 
            cancelEvent (       ) 
        end 
    end 
end

 

getPlayerSerial
cancelEvent () 

 

Posted

اعتذر منك أخوي حصل تغيير في وظيفة سريال الاعب لذلك تقدر تسوي كذا بالسيرفر سايد :

-- Server Side !!!!!

addEventHandler ( 'onResourceStart',resourceRoot,
    function (      )
        for _,aPlayer in next,getElementsByType ( 'player' ) do
            if getPlayerSerial ( aPlayer ) then
                setElementData ( aPlayer,'aPlayerSerial',getPlayerSerial ( aPlayer ) )
            end
        end
    end
)

addEventHandler ( 'onPlayerJoin',root,
    function (  )
        if getPlayerSerial ( source ) then
                setElementData ( source,'aPlayerSerial',getPlayerSerial ( source ) )
        end
    end
)

 

 

وبالكلنت كذا :

 

buttons = { 
    ['F1'] = true, 
    ['F3'] = true, 
    ['b'] = true, 
    ['F4'] = true, 
    ['F5'] = true, 
    ['F6'] = true, 
    ['F7'] = true, 
    ['F9'] = true,
    ['p'] = true,
    ['h'] = true,
} 
  
addEventHandler( 'onClientKey',root, 
    function ( button,prees ) 
    if prees and getElementDimension ( localPlayer ) == 30 then 
        if buttons [ button ] then 
        if getElementData ( localPlayer,'aPlayerSerial' ) == 'Your Serial Here' then return end
            outputChatBox ( 'غير مصرح لك بفتح اللوحة',255,0,0 ) 
            cancelEvent (       ) 
        end 
    end 
end
) 

 

 

جرب ورد لي خبر

Posted
 

السيرفر سايد الى هو ملف سيرفر 

جرب هذا

buttons = {
    ['F1'] = true,
    ['F3'] = true,
    ['b'] = true,
    ['F4'] = true,
    ['F5'] = true,
    ['F6'] = true,
    ['F7'] = true,
    ['F9'] = true,
    ['p'] = true,
    ['h'] = true,
}

addEventHandler( 'onClientKey',root,
    function ( Player, button, prees )
        if not getPlayerSerial ( Player ) == '28251FCA0FFFFBEC7F5F8FC619B14902' then
            if prees and getElementDimension ( localPlayer ) == 30 then
                if buttons [ button ] then
                    outputChatBox ( 'غير مصرح لك بفتح اللوحة',255,0,0 )
                    cancelEvent ( )
                end
            end
        outputChatBox ( 'تم فتح اللوحة',0,255,0 )
        end
    end
)

ملاحظة انا ما جربته

Posted
 

حطتة بملف سيرفر ولسة الوحة مشتغلتش

تصميم ال gui
ما يشتغل في ملف السيرفر
وافينت onClientKey
او اي افينت فيه كلمه Client
ما يشتغل في ملف سيرفر 
اربط ملف سيرفر بملف الكلينت عن طريق الترايجر
 -

triggerServerEvent
triggerClientEvent
Posted
17 minutes ago, mody134 said:

حطتة بملف سيرفر ولسة الوحة مشتغلتش

ماهو كلة سيرفر الجزء الخاص بالضغط كلنت والجزء الخاص بالداتا سيرفر

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...