Jump to content

لا استطيع قتل فريق تيمي


Recommended Posts

السلام عليكم

باختصار ي شباب مسوي تيمات ولا اقدر اقتل اللي معي بالتيم

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

مادري وش الحل

Link to comment
  • Replies 55
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

setTeamFriendlyFire 

اخوي ذا يخليني ماقدر اقتل اللي معي بالتيم صح؟

انا ابي اقدر اقتله

سبق وطرحت المشكله بموضوع اخر لكن لم احصل ع افادة

لكن راح اجرب ع ذا ولي باك

setTeamFriendlyFire ( newTeam ,true) 

هذا يقولو ماتقدر تقتل فريقك انا ابي اقتله

Edited by Guest
Link to comment
true غير

false ل

قبل كان فلس برضو مايقتل وجربت ترو نفسسو

هل من الممكن في مود ثاني يخرب عليه ويخليني ماقدر اقتل اللي معي بالتيم :roll:

  
newTeam = createTeam ( "No Team", 255, 255, 255 ) 
addEvent("removeteamno",false ) 
addEventHandler("removeteamno",root, 
function () 
    setElementModel(source,0) 
    setTeamFriendlyFire ( newTeam ,true) 
    setPlayerNametagColor ( source, 255, 255, 255 ) 
    setPlayerTeam ( source, newTeam ) 
    end 
  
function setAdminTeam() 
    setPlayerTeam(source,newTeam) 
    end 
addEventHandler("onPlayerJoin",root,setAdminTeam) 
) 

Link to comment

ذا كيلير سسوال

ذا اول مايدخل الاعب يحطه بتيم

function setAdminTeam() 
if getAccountData(account, "fiSpawn") then 
setAccountData(account, "fiSpawn", false) 
    setPlayerTeam(source,newTeam) 
     end 
 end 
addEventHandler("onPlayerJoin",root,setAdminTeam) 

اضفت له داتا اول مره يدخل يحطه بالتيم بس لو لو يدخل مره ثاني مايحطه بالتيم لن مركب كود حفظ التيم

واستخدمت كود الاخ زاخف لحفظ التيم

addEventHandler( "onPlayerQuit", root, function(  ) 
   local PlayerAcc = getPlayerAccount ( source ) 
     if ( PlayerAcc and not isGuestAccount ( PlayerAcc ) and getPlayerTeam ( source ) ) then 
         setAccountData ( PlayerAcc, "PlayerTeam", getTeamName ( getPlayerTeam ( source ) ) 
      end 
end ) 
  
addEventHandler( "onPlayerLogin", root, function( ) 
    local PlayerAcc = getPlayerAccount ( source ) 
    local Team = getAccountData( PlayerAcc, "PlayerTeam" ) 
     if ( Team ) then 
         setPlayerTeam ( source, getTeamFromName ( tostring ( Team ) ) ) 
         outputChatBox ( "** You Join Team:"..Team, source, 0, 255, 0, true ) 
      end 
end ) 

وش المشكله لو سسمحت : )

Link to comment
يوضعكـ بالتيم وقت تسجل بحسابكـ .. سجلت بحسابك وما ضبط ؟

اخوي انا لان ماجربت كودك لحفظ التيم انا ابي اول تشوفو لي ذا الداتا لحفظ التيم اول مره بس صح ولا

function setAdminTeam() 
if getAccountData(account, "fiSpawn") then 
setAccountData(account, "fiSpawn", false) 
    setPlayerTeam(source,newTeam) 
     end 
 end 
addEventHandler("onPlayerJoin",root,setAdminTeam) 

لن ذا يحطه نو تيم ع طول يعني لو اركب حفظ ماراح استفيد شي

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

اتمنى فهمت لن احس شرحت شرح غبي شوي

Link to comment
اللي فهمته .. لو مثلأ اول مرهـ انا ادخل السيرفر يحطني نو تيم .. لو ثاني مرهـ يحطه بالتيم اللي كان فيه اللي انحفظ يعني ؟

يب يب

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

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

:)

Link to comment

