Jump to content

تصحيح كود


Recommended Posts

السلام عليكم .. الحين الكود ذا لتيم معين التيم هذا اذا دخلت الكول شيب ما يموت

بس لو واحد من تيم ثاني يموت الكود ضبط بس المشكله انه يذبحني

اذا كنت في التيم هذا او في التيم هذا

وش الغلط ؟

safecol = createColCuboid ( 226.66602, 1586.66602, 17.640625, 255, 255, 255 ) 
safeZoneRadar = createRadarArea ( 226.66602, 1586.66602, 255, 255, 255, 255, 255 ) 
  
  
function enterZone(hitPlayer,thePlayer) 
local Team = getPlayerTeam (hitPlayer) 
      if ( Team == Admin ) then 
    toggleControl (hitPlayer, "fire", true ) 
    toggleControl (hitPlayer, "aim_weapon", true) 
    toggleControl (hitPlayer, "vehicle_fire", true) 
    outputChatBox("Welcome To Your Base Sir !!", hitPlayer, 255, 255, 0) 
       else 
         killPed (hitPlayer) 
end 
end 
addEventHandler( "onColShapeHit", safecol, enterZone ) 
  
function leaveZone(hitPlayer,thePlayer) 
local Team = getPlayerTeam (hitPlayer) 
    toggleControl (hitPlayer, "fire", true) 
    toggleControl (hitPlayer, "aim_weapon", true) 
    toggleControl (hitPlayer, "vehicle_fire", true) 
    outputChatBox("Good Bye Sir", hitPlayer, 255, 0, 0) 
 if not ( Team == Admin )  then 
  killPed (hitPlayer) 
end 
end 
addEventHandler( "onColShapeLeave", safecol, leaveZone ) 

Link to comment
    safecol = createColCuboid ( 226.66602, 1586.66602, 17.640625, 255, 255, 255 ) 
    safeZoneRadar = createRadarArea ( 226.66602, 1586.66602, 255, 255, 255, 255, 255 ) 
      
      
    function enterZone(hitPlayer) 
    if getElementType(hitPlayer) ~= "player" then return end 
    local Team = getPlayerTeam (hitPlayer) 
          if ( getTeamName(Team) == getTeamFromName("Admin") ) then 
        toggleControl (hitPlayer, "fire", true ) 
        toggleControl (hitPlayer, "aim_weapon", true) 
        toggleControl (hitPlayer, "vehicle_fire", true) 
        outputChatBox("Welcome To Your Base Sir !!", hitPlayer, 255, 255, 0) 
           else 
             killPed (hitPlayer) 
    end 
    end 
    addEventHandler( "onColShapeHit", safecol, enterZone ) 
      
    function leaveZone(hitPlayer) 
   if getElementType(hitPlayer) ~= "player" then return end 
    local Team = getPlayerTeam (hitPlayer) 
      if ( getTeamName(Team) == getTeamFromName("Admin") ) then 
        toggleControl (hitPlayer, "fire", true) 
        toggleControl (hitPlayer, "aim_weapon", true) 
        toggleControl (hitPlayer, "vehicle_fire", true) 
        outputChatBox("Good Bye Sir", hitPlayer, 255, 0, 0) 
 else 
      killPed (hitPlayer) 
    end 
    end 
    addEventHandler( "onColShapeLeave", safecol, leaveZone ) 

Link to comment
    safecol = createColCuboid ( 226.66602, 1586.66602, 17.640625, 255, 255, 255 ) 
    safeZoneRadar = createRadarArea ( 226.66602, 1586.66602, 255, 255, 255, 255, 255 ) 
      
      
    function enterZone(hitPlayer) 
    if getElementType(hitPlayer) ~= "player" then return end 
    local Team = getPlayerTeam (hitPlayer) 
          if ( getTeamName(Team) == getTeamFromName("Admin") ) then 
        toggleControl (hitPlayer, "fire", true ) 
        toggleControl (hitPlayer, "aim_weapon", true) 
        toggleControl (hitPlayer, "vehicle_fire", true) 
        outputChatBox("Welcome To Your Base Sir !!", hitPlayer, 255, 255, 0) 
           else 
             killPed (hitPlayer) 
    end 
    end 
    addEventHandler( "onColShapeHit", safecol, enterZone ) 
      
    function leaveZone(hitPlayer) 
   if getElementType(hitPlayer) ~= "player" then return end 
    local Team = getPlayerTeam (hitPlayer) 
      if ( getTeamName(Team) == getTeamFromName("Admin") ) then 
        toggleControl (hitPlayer, "fire", true) 
        toggleControl (hitPlayer, "aim_weapon", true) 
        toggleControl (hitPlayer, "vehicle_fire", true) 
        outputChatBox("Good Bye Sir", hitPlayer, 255, 0, 0) 
 else 
      killPed (hitPlayer) 
    end 
    end 
    addEventHandler( "onColShapeLeave", safecol, leaveZone ) 

نفس المشكله للحين يموت

