Jump to content

اكود بسيطة


Recommended Posts

______________________________________________

!

________________________________________

______________________________________________

!

______________________________________________________________________________________

!

______________________________________________________________________________________

!

______________________________________________________________________________________

!

______________________________________________________________________________________

!

______________________________________________________________________________________

!

______________________________________________________________________________________

!

______________________________________________________________________________________

!

______________________________________________________________________________________

!

______________________________________________________________________________________

!

______________________________________________________________________________________

!

______________________________________________________________________________________

!

______________________________________________________________________________________

!

______________________________________________________________________________________

!

______________________________________________________________________________________

!

______________________________________________________________________________________

!

______________________________________________________________________________________

!

______________________________________________________________________________________

!

______________________________________________________________________________________

!

______________________________________________________________________________________

!

______________________________________________________________________________________

!

______________________________________________________________________________________

!

______________________________________________________________________________________

!

______________________________________________________________________________________

!

______________________________________________________________________________________

!

______________________________________________________________________________________

!

______________________________________________________________________________________

!

______________________________________________________________________________________

!

______________________________________________________________________________________

!

______________________________________________________________________________________

!

______________________________________________________________________________________

!

______________________________________________________________________________________

!

______________________________________________________________________________________

!

______________________________________________________________________________________

!

______________________________________________________________________________________

!

______________________________________________________________________________________

!

______________________________________________________________________________________

!

______________________________________________________________________________________

!

______________________________________________________________________________________

!

______________________________________________________________________________________

!

______________________________________________________________________________________

!

______________________________________________________________________________________

!

______________________________________________________________________________________

!

______________________________________________________________________________________

!

______________________________________________________________________________________

!

______________________________________________________________________________________

!

______________________________________________________________________________________

!

______________________________________________________________________________________

!

______________________________________________________________________________________

!

______________________________________________________________________________________

!

______________________________________________________________________________________

!

______________________________________________________________________________________

!

______________________________________________________________________________________

!

______________________________________________________________________________________

!

______________________________________________________________________________________

!

______________________________________________________________________________________

!

______________________________________________________________________________________

!

______________________________________________________________________________________

!

______________________________________________________________________________________

!

______________________________________________________________________________________

!

______________________________________________________________________________________

!

______________________________________________________________________________________

!

______________________________________________________________________________________

!

______________________________________________________________________________________

!

______________________________________________________________________________________

!

______________________________________________________________________________________

!

______________________________________________________________________________________

!

______________________________________________________________________________________

!

______________________________________________________________________________________

!

______________________________________________________________________________________

!

______________________________________________________________________________________

!

______________________________________________________________________________________

!

______________________________________________________________________________________

!

______________________________________________________________________________________

!

______________________________________________________________________________________

!

______________________________________________________________________________________

!

______________________________________________________________________________________

!

______________________________________________________________________________________

!

______________________________________________________________________________________

!

______________________________________________________________________________________

!

______________________________________________________________________________________

!

______________________________________________________________________________________

!

______________________________________________________________________________________

!

______________________________________________________________________________________

!

______________________________________________________________________________________

!

________________________________________

Edited by Guest
Link to comment
  
function toggleFreezeStatus ( thePlayer ) 
  
function markerAlert(markerHit,matchingDimension) 
    (matchingDimension)  marker  
    end 
end 
addEventHandler("onPlayerMarkerHit", 
getRootElement(),markerAlert) 
  
  
function mainFunction() 
        outputChatBox (" جاري.الجمع لاتتحرك") 
    setTimer ( function() 
        outputChatBox ( "5 ثواني. لجمعه!" ) 
    end, 5000, 1 ) 
end 
  
mainFunction() 

كودك كله خطأ حتى الوظايف اللي عطيتك ماستخدمتها

Link to comment
  
function toggleFreezeStatus ( thePlayer ) 
  
function markerAlert(markerHit,matchingDimension) 
    (matchingDimension)  marker  
    end 
end 
addEventHandler("onPlayerMarkerHit", 
getRootElement(),markerAlert) 
  
  
function mainFunction() 
        outputChatBox (" جاري.الجمع لاتتحرك") 
    setTimer ( function() 
        outputChatBox ( "5 ثواني. لجمعه!" ) 
    end, 5000, 1 ) 
