Jump to content

ادخلوا لو سمحتوا


ahmed1010

Recommended Posts

بدل اكواد الماركر,

local Teams = {['No Team'] = true,['Grove'] = true,['Aztecas'] = true,['Police'] = true} 
  
local JoinCrimes = createMarker(727.57281,-1276.31909,13.64844,"cylinder",1.5,0,0,255,155) 
  
addEventHandler("onMarkerHit",JoinCrimes,function(player) 
    if ( getElementType(player) == 'player' ) then   
        if ( getPlayerTeam ( player ) ) and ( Teams[getTeamName(getPlayerTeam(player))] ) then 
            setElementInterior ( player, 5 ,1263.8504638672 ,-785.31146240234 ,1091.90625 ) 
            end 
        end 
    end 
) 
Link to comment
-- Server Side ! 
    num = 30 
    setElementData ( resourceRoot, "Time", num ) 
      
    function MissonTime (  ) 
           num = num - 1 
           setElementData ( resourceRoot, "Time", num ) 
        if num <= 0 then 
        if isTimer ( MissonTimer ) then killTimer ( MissonTimer ) end 
            num = 0 
         end 
    end 
    MissonTimer = setTimer ( MissonTime, 1000, 0 ) 
      
    addCommandHandler ( "Time", function ( plr ) 
          if getElementData ( resourceRoot, "Time" ) == 0 then 
                outputChatBox ( "لقد بدأت المهمة فعلاً", plr, 255, 0, 0, true ) 
          else 
                outputChatBox ( "بقى على المهمة".. getElementData ( resourceRoot, "Time" ), plr, 0, 255, 0, true ) 
           end 
        end              
  
    ) 
     
if num  == 5  
        local Teams = {['No Team'] = true,['Grove'] = true,['Aztecas'] = true} 
      
    local JoinCrimes = createMarker(727.57281,-1276.31909,13.64844,"cylinder",1.5,0,0,255,155) 
      
    addEventHandler("onMarkerHit",JoinCrimes,function(player) 
        if ( getElementType(player) == 'player' ) then   
            if ( getPlayerTeam ( player ) ) and ( Teams[getTeamName(getPlayerTeam(player))] ) then 
                setElementInterior ( player, 5 ,1263.8504638672 ,-785.31146240234 ,1091.90625 ) 
                end 
            end 
        end 
    ) 
     
     
        local Teams = {['Police'] = true} 
      
    local JoinCrimes = createMarker(727.57281,-1276.31909,13.64844,"cylinder",1.5,0,0,255,155) 
      
    addEventHandler("onMarkerHit",JoinCrimes,function(player) 
        if ( getElementType(player) == 'player' ) then   
            if ( getPlayerTeam ( player ) ) and ( Teams[getTeamName(getPlayerTeam(player))] ) then 
                setElementInterior ( player, 5 ,1263.8504638672 ,-785.31146240234 ,1091.90625 ) 
                end 
            end 
        end 
    ) 

Link to comment

الحين قولي ليه بالضبط مسوي البوليس ماركر لحاله؟ اقصد نفس الماركر الي فوق , وانت اساسا بتنقلهم لمكان واحد

لأني اشوف انك ما غيرت بالاحداثيات,

بالنسبه لطلبك ,تحط فنكشن الماركر بإسم , مثال,

StartTheFunction = function(player) 
    ... 

انت سوي يوم يوصل العدد 5,

او تقدر تجيب الداتا

if getElementData(resourceRoot,'Time') == 5 then 

وبعد ما تتحقق من الداتا تفعل حدث الماركر,

addEventHandler("onMarkerHit",JoinCrimes,StartTheFunction) 
Link to comment
   -- Server Side ! 
    num = 30 
    setElementData ( resourceRoot, "Time", num ) 
      
    function MissonTime (  ) 
           num = num - 1 
           setElementData ( resourceRoot, "Time", num ) 
        if num <= 0 then 
        if isTimer ( MissonTimer ) then killTimer ( MissonTimer ) end 
            num = 0 
         end 
    end 
    MissonTimer = setTimer ( MissonTime, 1000, 0 ) 
      
    addCommandHandler ( "Time", function ( plr ) 
          if getElementData ( resourceRoot, "Time" ) == 0 then 
                outputChatBox ( "لقد بدأت المهمة فعلاً", plr, 255, 0, 0, true ) 
          else 
                outputChatBox ( "بقى على المهمة".. getElementData ( resourceRoot, "Time" ), plr, 0, 255, 0, true ) 
           end 
        end              
  
    ) 
  
    if getElementData(resourceRoot,'Time') == 5 then 
        local Teams = {['No Team'] = true,['Grove'] = true,['Aztecas'] = true} 
      
    local JoinCrimes = createMarker(727.57281,-1276.31909,13.64844,"cylinder",1.5,0,0,255,155) 
      
    addEventHandler("onMarkerHit",JoinCrimes,function(player) 
        if ( getElementType(player) == 'player' ) then   
            if ( getPlayerTeam ( player ) ) and ( Teams[getTeamName(getPlayerTeam(player))] ) then 
                setElementInterior ( player, 5 ,1263.8504638672 ,-785.31146240234 ,1091.90625 ) 
                 
                end 
                ) 
            end 
        end 
   end 
  
     