Link to comment
        safecol = createColCuboid ( 226.66602, 1586.66602, 17.640625, 255, 255, 255 ) 
        safeZoneRadar = createRadarArea ( 226.66602, 1586.66602, 255, 255, 255, 255, 255 ) 
          
          
        function enterZone(hitPlayer) 
        if getElementType(hitPlayer) ~= "player" then return end 
        local Team = getPlayerTeam (hitPlayer) 
              if ( Team  == getTeamFromName("Admin") ) then 
            toggleControl (hitPlayer, "fire", true ) 
            toggleControl (hitPlayer, "aim_weapon", true) 
            toggleControl (hitPlayer, "vehicle_fire", true) 
            outputChatBox("Welcome To Your Base Sir !!", hitPlayer, 255, 255, 0) 
               else 
                 killPed (hitPlayer) 
        end 
        end 
        addEventHandler( "onColShapeHit", safecol, enterZone ) 
          
        function leaveZone(hitPlayer) 
       if getElementType(hitPlayer) ~= "player" then return end 
        local Team = getPlayerTeam (hitPlayer) 
          if ( Team == getTeamFromName("Admin") ) then 
            toggleControl (hitPlayer, "fire", true) 
            toggleControl (hitPlayer, "aim_weapon", true) 
            toggleControl (hitPlayer, "vehicle_fire", true) 
            outputChatBox("Good Bye Sir", hitPlayer, 255, 0, 0) 
     else 
          killPed (hitPlayer) 
        end 
        end 
        addEventHandler( "onColShapeLeave", safecol, leaveZone ) 

Link to comment
        safecol = createColCuboid ( 226.66602, 1586.66602, 17.640625, 255, 255, 255 ) 
        safeZoneRadar = createRadarArea ( 226.66602, 1586.66602, 255, 255, 255, 255, 255 ) 
          
          
        function enterZone(hitPlayer) 
        if getElementType(hitPlayer) ~= "player" then return end 
        local Team = getPlayerTeam (hitPlayer) 
              if ( Team  == getTeamFromName("Admin") ) then 
            toggleControl (hitPlayer, "fire", true ) 
            toggleControl (hitPlayer, "aim_weapon", true) 
            toggleControl (hitPlayer, "vehicle_fire", true) 
            outputChatBox("Welcome To Your Base Sir !!", hitPlayer, 255, 255, 0) 
               else 
                 killPed (hitPlayer) 
        end 
        end 
        addEventHandler( "onColShapeHit", safecol, enterZone ) 
          
        function leaveZone(hitPlayer) 
       if getElementType(hitPlayer) ~= "player" then return end 
        local Team = getPlayerTeam (hitPlayer) 
          if ( Team == getTeamFromName("Admin") ) then 
            toggleControl (hitPlayer, "fire", true) 
            toggleControl (hitPlayer, "aim_weapon", true) 
            toggleControl (hitPlayer, "vehicle_fire", true) 
            outputChatBox("Good Bye Sir", hitPlayer, 255, 0, 0) 
     else 
          killPed (hitPlayer) 
        end 
        end 
        addEventHandler( "onColShapeLeave", safecol, leaveZone ) 

مشكور لبى قلبك

يعني المشكلة كانت هنا

if (Team = Admin) 
  

Link to comment
        safecol = createColCuboid ( 226.66602, 1586.66602, 17.640625, 255, 255, 255 ) 
        safeZoneRadar = createRadarArea ( 226.66602, 1586.66602, 255, 255, 255, 255, 255 ) 
          
          
        function enterZone(hitPlayer) 
        if getElementType(hitPlayer) ~= "player" then return end 
        local Team = getPlayerTeam (hitPlayer) 
              if ( Team  == getTeamFromName("Admin") ) then 
            toggleControl (hitPlayer, "fire", true ) 
            toggleControl (hitPlayer, "aim_weapon", true) 
            toggleControl (hitPlayer, "vehicle_fire", true) 
            outputChatBox("Welcome To Your Base Sir !!", hitPlayer, 255, 255, 0) 
               else 
                 killPed (hitPlayer) 
        end 
        end 
        addEventHandler( "onColShapeHit", safecol, enterZone ) 
          
        function leaveZone(hitPlayer) 
       if getElementType(hitPlayer) ~= "player" then return end 
        local Team = getPlayerTeam (hitPlayer) 
          if ( Team == getTeamFromName("Admin") ) then 
            toggleControl (hitPlayer, "fire", true) 
            toggleControl (hitPlayer, "aim_weapon", true) 
            toggleControl (hitPlayer, "vehicle_fire", true) 
            outputChatBox("Good Bye Sir", hitPlayer, 255, 0, 0) 
     else 
          killPed (hitPlayer) 
        end 
        end 
        addEventHandler( "onColShapeLeave", safecol, leaveZone ) 

مشكور لبى قلبك

يعني المشكلة كانت هنا

if (Team = Admin) 
  

# الخطا ممكن من التحقق

getTeamFromName # هنا نتحقق اكثر

# + تتحق من الي دخل