end 
  
mainFunction() 

كودك كله خطأ حتى الوظايف اللي عطيتك ماستخدمتها

طيب ماعرفت،له صحح

Link to comment
mMarker = createMarker( 0, 0, 0 ) 
  
addEventHandler( 'onPlayerMarkerHit', getRootElement( ), 
    function( mMarkerHit, bMatchingDimension ) 
        if( bMatchingDimension ) and ( mMarkerHit == mMarker )then 
            setElementFrozen( source, true ) 
            setTimer( setElementFrozen, 5000, 1, source, false ) 
        end 
    end 
) 

Link to comment

تقصد يدخله تيم معين , ولا ما يشوفه الا تيم معين؟

اذا تقصد يدخله تيم معين ,

getPlayerTeam 
getTeamName 

اما اذا تقصد ما يشوفه الا تيم معين ,

getPlayersInTeam 
getTeamFromName 
setElementVisibleTo 

Edited by Guest
Link to comment
ابي اضيف على الكود

الماركر يشوفه تيم معين

وبعد مايخلص الفريز يجي ماركر ثاني وعالامة يروح لها نفس الشي

طيب انت كم تبي ماركر يعني اذا خلص من الاول يروح للثاني الى كم؟

Link to comment

بالنسبة للماركر ما يشوفه الا تيم محدد ... :

marker = createMarker ( ..... ) 
setElementVisibleTo ( marker, root, false ) 
  
setTimer ( function(  ) 
        local g_Team = getTeamFromName ( "TestT" ) 
          if ( g_Team ) then 
           for _,v in ipairs ( getPlayersInTeam ( g_Team ) ) do 
               setElementVisibleTo ( marker, v, true ) 
              end 
              for _,plrs in ipairs ( getElementsByType ( "player" ) ) do 
                if not ( getPlayerTeam( plrs ) ) then 
                  if ( isElementVisibleTo( marker, plrs ) ) then 
                       setElementVisibleTo ( marker, plrs, false ) 
                     end 
               end 
          end 
     end 
end, 500, 0 ) 
Link to comment
بالنسبة للماركر ما يشوفه الا تيم محدد ... :
marker = createMarker ( ..... ) 
setElementVisibleTo ( marker, root, false ) 
  
setTimer ( function(  ) 
        local g_Team = getTeamFromName ( "TestT" ) 
          if ( g_Team ) then 
           for _,v in ipairs ( getPlayersInTeam ( g_Team ) ) do 
               setElementVisibleTo ( marker, v, true ) 
              end 
              for _,plrs in ipairs ( getElementsByType ( "player" ) ) do 
                if not ( getPlayerTeam( plrs ) ) then 
                  if ( isElementVisibleTo( marker, plrs ) ) then 
                       setElementVisibleTo ( marker, plrs, false ) 
                     end 
               end 
          end 
     end 
end, 500, 0 ) 

صراحة انا مو مثلك احب التايمرات لانها تسبب لاق كبير جداً يفضل التخفيف من التايمرات في جانب السيرفر .

Link to comment
ابي اضيف على الكود

الماركر يشوفه تيم معين

وبعد مايخلص الفريز يجي ماركر ثاني وعالامة يروح لها نفس الشي

طيب انت كم تبي ماركر يعني اذا خلص من الاول يروح للثاني الى كم؟

مافهمت @@

Link to comment
ابي اضيف على الكود

الماركر يشوفه تيم معين

وبعد مايخلص الفريز يجي ماركر ثاني وعالامة يروح لها نفس الشي

طيب انت كم تبي ماركر يعني اذا خلص من الاول يروح للثاني الى كم؟

مافهمت @@

يعني اللاعب اذ جاء ع الماركر الاول

يختففي ويجي ماركر ثاني ،

كم ماركر تبييء ... ؟

#

Link to comment

طيب انت كم تبي ماركر يعني اذا خلص من الاول يروح للثاني الى كم؟

4 ماركرات

وابي بعد الفريز يجيه فلوس

+

كود زاحف ماضبط[/b][/u]

