Jump to content

ابي اسوي مقر


1REDBULL

Recommended Posts

السلام عليكم

كيف حالكم انشالله بخير

شباب انا بغيت منكم كود بسيط انشالله

انا مثلا عندي الحين ماب او مقر بس ابي كود

ان هذا الماب يصير ل قروب معين او اعضاء معينين

انشالله فهمتو قصدي و انشالله بسيط

Link to comment

السباون

-- # Server Side : 
addEventHandler("onPlayerWasted",getRootElement(), -- حدث عند الوفآهـ - الموت 
    function ( ) -- وظيفة 
        if ( getElementData ( source , "Group" ) == "Group Name" ) then -- تحقق من القروب بالداتا 
            spawnPlayer ( source , x , y , z ) -- سباون للاعب 
        end -- اغلاق if 
    end -- اغلاق الوظيفة 
) -- اغلاق الايفنت # 

امسح الكلام العربي

Edited by Guest
Link to comment

الدم والدرع

marker = createMarker ( 1925, 484, 61, "cylinder", 2, 255, 0, 255, 255 ) 
      
addEventHandler ( "onMarkerHit", marker, 
    function ( player ) 
        if getElementType ( player ) == "player" then 
            local playerTeam = getPlayerTeam ( player ) 
            if playerTeam then 
                if playerTeam == getTeamFromName ( "اسم القروب" ) then 
                    setPedStat ( player, 24, 989 ) 
                    setElementHealth ( player, 200 ) 
                    setPedArmor ( player, 100 ) 
                    setPedSkin ( player, 115 ) 
                else 
                    outputChatBox ( "* You most be 'اسم القروب'", player, 0, 0, 255, true ) 
                end 
            end 
        end 
    end 
, false ) 
  
  

Edited by Guest
Link to comment

البوابه

Team = "اسم الفريق" 
local Object = createObject ( ID, x, y, z, rx, ry, rz ) 
local Marker = createMarker ( -11.482395172119, 2071.0393066406, 17.4921875, "cylinder", size, 0, 0, 0, 80 ) 
  
function OpenObject ( player ) 
    if isElementWithinMarker ( player, Marker ) then 
        if ( getTeamName( getPlayerTeam( player ) ) == Team ) 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 aren't in ["..Team.."] 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 
) 

Edited by Guest
Link to comment
https://forum.multitheftauto.com/viewtopic.php?f=160&t=46670

صاحب الموضوع تبي تيم ولا مود القروبات؟

لا انا ابي اسوي مقر ل قروب معين (: :D

قصدك تبي احد يسوي لك مقر ؟

لا انا عندي مقر جاهز بس ابي اخليه لقروب معين يعني انا عندي قروب اسمه ARMY

ابي بس الي في هذا القروب يدخلون فيه

Link to comment
marker = createMarker ( x, y, z, "cylinder", 2, 255, 0, 255, 255 ) 
      
addEventHandler ( "onMarkerHit", marker, 
function ( player ) 
if getElementType ( player ) == "player" then 
if getElementData( player ,'Group') == 'ARMY' then 
   setElementHealth ( player, 100 ) 
   setPedArmor ( player, 100 ) 
   setPedSkin ( player, 115 ) 
   else 
   outputChatBox ( "* You most be ARMY Group ", player, 0, 0, 255, true ) 
end 
end 
end 
, false ) 
  
  

  
  
local Object = createObject ( ID, x, y, z, rx, ry, rz ) 
local Marker = createMarker (x, y, z, "cylinder", size, 0, 0, 0, 80 ) 
  
function OpenObject ( player ) 
    if isElementWithinMarker ( player, Marker ) then 
         if getElementData( player ,'Group') == 'ARMY' 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 aren't in [ ARMY ] 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 
) 

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