Link to comment
        safecol = createColCuboid ( 226.66602, 1586.66602, 17.640625, 255, 255, 255 ) 
        safeZoneRadar = createRadarArea ( 226.66602, 1586.66602, 255, 255, 255, 255, 255 ) 
          
          
        function enterZone(hitPlayer) 
        if getElementType(hitPlayer) ~= "player" then return end 
        local Team = getPlayerTeam (hitPlayer) 
              if ( Team  == getTeamFromName("Admin") ) then 
            toggleControl (hitPlayer, "fire", true ) 
            toggleControl (hitPlayer, "aim_weapon", true) 
            toggleControl (hitPlayer, "vehicle_fire", true) 
            outputChatBox("Welcome To Your Base Sir !!", hitPlayer, 255, 255, 0) 
               else 
                 killPed (hitPlayer) 
        end 
        end 
        addEventHandler( "onColShapeHit", safecol, enterZone ) 
          
        function leaveZone(hitPlayer) 
       if getElementType(hitPlayer) ~= "player" then return end 
        local Team = getPlayerTeam (hitPlayer) 
          if ( Team == getTeamFromName("Admin") ) then 
            toggleControl (hitPlayer, "fire", true) 
            toggleControl (hitPlayer, "aim_weapon", true) 
            toggleControl (hitPlayer, "vehicle_fire", true) 
            outputChatBox("Good Bye Sir", hitPlayer, 255, 0, 0) 
     else 
          killPed (hitPlayer) 
        end 
        end 
        addEventHandler( "onColShapeLeave", safecol, leaveZone ) 

مشكور لبى قلبك

يعني المشكلة كانت هنا

if (Team = Admin) 
  

يب

+

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

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

Link to comment
        safecol = createColCuboid ( 226.66602, 1586.66602, 17.640625, 255, 255, 255 ) 
        safeZoneRadar = createRadarArea ( 226.66602, 1586.66602, 255, 255, 255, 255, 255 ) 
          
          
        function enterZone(hitPlayer) 
        if getElementType(hitPlayer) ~= "player" then return end 
        local Team = getPlayerTeam (hitPlayer) 
              if ( Team  == getTeamFromName("Admin") ) then 
            toggleControl (hitPlayer, "fire", true ) 
            toggleControl (hitPlayer, "aim_weapon", true) 
            toggleControl (hitPlayer, "vehicle_fire", true) 
            outputChatBox("Welcome To Your Base Sir !!", hitPlayer, 255, 255, 0) 
               else 
                 killPed (hitPlayer) 
        end 
        end 
        addEventHandler( "onColShapeHit", safecol, enterZone ) 
          
        function leaveZone(hitPlayer) 
       if getElementType(hitPlayer) ~= "player" then return end 
        local Team = getPlayerTeam (hitPlayer) 
          if ( Team == getTeamFromName("Admin") ) then 
            toggleControl (hitPlayer, "fire", true) 
            toggleControl (hitPlayer, "aim_weapon", true) 
            toggleControl (hitPlayer, "vehicle_fire", true) 
            outputChatBox("Good Bye Sir", hitPlayer, 255, 0, 0) 
     else 
          killPed (hitPlayer) 
        end 
        end 
        addEventHandler( "onColShapeLeave", safecol, leaveZone ) 

مشكور لبى قلبك

يعني المشكلة كانت هنا

if (Team = Admin) 
  

# الخطا ممكن من التحقق

getTeamFromName # هنا نتحقق اكثر

# + تتحق من الي دخل

اها مشكوور

        safecol = createColCuboid ( 226.66602, 1586.66602, 17.640625, 255, 255, 255 ) 
        safeZoneRadar = createRadarArea ( 226.66602, 1586.66602, 255, 255, 255, 255, 255 ) 
          
          
        function enterZone(hitPlayer) 
        if getElementType(hitPlayer) ~= "player" then return end 
        local Team = getPlayerTeam (hitPlayer) 
              if ( Team  == getTeamFromName("Admin") ) then 
            toggleControl (hitPlayer, "fire", true ) 
            toggleControl (hitPlayer, "aim_weapon", true) 
            toggleControl (hitPlayer, "vehicle_fire", true) 
            outputChatBox("Welcome To Your Base Sir !!", hitPlayer, 255, 255, 0) 
               else 
                 killPed (hitPlayer) 
        end 
        end 
        addEventHandler( "onColShapeHit", safecol, enterZone ) 
          
        function leaveZone(hitPlayer) 
       if getElementType(hitPlayer) ~= "player" then return end 
        local Team = getPlayerTeam (hitPlayer) 
          if ( Team == getTeamFromName("Admin") ) then 
            toggleControl (hitPlayer, "fire", true) 
            toggleControl (hitPlayer, "aim_weapon", true) 
            toggleControl (hitPlayer, "vehicle_fire", true) 
            outputChatBox("Good Bye Sir", hitPlayer, 255, 0, 0) 
     else 
          killPed (hitPlayer) 
        end 
        end 
        addEventHandler( "onColShapeLeave", safecol, leaveZone ) 

مشكور لبى قلبك

يعني المشكلة كانت هنا

if (Team = Admin) 
  

يب

+

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

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

مشكوور

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