متاكد من وجود التيم .. جربت تخرج وتدخل للتيم وتشوف الماركر يضهر ويخختفي .. بدلت اسم التيم بـ سطر 5 .. بدلت الارقمنات حق الماركر ؟

Link to comment

طيب انت كم تبي ماركر يعني اذا خلص من الاول يروح للثاني الى كم؟

4 ماركرات

وابي بعد الفريز يجيه فلوس

+

كود زاحف ماضبط[/b][/u]

متاكد من وجود التيم .. جربت تخرج وتدخل للتيم وتشوف الماركر يضهر ويخختفي .. بدلت اسم التيم بـ سطر 5 .. بدلت الارقمنات حق الماركر ؟

يب

  
  
  
    marker = createMarker( -703.95025634766,951.16326904297,12.399156570435 ) 
    setElementVisibleTo ( marker, root, false ) 
      
    setTimer ( function(  ) 
            local g_Team = getTeamFromName ( "Medic" ) 
              if ( g_Team ) then 
               for _,v in ipairs ( getPlayersInTeam ( g_Team ) ) do 
                   setElementVisibleTo ( marker, v, true ) 
                  end 
                  for _,plrs in ipairs ( getElementsByType ( "player" ) ) do 
                    if not ( getPlayerTeam( plrs ) ) then 
                      if ( isElementVisibleTo( marker, plrs ) ) then 
                           setElementVisibleTo ( marker, plrs, false ) 
                         end 
                   end 
              end 
         end 
    end, 500, 0 ) 

[/b]

Link to comment

Server Side !

marker = createMarker ( -703.95025634766, 951.16326904297, 12.399156570435, "cylinder", 2, 255, 0, 255, 255 ) 
setElementVisibleTo ( marker, root, false ) 
  
setTimer ( function(  ) 
        local g_Team = getTeamFromName ( "Medic" ) 
          if ( g_Team ) then 
           for _,v in ipairs ( getPlayersInTeam ( g_Team ) ) do 
               setElementVisibleTo ( marker, v, true ) 
              end 
              for _,plrs in ipairs ( getElementsByType ( "player" ) ) do 
                if not ( getPlayerTeam( plrs ) ) then 
                  if ( isElementVisibleTo( marker, plrs ) ) then 
                       setElementVisibleTo ( marker, plrs, false ) 
                     end 
               end 
          end 
     end 
end, 500, 0 ) 
Link to comment
Server Side !

marker = createMarker ( -703.95025634766, 951.16326904297, 12.399156570435, "cylinder", 2, 255, 0, 255, 255 ) 
setElementVisibleTo ( marker, root, false ) 
  
setTimer ( function(  ) 
        local g_Team = getTeamFromName ( "Medic" ) 
          if ( g_Team ) then 
           for _,v in ipairs ( getPlayersInTeam ( g_Team ) ) do 
               setElementVisibleTo ( marker, v, true ) 
              end 
              for _,plrs in ipairs ( getElementsByType ( "player" ) ) do 
                if not ( getPlayerTeam( plrs ) ) then 
                  if ( isElementVisibleTo( marker, plrs ) ) then 
                       setElementVisibleTo ( marker, plrs, false ) 
                     end 
               end 
          end 
     end 
end, 500, 0 ) 

وش الخطأ

  
    )    marker = createMarker ( 2039.3221435547,1541.4431152344,10.671875, "cylinder", 2, 255, 0, 255, 255 ) 
    setElementVisibleTo ( marker, root, false ) 
      
    setTimer ( function(  ) 
            local g_Team = getTeamFromName ( "Medic" ) 
              if ( g_Team ) then 
               for _,v in ipairs ( getPlayersInTeam ( g_Team ) ) do 
                   setElementVisibleTo ( marker, v, true ) 
                  end 
                  for _,plrs in ipairs ( getElementsByType ( "player" ) ) do 
                    if not ( getPlayerTeam( plrs ) ) then 
                      if ( isElementVisibleTo( marker, plrs ) ) then 
                           setElementVisibleTo ( marker, plrs, false ) 
                         end 
                   end 
              end 
         end 
                setTimer( setElementFrozen, 5000, 1, source, false ) 
                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...