Jump to content

تعديل كود


Recommended Posts

السلام عليكم يا شباب , الحين هذا الكود , يسوي

createTeam 
setTeamFriendlyFire 
setPlayerTeam 

لتيم واحد بس,يعني ,مثلا , ابيه لتيمين او اكثر :$ا

وهذا الكود

  
Team = createTeam ( "Admin", 255, 0, 0 ) 
  
  
  
Accountss = { 
  
    "Manster", 
  
} 
  
  
  
addEventHandler ( "onPlayerLogin", root, 
  
    function ( _, Account ) 
  
                for k,v in ipairs ( Accountss ) do 
  
            if getAccountName ( Account ) == v then 
  
            setPlayerTeam( source, Team ) 
  
        end 
  
    end 
    
    end 
  
) 
  
addEventHandler("onResourceStart",resourceRoot, 
function () 
setTeamFriendlyFire(Team,false) 
end 
) 
  

Edited by Guest
Link to comment

جرب كذا

+

اكودك ذي ما لها دخل

  
addEventHandler ( "onPlayerLogin", root, 
local allTeams = getElementsByType ( "team" ) 
for index, theTeam in ipairs(allTeams) do 
if ( getTeamFriendlyFire ( theTeam ) == false ) then 
setTeamFriendlyFire ( theTeam, true ) 
    end 
end) 

Edited by Guest
Link to comment
جرب كذا

+

اكودك ذي ما لها دخل

  
addEventHandler ( "onPlayerLogin", root, 
local allTeams = getElementsByType ( "team" ) 
for index, theTeam in ipairs(allTeams) do 
if ( getTeamFriendlyFire ( theTeam ) == false ) then 
setTeamFriendlyFire ( theTeam, true ) 
    end 
end) 

لا لها دخل

طيب الحين مثلا تيم معين مايقتلون بعض ابي يكونون تيمين او اكثر فهمت

اتمنى وضحت المعلومه

Link to comment
جرب كذا

+

اكودك ذي ما لها دخل

  
addEventHandler ( "onPlayerLogin", root, 
local allTeams = getElementsByType ( "team" ) 
for index, theTeam in ipairs(allTeams) do 
if ( getTeamFriendlyFire ( theTeam ) == false ) then 
setTeamFriendlyFire ( theTeam, true ) 
    end 
end) 

لا لها دخل

طيب الحين مثلا تيم معين مايقتلون بعض ابي يكونون تيمين او اكثر فهمت

اتمنى وضحت المعلومه

الي سواه هو يسوي لكل تيم موجود

اول ما يسجل واحد دخوله انت عدل الحدث :fadein:

Link to comment
  
Team = createTeam ( "Admin", 255, 0, 0 ) 
Team2 = createTeam ( ".....", 255, 0, 0 ) 
Team3 = createTeam ( "???", 255, 0, 0 ) 
  
Accountss = { 
  
    "Manster", 
  
} 
  
addEventHandler ( "onPlayerLogin", root, 
    function ( _, Account ) 
                for k,v in ipairs ( Accountss ) do 
            if getAccountName ( Account ) == v then 
            setPlayerTeam( source, Team ) 
        end 
      end 
    end 
) 
addEventHandler("onResourceStart",resourceRoot, 
function () 
setTeamFriendlyFire(Team,false) 
setTeamFriendlyFire(Team2,false) 
setTeamFriendlyFire(Team3,false) 
end 
) 
  

Link to comment

ليه كل ذي الحوسه ترا كودي صح و يجمع كل تيمات

  
addEventHandler ( "onResourceStart", resourceRoot, 
local allTeams = getElementsByType ( "team" ) 
for index, theTeam in ipairs(allTeams) do 
if ( getTeamFriendlyFire ( theTeam ) == false ) then 
setTeamFriendlyFire ( theTeam, true ) 
    end 
end) 

Edited by Guest
Link to comment
ليه كل ذي الحوسه ترا كودي صح و يجمع كل تيمات
  
addEventHandler ( "onResourceStart", root, 
local allTeams = getElementsByType ( "team" ) 
for index, theTeam in ipairs(allTeams) do 
if ( getTeamFriendlyFire ( theTeam ) == false ) then 
setTeamFriendlyFire ( theTeam, true ) 
    end 
end) 

تصدق كودكـ عجبني شيء فية يشتغل ومافية فنكشن .. :roll:

Link to comment
ليه كل ذي الحوسه ترا كودي صح و يجمع كل تيمات
  
addEventHandler ( "onResourceStart", resourceRoot, 
local allTeams = getElementsByType ( "team" ) 
for index, theTeam in ipairs(allTeams) do 
if ( getTeamFriendlyFire ( theTeam ) == false ) then 
setTeamFriendlyFire ( theTeam, true ) 
    end 
end) 

مازال خطأ مافية فنكشن

Link to comment
ليه كل ذي الحوسه ترا كودي صح و يجمع كل تيمات
  
addEventHandler ( "onResourceStart", resourceRoot, 
local allTeams = getElementsByType ( "team" ) 
for index, theTeam in ipairs(allTeams) do 
if ( getTeamFriendlyFire ( theTeam ) == false ) then 
setTeamFriendlyFire ( theTeam, true ) 
    end 
end) 

حط ذي بعد الحدث

function ()

Link to comment

هههههه صلحه وخلاص

addEventHandler ( "onResourceStart", resourceRoot,function () 
local allTeams = getElementsByType ( "team" ) 
for index, theTeam in ipairs(allTeams) do 
if ( getTeamFriendlyFire ( theTeam ) == false ) then 
setTeamFriendlyFire ( theTeam, true ) 
        end 
    end 
end) 
  

Link to comment

كلهم ماضبطو, مافهمتوني انتم :$ا

انا قصدي , احط تيم للأدمن , وتيم للأعبين

تيم الاعبين مايقدر يقتل تيم الادمن وتيم الادمن مايقدر يقتل تيم الاعبين

يليت وضحت المعلومه

()

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

بس ابي اخليهم مايقتلون بعض

Link to comment

جربه,

admins = createTeam ( "Admins", 255, 0, 0 ) 
players = createTeam ( "Players", 255, 0, 0 ) 
addEventHandler ( "onResourceStart", resourceRoot, 
function() 
if ( getTeamFriendlyFire ( admins ) and getTeamFriendlyFire ( players ) == true ) then 
setTeamFriendlyFire(admins,false) 
setTeamFriendlyFire(players,false) 
    end 
end) 
Link to comment
جربه,

admins = createTeam ( "Admins", 255, 0, 0 ) 
players = createTeam ( "Players", 255, 0, 0 ) 
addEventHandler ( "onResourceStart", resourceRoot, 
function() 
if ( getTeamFriendlyFire ( admins ) and getTeamFriendlyFire ( players ) == true ) then 
setTeamFriendlyFire(admins,false) 
setTeamFriendlyFire(players,false) 
    end 
end) 

كودك شغال , بس تيم الادمن يقدر يقتل تيم اللاعبين , والاعبين يقدرووون يقتلون الادمن

تيم الادمن مايقدرون يقتلون بعض

ونفس الشي مع الاعبين

()

Link to comment

جرب ,

admins = createTeam ( "Admins", 255, 0, 0 ) 
players = createTeam ( "Players", 255, 0, 0 ) 
addEventHandler ( "onResourceStart", resourceRoot, 
function() 
if ( getTeamFriendlyFire ( admins ) == true ) then 
setTeamFriendlyFire(players,false) 
if (getTeamFriendlyFire ( players ) == true ) then 
setTeamFriendlyFire(admins,false) 
          end 
    end 
end) 
Link to comment
جرب ,

admins = createTeam ( "Admins", 255, 0, 0 ) 
players = createTeam ( "Players", 255, 0, 0 ) 
addEventHandler ( "onResourceStart", resourceRoot, 
function() 
if ( getTeamFriendlyFire ( admins ) == true ) then 
setTeamFriendlyFire(players,false) 
if (getTeamFriendlyFire ( players ) == true ) then 
setTeamFriendlyFire(admins,false) 
          end 
    end 
end) 

الكود كله خرب , الادمن يقتلون بعض والاعبين يقتلون بعض ,, الاول احسن هع , بس خربان نفس الشي

Link to comment

جرب كذآ ,

بس آحسه خرآبيطط , :lol:

admins = createTeam ( "Admins", 255, 0, 0 ) and createTeam ( "Players", 255, 0, 0 ) 
    addEventHandler ( "onResourceStart", resourceRoot, 
    function() 
    setTeamFriendlyFire(admins,false) 
              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...