Jump to content

Group system كود


Recommended Posts

ابي كود لمود جروب سيستم

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

غير الي مسوي جروب بأسم معين

Link to comment
if ( getElementData(playerElement,"Group") == "Group" ) then 

ما ظبت شوف الأكواد

local Object = createObject ( 980, 1270.5, -1650, 16, 0, 0 ,90 ) 
  
local Marker = createMarker ( 1272.3994140625, -1650.7998046875, 10.800000190735, 'cylinder', 18, 0, 0, 0, 0 ) 
  
open = false 
  
  
  
function OpenObject ( player ) 
  
        if isElementWithinMarker ( player, Marker ) then 
  
                local accName = getAccountName ( getPlayerAccount ( player ) ) 
  
                if ( getElementData(playerElement,"KOL") == "KOL" ) then 
  
                        if not Open then 
  
                                moveObject ( Object, 1500, 1270.5, -1650, 8.1 ) 
  
                        else 
  
                                moveObject ( Object, 1500, 1270.5, -1650, 16 ) 
  
                        end 
  
                        Open = not Open 
  
                else 
  
                        outputChatBox ( '* You must be \'KOL\' !', 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 
  
) 

createBlip ( 1270.5, -1650, 16 , 20 )

Link to comment
local Object = createObject ( 980, 1270.5, -1650, 16, 0, 0 ,90 ) 
local Marker = createMarker ( 1272.3994140625, -1650.7998046875, 10.800000190735, 'cylinder', 18, 0, 0, 0, 0 ) 
open = false 
  
function OpenObject ( player ) 
    if isElementWithinMarker ( player, Marker ) then 
        if getElementData(player,"Group") == "KOL" then 
            if not Open then 
                    moveObject ( Object, 1500, 1270.5, -1650, 8.1 ) 
            else 
                moveObject ( Object, 1500, 1270.5, -1650, 16 ) 
            end 
            Open = not Open 
        else 
            outputChatBox ( '* You must be 'KOL' !', 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 ) 
  

Link to comment
local Object = createObject ( 980, 1270.5, -1650, 16, 0, 0 ,90 ) 
local Marker = createMarker ( 1272.3994140625, -1650.7998046875, 10.800000190735, 'cylinder', 18, 0, 0, 0, 0 ) 
open = false 
  
function OpenObject ( player ) 
    if isElementWithinMarker ( player, Marker ) then 
        if getElementData(player,"Group") == "KOL" then 
            if not Open then 
                    moveObject ( Object, 1500, 1270.5, -1650, 8.1 ) 
            else 
                moveObject ( Object, 1500, 1270.5, -1650, 16 ) 
            end 
            Open = not Open 
        else 
            outputChatBox ( '* You must be 'KOL' !', 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 ) 
  

مشكور مرة ظبت معايا

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