Link to comment
   -- Server Side ! 
    num = 30 
    setElementData ( resourceRoot, "Time", num ) 
      
    function MissonTime (  ) 
           num = num - 1 
           setElementData ( resourceRoot, "Time", num ) 
        if num <= 0 then 
        if isTimer ( MissonTimer ) then killTimer ( MissonTimer ) end 
            num = 0 
         end 
    end 
    MissonTimer = setTimer ( MissonTime, 1000, 0 ) 
      
    addCommandHandler ( "Time", function ( plr ) 
          if getElementData ( resourceRoot, "Time" ) == 0 then 
                outputChatBox ( "لقد بدأت المهمة فعلاً", plr, 255, 0, 0, true ) 
          else 
                outputChatBox ( "بقى على المهمة".. getElementData ( resourceRoot, "Time" ), plr, 0, 255, 0, true ) 
           end 
        end              
  
    ) 
  
    if getElementData(resourceRoot,'Time') == 5 then 
        local Teams = {['No Team'] = true,['Grove'] = true,['Aztecas'] = true} 
      
    local JoinCrimes = createMarker(727.57281,-1276.31909,13.64844,"cylinder",1.5,0,0,255,155) 
      
    addEventHandler("onMarkerHit",JoinCrimes,function(player) 
        if ( getElementType(player) == 'player' ) then   
            if ( getPlayerTeam ( player ) ) and ( Teams[getTeamName(getPlayerTeam(player))] ) then 
                setElementInterior ( player, 5 ,1263.8504638672 ,-785.31146240234 ,1091.90625 ) 
                 
                end 
                ) 
            end 
        end 
   end 
  
     

Link to comment

جرب

       -- Server Side ! 
        num = 30 
        setElementData ( resourceRoot, "Time", num ) 
          
        function MissonTime (  ) 
               num = num - 1 
               setElementData ( resourceRoot, "Time", num ) 
            if num <= 0 then 
            if isTimer ( MissonTimer ) then killTimer ( MissonTimer ) end 
                num = 0 
             end 
        end 
        MissonTimer = setTimer ( MissonTime, 1000, 0 ) 
          
        addCommandHandler ( "Time", function ( plr ) 
              if getElementData ( resourceRoot, "Time" ) == 0 then 
                    outputChatBox ( "لقد بدأت المهمة فعلاً", plr, 255, 0, 0, true ) 
              else 
                    outputChatBox ( "بقى على المهمة".. getElementData ( resourceRoot, "Time" ), plr, 0, 255, 0, true ) 
               end 
            end             
      
        ) 
      
        if getElementData(resourceRoot,'Time') == 5 then 
            local Teams = {['No Team'] = true,['Grove'] = true,['Aztecas'] = true} 
          
        local JoinCrimes = createMarker(727.57281,-1276.31909,13.64844,"cylinder",1.5,0,0,255,155) 
          
        addEventHandler("onMarkerHit",JoinCrimes,function(player) 
            if ( getElementType(player) == 'player' ) then   
                if ( getPlayerTeam ( player ) ) and ( Teams[getTeamName(getPlayerTeam(player))] ) then 
                    setElementInterior ( player, 5 ,1263.8504638672 ,-785.31146240234 ,1091.90625 ) 
                    
                    end 
                end 
            end 
       end 
 ) 
         

Link to comment

تحتاج انك تسوي شرط يتحقق من الوقت ويفعل الماركر,

if getElementData(resourceRoot,'Time') == 5 then     
    addEventHandler('onMarkerHit',JoinCrimes,MarkerStartFunction) 
end 

وتخلي فنكشن الماركر كذا,

MarkerStartFunction = function(player) 
        if ( getElementType(player) == 'player' ) then   
            if ( getPlayerTeam ( player ) ) and ( Teams[getTeamName(getPlayerTeam(player))] ) then 
                setElementInterior ( player, 5 ,1263.8504638672 ,-785.31146240234 ,1091.90625 )  
        end 
    end 
end 
Link to comment

