Jump to content

طلب سكربت


MeZo999

Recommended Posts

سلام عليكم يا شباب تفكون ابي كود

او سكربت

الحين اشرح لكم شو الي ابيه

ابي سكربت لفتح بوابه رقم البوابه 980 حلو

يكون من زر tap

يكون لتيم معين تيم يعني مش من جروب او مود جروبات الحين انا ساويت تيم كيف يعني تيم صح يكون في حرب العصابات

نو تيم + الشرطه + واعصابات ثانيه

اانا ابي بس لتيم الشرطه

يا حبيبي يكون كامل ربنا يخليكم

Link to comment

local object = createObject(980, x,y,z) 
local marker = createMarker(x,y,z, "cylinder", 6, 0, 0, 0, 0) 
move = false 
function door ( player ) 
if isElementWithinMarker ( player, marker ) then 
if getPlayerTeam ( player ) == getTeamFromName ( "Police" ) then 
if move then 
moveObject(object, 3000, x,y,z) 
move = false 
else 
moveObject(object, 3000, x,y,z) 
move = true 
end 
end 
end 
end 
  
addEventHandler ( "onResourceStart", resourceRoot, 
function ( ) 
for _, v in ipairs ( getElementsByType ( "player" ) ) do 
bindKey ( v, "tab", "down", door ) 
end 
end 
) 
      
addEventHandler ( "onPlayerJoin", root, 
function (player) 
bindKey ( player, "tab", "down", door ) 
end 
) 
Link to comment
local object = createObject(980, x,y,z) 
local marker = createMarker(x,y,z, "cylinder", 6, 0, 0, 0, 0) 
move = false 
function door ( player ) 
if isElementWithinMarker ( player, marker ) then 
if getPlayerTeam ( player ) == getTeamFromName ( "Police" ) then 
if move then 
moveObject(object, 3000, x,y,z) 
move = false 
else 
moveObject(object, 3000, x,y,z) 
move = true 
end 
end 
end 
end 
  
addEventHandler ( "onResourceStart", resourceRoot, 
function ( ) 
for _, v in ipairs ( getElementsByType ( "player" ) ) do 
bindKey ( v, "tab", "down", door ) 
end 
end 
) 
      
addEventHandler ( "onPlayerJoin", root, 
function (player) 
bindKey ( player, "tab", "down", door ) 
end 
) 

اخوي ما زبط معي ولله اول شيئ حطيت احدثيات البوابه الي بدها تسير

2 عدلت على

moveObject(object, 3000, x,y,z) وان بدها تروح البوابه

و الثانيه الي مثلها

moveObject(object, 3000, x,y,z)

حطيت وان ترجع البوابه بس اطلع الماركر

و حطيته في ملف نوع lua

وما ضبط معي تئكد منه ربي يخليك

شباب ساعدوني ربي يخليكم

Link to comment
local object = createObject(980, x,y,z) 
local marker = createMarker(x,y,z, "cylinder", 6, 0, 0, 0, 0) 
move = false 
function door ( player ) 
if isElementWithinMarker ( player, marker ) then 
if getPlayerTeam ( player ) == getTeamFromName ( "Police" ) then 
if move then 
moveObject(object, 3000, x,y,z) 
move = false 
else 
moveObject(object, 3000, x,y,z) 
move = true 
end 
end 
end 
end 
  
addEventHandler ( "onResourceStart", resourceRoot, 
function ( ) 
for _, v in ipairs ( getElementsByType ( "player" ) ) do 
bindKey ( v, "tab", "down", door ) 
end 
end 
) 
      
addEventHandler ( "onPlayerJoin", root, 
function (player) 
bindKey ( player, "tab", "down", door ) 
end 
) 

.. في عندكـ شوية أخطاء ونقص تحققات

بالنسبة لصاحب الموضوع، طلبكـ موجود من قبل، مرة ثانية ابحث زين قبل تطلب .. تفضل الكود

https://forum.multitheftauto.com/viewtopic.php?f=160&t=57051#p550636

-- Server Side !
local Object = createObject ( ID, x, y, z, rx, ry, rz ) 
local Marker = createMarker ( x, y, z, "cylinder", size, 0, 0, 0, 0 ) 
  
function OpenObject ( player ) 
    if ( isElementWithinMarker ( player, Marker ) ) then 
        if ( getPlayerTeam ( player ) ) and ( getPlayerTeam ( player ) == getTeamFromName ( "Team Name" ) ) then 
            if not ( Open ) then 
                moveObject ( Object, 1500, moveX, moveY, moveZ ) 
            else 
                moveObject ( Object, 1500, x, y, z ) 
            end 
            Open = not Open 
        else 
            outputChatBox ( "* You must be in 'Team Name' team !", player, 200, 0, 0, true ) 
        end 
    end 
end 
  
addEventHandler ( "onResourceStart", resourceRoot, 
    function ( ) 
        for _, v in ipairs ( getElementsByType ( "player" ) ) do 
            bindKey ( v, "tab", "down", OpenObject ) 
        end 
    end 
) 
  
addEventHandler ( "onPlayerJoin", root, 
    function ( ) 
        bindKey ( source, "tab", "down", OpenObject ) 
    end 
) 

الإستبدآل ,

السسطر الأول ,

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

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

rx, ry, rz = إحداثيات دوران الأوبجكت / إذا تبيه بدون دوران خلها كلها صفر ( 0 ) ذذ

السسطر الثآني ,

x, y, z = إحداثيات الماركر الي إذا كنت فيه وتكبس زر تاب يفتح البوابة او يقفلها

size = حجم الماركر

السسطر السادس ,

Team Name = إسم التيم الي تبي الأوبجكت يفتح له فقط

