Jump to content

طلب كود


yazan

Recommended Posts

داري هذى اليوم غلبتكم معي لكن اخر طلب بيكون :oops:

لليوم ض1

هذى كودي ودي باب يغلق و يفتح زر تاب لكن بدون حدود يعني لو بعيد عن الباب عادي

  
door = createObject(3084, -2596.5, 1354.6999511719, 7.5999999046326,0,0,82) 
  
function open() 
       moveObject (door, 5000,-2596.6999511719, 1354.5999755859, 13.39999961853) 
end 
bindKey("TAP",door,moveObject) 
function close() 
       moveObject (door, 5000, -2596.5, 1354.6999511719, 7.5999999046326) 
end 
bindKey("TAP",door,moveObject) 
  

Link to comment

-- Server Side --

iLoveMyMother = true 
  
function MoveDoor() 
    if iLoveMyMother then 
        moveObject(door, 5000,-2596.6999511719, 1354.5999755859, 13.39999961853) 
    else 
        moveObject(door, 5000, -2596.5, 1354.6999511719, 7.5999999046326) 
    end 
    iLoveMyMother = not iLoveMyMother 
end 
  
addEventHandler("onResourceStart", resourceRoot, 
function() 
    door = createObject(3084, -2596.5, 1354.6999511719, 7.5999999046326,0,0,82) 
    for i, player in ipairs (getElementsByType("player")) do 
        bindTheKeys(player) 
    end 
end) 
  
addEventHandler("onPlayerJoin", root, 
function() 
    bindTheKeys(source) 
end) 
  
function bindTheKeys(player) 
    bindKey(player, "Tab", "down", MoveDoor) 
end 

Link to comment
-- Client Side !
bindKey( "tab", "down", 
    function ( ) 
        triggerServerEvent ( "moveObject", localPlayer ) 
    end 
) 

-- Server Side !

object = createObject ( ID, x, y, z ) 
open = false 
  
addEvent ( "moveObject", true ) 
addEventHandler ( "moveObject", root, 
    function ( ) 
        if isObjectInACLGroup ("user."..getAccountName ( getPlayerAccount ( source ) ), aclGetGroup ( "Admin" ) ) then 
            if open then 
                moveObject ( object, 1500, x, y, z ) 
                open = false 
            else 
                moveObject ( object, 1500, x, y, z ) 
                open = true 
            end 
        else 
            outputChatBox ( "* You are not Admin !", source, 210, 0, 0, true ) 
        end 
    end 
) 

الإستبدآل ,

السطر الأول ,

ID = رقم الأوبجكت

x, y, z = إحداثيات الأوبجكت

السطر التاسع ,

x, y, z = إحداثيات الأوبجكت , خلها مثل احداثيات السطر الأول الي هي احداثيات مكآن إنشاء الأوبجكت

السطر 12 ,

x, y, z = إحداثيات الأوبجكت لما اللاعب يكبس الزر وين تبي الأوبجكت يتحرك

Link to comment

الكود خران جربت كلنت و سيرفر

  
iLoveMyMother = true 
  
function MoveDoor() 
    if iLoveMyMother then 
        moveObject(door, 5000, -2646.6999511719, 1359.3000488281, 7.8000001907349) 
end 
    else 
        moveObject(door, 5000,  -2646.6000976563, 1355.3000488281, 7.8000001907349) 
    end 
    iLoveMyMother = not iLoveMyMother 
end 
  
addEventHandler("onResourceStart", resourceRoot, 
function() 
    door = createObject(10184, -2077.8000488281, 1358, 8.6999998092651,0,0,258) 
    for i, player in ipairs (getElementsByType("player")) do 
        bindTheKeys(player) 
    end 
end) 
  
addEventHandler("onPlayerJoin", root, 
function() 
    bindTheKeys(source) 
end) 
  
function bindTheKeys(player) 
    bindKey(player, "Tab", "down", MoveDoor) 
end 
  

Link to comment
object = createObject ( ID, x, y, z ) 
open = false 
  
addEvent ( "moveObject", true ) 
addEventHandler ( "moveObject", root, 
    function ( ) 
        if open then 
            moveObject ( object, 1500, x, y, z ) 
            open = false 
        else 
            moveObject ( object, 1500, x, y, z ) 
            open = true 
        end 
    end 
) 

والكلنت زي ما هو

Link to comment
الكود خران جربت كلنت و سيرفر
  
iLoveMyMother = true 
  
function MoveDoor() 
    if iLoveMyMother then 
        moveObject(door, 5000, -2646.6999511719, 1359.3000488281, 7.8000001907349) 
end 
    else 
        moveObject(door, 5000,  -2646.6000976563, 1355.3000488281, 7.8000001907349) 
    end 
    iLoveMyMother = not iLoveMyMother 
end 
  
addEventHandler("onResourceStart", resourceRoot, 
function() 
    door = createObject(10184, -2077.8000488281, 1358, 8.6999998092651,0,0,258) 
    for i, player in ipairs (getElementsByType("player")) do 
        bindTheKeys(player) 
    end 
end) 
  
addEventHandler("onPlayerJoin", root, 
function() 
    bindTheKeys(source) 
end) 
  
function bindTheKeys(player) 
    bindKey(player, "Tab", "down", MoveDoor) 
end 
  

هههههههههههه

تستهبل على مخي انت؟

تحط فيه أند و تقول خربان

شوف سطر7

Link to comment
الكود خران جربت كلنت و سيرفر
  
iLoveMyMother = true 
  
function MoveDoor() 
    if iLoveMyMother then 
        moveObject(door, 5000, -2646.6999511719, 1359.3000488281, 7.8000001907349) 
end 
    else 
        moveObject(door, 5000,  -2646.6000976563, 1355.3000488281, 7.8000001907349) 
    end 
    iLoveMyMother = not iLoveMyMother 
end 
  
addEventHandler("onResourceStart", resourceRoot, 
function() 
    door = createObject(10184, -2077.8000488281, 1358, 8.6999998092651,0,0,258) 
    for i, player in ipairs (getElementsByType("player")) do 
        bindTheKeys(player) 
    end 
end) 
  
addEventHandler("onPlayerJoin", root, 
function() 
    bindTheKeys(source) 
end) 
  
function bindTheKeys(player) 
    bindKey(player, "Tab", "down", MoveDoor) 
end 
  

هههههههههههه

تستهبل على مخي انت؟

تحط فيه أند و تقول خربان

شوف سطر7

:shock::shock::shock::shock:

اسف مش عارف من وين اجت :oops:

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