الماركر ظهر لكن لا ينقل على المهمة ^_________^

    -- Server Side ! 
    num = 5 
    setElementData ( resourceRoot, "Time", num ) 
      
    function MissonTime (  ) 
           num = num - 1 
           setElementData ( resourceRoot, "Time", num ) 
        if num <= 0 then 
        if isTimer ( MissonTimer ) then killTimer ( MissonTimer ) end 
            num = 0 
         end 
    end 
    MissonTimer = setTimer ( MissonTime, 1000, 0 ) 
      
    addCommandHandler ( "Time", function ( plr ) 
          if getElementData ( resourceRoot, "Time" ) == 0 then 
                outputChatBox ( "لقد بدأت المهمة فعلاً", plr, 255, 0, 0, true ) 
          else 
                outputChatBox ( "بقى على المهمة".. getElementData ( resourceRoot, "Time" ), plr, 0, 255, 0, true ) 
           end 
        end              
  
    ) 
  
      if getElementData(resourceRoot,'Time') == 2 then    
        addEventHandler('onMarkerHit',JoinCrimes,MarkerStartFunction) 
    end 
        local Teams = {['No Team'] = true,['Grove'] = true,['Aztecas'] = true} 
      
    local JoinCrimes = createMarker(727.57281,-1276.31909,13.64844,"cylinder",1.5,0,0,255,155) 
      
    MarkerStartFunction = function(player) 
            if ( getElementType(player) == 'player' ) then   
                if ( getPlayerTeam ( player ) ) and ( Teams[getTeamName(getPlayerTeam(player))] ) then 
                    setElementInterior ( player, 5 ,1263.8504638672 ,-785.31146240234 ,1091.90625 ) 
            end 
        end 
    end 
     

اش الخطأ

Link to comment

جرب

   -- Server Side ! 
    num = 5 
    setElementData ( resourceRoot, "Time", num ) 
      
    function MissonTime (  ) 
           num = num - 1 
           setElementData ( resourceRoot, "Time", num ) 
        if num <= 0 then 
        if isTimer ( MissonTimer ) then killTimer ( MissonTimer ) end 
            num = 0 
         end 
    end 
    MissonTimer = setTimer ( MissonTime, 1000, 0 ) 
      
    addCommandHandler ( "Time", function ( plr ) 
          if getElementData ( resourceRoot, "Time" ) == 0 then 
                outputChatBox ( "لقد بدأت المهمة فعلاً", plr, 255, 0, 0, true ) 
          else 
                outputChatBox ( "بقى على المهمة".. getElementData ( resourceRoot, "Time" ), plr, 0, 255, 0, true ) 
           end 
        end             
  
    ) 
  
      if getElementData(resourceRoot,'Time') == 5 then   
        addEventHandler('onMarkerHit',JoinCrimes,MarkerStartFunction) 
    end 
        local Teams = {['No Team'] = true,['Grove'] = true,['Aztecas'] = true} 
      
    local JoinCrimes = createMarker(727.57281,-1276.31909,13.64844,"cylinder",1.5,0,0,255,155) 
      
    MarkerStartFunction = function(player) 
            if ( getElementType(player) == 'player' ) then   
                if ( getPlayerTeam ( player ) ) and ( Teams[getTeamName(getPlayerTeam(player))] ) then 
                    setElementInterior ( player, 5 ,1263.8504638672 ,-785.31146240234 ,1091.90625 ) 
            end 
        end 
    end 
    
Link to comment
   -- Server Side ! 
JoinCrimes = createMarker(727.57281,-1276.31909,13.64844,"cylinder",1.5,0,0,255,155) 
    num = 5 
    setElementData ( resourceRoot, "Time", num ) 
      
    function MissonTime (  ) 
           num = num - 1 
           setElementData ( resourceRoot, "Time", num ) 
        if num <= 0 then 
        if isTimer ( MissonTimer ) then killTimer ( MissonTimer ) end 
            num = 0 
            setElementData ( resourceRoot, "Time", 0 ) 
         end 
      if getElementData ( resourceRoot, 'Time' ) == 5 then   
            addEventHandler ( 'onMarkerHit', JoinCrimes, MarkerStartFunction )  
           end 
    end 
    MissonTimer = setTimer ( MissonTime, 1000, 0 ) 
      
    addCommandHandler ( "Time", function ( plr ) 
          if getElementData ( resourceRoot, "Time" ) == 0 then 
                outputChatBox ( "لقد بدأت المهمة فعلاً", plr, 255, 0, 0, true ) 
          else 
                outputChatBox ( "بقى على المهمة".. getElementData ( resourceRoot, "Time" ), plr, 0, 255, 0, true ) 
           end 
        end              
    ) 
  
        local Teams = {['No Team'] = true,['Grove'] = true,['Aztecas'] = true} 
      
    MarkerStartFunction = function(player) 
            if ( getElementType(player) == 'player' ) then   
                if ( getPlayerTeam ( player ) ) and ( Teams[getTeamName(getPlayerTeam(player))] ) then 
                    setElementInterior ( player, 5 ,1263.8504638672 ,-785.31146240234 ,1091.90625 ) 
            end 
        end 
    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...