addEventHandler( "onPlayerQuit", root, function(  ) 
    local PlayerAcc = getPlayerAccount ( source ) 
    if ( PlayerAcc and not isGuestAccount ( PlayerAcc ) and getPlayerTeam ( source ) ) then 
       setAccountData ( PlayerAcc, "PlayerTeam", getTeamName ( getPlayerTeam ( source ) ) 
   end 
end ) 
  
addEventHandler( "onPlayerLogin", root, function ( _,acc ) 
     local SavedTeam_ = getAccountData( acc, "PlayerTeam" ) 
     if ( SavedTeam_ ) then 
         setPlayerTeam ( source, getTeamFromName ( SavedTeam_ ) ) 
         outputChatBox ( "* You Joined Team: "..SavedTeam_, source, 0, 255, 0, true ) 
     else 
         setPlayerTeam ( source, getTeamFromName ( "NoTeam" ) ) 
    end 
end ) 
Link to comment
addEventHandler( "onPlayerQuit", root, function(  ) 
    local PlayerAcc = getPlayerAccount ( source ) 
    if ( PlayerAcc and not isGuestAccount ( PlayerAcc ) and getPlayerTeam ( source ) ) then 
       setAccountData ( PlayerAcc, "PlayerTeam", getTeamName ( getPlayerTeam ( source ) ) 
   end 
end ) 
  
addEventHandler( "onPlayerLogin", root, function ( _,acc ) 
     local SavedTeam_ = getAccountData( acc, "PlayerTeam" ) 
     if ( SavedTeam_ ) then 
         setPlayerTeam ( source, getTeamFromName ( SavedTeam_ ) ) 
         outputChatBox ( "* You Joined Team: "..SavedTeam_, source, 0, 255, 0, true ) 
     else 
         setPlayerTeam ( source, getTeamFromName ( "NoTeam" ) ) 
    end 
end ) 

يقول خطاء اند سطر 6

Link to comment

addEventHandler( "onPlayerQuit", root, function(  ) 
    local PlayerAcc = getPlayerAccount ( source ) 
    if ( PlayerAcc and not isGuestAccount ( PlayerAcc ) and getPlayerTeam ( source ) ) then 
       setAccountData ( PlayerAcc, "PlayerTeam", getTeamName ( getPlayerTeam ( source ) ) ) 
   end 
end ) 
  
addEventHandler( "onPlayerLogin", root, function ( _,acc ) 
     local SavedTeam_ = getAccountData( acc, "PlayerTeam" ) 
     if ( SavedTeam_ ) then 
         setPlayerTeam ( source, getTeamFromName ( SavedTeam_ ) ) 
         outputChatBox ( "* You Joined Team: "..SavedTeam_, source, 0, 255, 0, true ) 
     else 
         setPlayerTeam ( source, getTeamFromName ( "NoTeam" ) ) 
    end 
end ) 
Link to comment
addEventHandler( "onPlayerQuit", root, function(  ) 
    local PlayerAcc = getPlayerAccount ( source ) 
    if ( PlayerAcc and not isGuestAccount ( PlayerAcc ) and getPlayerTeam ( source ) ) then 
       setAccountData ( PlayerAcc, "PlayerTeam", getTeamName ( getPlayerTeam ( source ) ) ) 
   end 
end ) 
  
addEventHandler( "onPlayerLogin", root, function ( _,acc ) 
     local SavedTeam_ = getAccountData( acc, "PlayerTeam" ) 
     if ( SavedTeam_ ) then 
         setPlayerTeam ( source, getTeamFromName ( SavedTeam_ ) ) 
         outputChatBox ( "* You Joined Team: "..SavedTeam_, source, 0, 255, 0, true ) 
     else 
         setPlayerTeam ( source, getTeamFromName ( "NoTeam" ) ) 
    end 
end ) 

ايووةةة زبط والتيم ينحفظ وززي العسسسل شكرأ : )

Link to comment

زاحف في مشكله صغيره

مثلا اخذ تيم رقم السكن حقه 200 وطلع ودخل ينحفظ تيم لكن يرجع السكن 0 :(

واذا شلت الكود ذا

playerSkin = { } 
  
addEventHandler( 'onPlayerSpawn', root, 
    function( ) 
        setTimer( setElementModel, 500, 1, source, ( playerSkin[ source ] or 0 ) ) 
    end 
) 
  
addEventHandler( 'onPlayerWasted', root, 
    function() 
        playerSkin[ source ] = getElementModel( source ) 
    end 
) 

تبع اخونا عاشق الشرق

لا طلعت ودخلت يرجع التيم نفسسو و الشخصية بس لا متت تتغير لسي جي :(

Edited by Guest
Link to comment

playerSkin = { } 
  
addEventHandler( 'onPlayerSpawn', root, 
    function( ) 
        setTimer( setElementModel, 3000, 1, source, ( playerSkin[ source ] or 0 ) ) 
    end 
) 
  
addEventHandler( 'onPlayerWasted', root, 
    function() 
        playerSkin[ source ] = getElementModel( source ) 
    end 
) 
Link to comment
playerSkin = { } 
  
addEventHandler( 'onPlayerSpawn', root, 
    function( ) 
        setTimer( setElementModel, 3000, 1, source, ( playerSkin[ source ] or 0 ) ) 
    end 
) 
  
addEventHandler( 'onPlayerWasted', root, 
    function() 
        playerSkin[ source ] = getElementModel( source ) 
    end 
) 

سفاح المشكله مو ب الكود اللي طرحته

المشكله الحين يوم ركبت حفظ التيم لو اخذت تيم رقم شخصيته 100 ثم قفل سيرفر

وفتح ثاني ترجع شصيته سي جي انا ابي ترجع نفس مكانت قبل يقفل

اتمنتى فهمت وشكرا لك

Link to comment

عدلت لكك كود ألآخ زاحف بأنه يحفظ الشخصية بعد لا يطلع من السيرفر واذا سجل دخوله يعطيه شخصيته

واذا اول مرة يدخل يعطيه سي جي

addEventHandler( "onPlayerQuit", root, function(  ) 
    local PlayerAcc = getPlayerAccount ( source ) 
    if ( PlayerAcc and not isGuestAccount ( PlayerAcc ) and getPlayerTeam ( source ) ) then 
       setAccountData ( PlayerAcc, "PlayerTeam", getTeamName ( getPlayerTeam ( source ) ) 
setAccountData ( PlayerAcc, "skin", getElementModel ( source  ) ) 
        end 
end ) 
  
addEventHandler( "onPlayerLogin", root, function ( _,acc ) 
     local SavedTeam_ = getAccountData( acc, "PlayerTeam" ) 
      local skinPlayer = getAccountData( acc, "skin" ) 
     if ( SavedTeam_ ) then 
         setPlayerTeam ( source, getTeamFromName ( SavedTeam_ ) ) 
         outputChatBox ( "* You Joined Team: "..SavedTeam_, source, 0, 255, 0, true ) 
     else 
         setPlayerTeam ( source, getTeamFromName ( "NoTeam" ) ) 
         if (  skinPlayer ) then 
         setElementModel ( source ,  skinPlayer ) 
          else 
          setElementModel ( source , 0 ) 
             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...