السسطر الثامن ,

moveX, moveY, moveZ = إحداثيات الأوبجكت عند تحريكه

السسطر العاشر ( 10 ) ذذ ,

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

السسطر الرابع عششر ( 14 ) ذذ ,

Team Name = إسم التيم الي تبي الأوبجكت يفتح له فقط

Link to comment
local object = createObject(980, x,y,z) 
local marker = createMarker(x,y,z, "cylinder", 6, 0, 0, 0, 0) 
move = false 
function door ( player ) 
if isElementWithinMarker ( player, marker ) then 
if getPlayerTeam ( player ) == getTeamFromName ( "Police" ) then 
if move then 
moveObject(object, 3000, x,y,z) 
move = false 
else 
moveObject(object, 3000, x,y,z) 
move = true 
end 
end 
end 
end 
  
addEventHandler ( "onResourceStart", resourceRoot, 
function ( ) 
for _, v in ipairs ( getElementsByType ( "player" ) ) do 
bindKey ( v, "tab", "down", door ) 
end 
end 
) 
      
addEventHandler ( "onPlayerJoin", root, 
function (player) 
bindKey ( player, "tab", "down", door ) 
end 
) 

×

addEventHandler ( "onPlayerJoin", root, 
function (player) 
bindKey ( player, "tab", "down", door ) 
end 

التصحيح :

addEventHandler ( "onPlayerJoin", root, function ( ) 
bindKey ( source, "tab", "down", door ) 
end 

Link to comment

التصحيح^

local object = createObject(980, x,y,z) 
local marker = createMarker(x,y,z, "cylinder", 6, 0, 0, 0, 0) 
move = false 
function door ( player ) 
if isElementWithinMarker ( player, marker ) then 
if getPlayerTeam ( player ) == getTeamFromName ( "Police" ) then 
if move then 
moveObject(object, 3000, x,y,z) 
move = false 
else 
moveObject(object, 3000, x,y,z) 
move = true 
end 
end 
end 
end 
  
addEventHandler ( "onResourceStart", resourceRoot, 
function ( ) 
for _, v in ipairs ( getElementsByType ( "player" ) ) do 
bindKey ( v, "tab", "down", door ) 
end 
end 
) 
      
addEventHandler ( "onPlayerJoin", root, 
function () 
bindKey ( source, "tab", "down", door ) 
end 
) 
Link to comment
local object = createObject(980, x,y,z) 
local marker = createMarker(x,y,z, "cylinder", 6, 0, 0, 0, 0) 
move = false 
function door ( player ) 
if isElementWithinMarker ( player, marker ) then 
if getPlayerTeam ( player ) == getTeamFromName ( "Police" ) then 
if move then 
moveObject(object, 3000, x,y,z) 
move = false 
else 
moveObject(object, 3000, x,y,z) 
move = true 
end 
end 
end 
end 
  
addEventHandler ( "onResourceStart", resourceRoot, 
function ( ) 
for _, v in ipairs ( getElementsByType ( "player" ) ) do 
bindKey ( v, "tab", "down", door ) 
end 
end 
) 
      
addEventHandler ( "onPlayerJoin", root, 
function (player) 
bindKey ( player, "tab", "down", door ) 
end 
) 

.. في عندكـ شوية أخطاء ونقص تحققات

بالنسبة لصاحب الموضوع، طلبكـ موجود من قبل، مرة ثانية ابحث زين قبل تطلب .. تفضل الكود

https://forum.multitheftauto.com/viewtopic.php?f=160&t=57051#p550636

-- Server Side !
local Object = createObject ( ID, x, y, z, rx, ry, rz ) 
local Marker = createMarker ( x, y, z, "cylinder", size, 0, 0, 0, 0 ) 
  
function OpenObject ( player ) 
    if ( isElementWithinMarker ( player, Marker ) ) then 
        if ( getPlayerTeam ( player ) ) and ( getPlayerTeam ( player ) == getTeamFromName ( "Team Name" ) ) then 
            if not ( Open ) then 
                moveObject ( Object, 1500, moveX, moveY, moveZ ) 
            else 
                moveObject ( Object, 1500, x, y, z ) 
            end 
            Open = not Open 
        else 
            outputChatBox ( "* You must be in 'Team Name' team !", player, 200, 0, 0, true ) 
        end 
    end 
end 
  
addEventHandler ( "onResourceStart", resourceRoot, 
    function ( ) 
        for _, v in ipairs ( getElementsByType ( "player" ) ) do 
            bindKey ( v, "tab", "down", OpenObject ) 
        end 
    end 
) 
  
addEventHandler ( "onPlayerJoin", root, 
    function ( ) 
        bindKey ( source, "tab", "down", OpenObject ) 
    end 
) 

الإستبدآل ,

السسطر الأول ,

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

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

rx, ry, rz = إحداثيات دوران الأوبجكت / إذا تبيه بدون دوران خلها كلها صفر ( 0 ) ذذ

السسطر الثآني ,

x, y, z = إحداثيات الماركر الي إذا كنت فيه وتكبس زر تاب يفتح البوابة او يقفلها

size = حجم الماركر

السسطر السادس ,

Team Name = إسم التيم الي تبي الأوبجكت يفتح له فقط

السسطر الثامن ,

moveX, moveY, moveZ = إحداثيات الأوبجكت عند تحريكه

السسطر العاشر ( 10 ) ذذ ,

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

السسطر الرابع عششر ( 14 ) ذذ ,

Team Name = إسم التيم الي تبي الأوبجكت يفتح له فقط

شكرأ لك عشان جبت الموضوع لي لاكني بحثت

مشكور اخي الي حط الرد

ما قصرت روح ربي يخلك

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