Jump to content

طلب .....


Recommended Posts

السلام عليكم ورحمة الله وبركاته

يا اخواني ابغى طلب

اللي هو :

ابي اسوي وظيفة مثلاً

اي لاعب يدخل الماركر يحصل دم ودرع

مهما كان تيمة

باستثناء تيم الشرطة

يعني انا احتاج الاستثناء هذا هو اللي معقدني

Link to comment

جرب

+ ذا ينفع على كل التيمات ماعاد الشرطه

! .. مثل ماطلبت

marker = createMarker ( ... ) 
  
function Test ( plr ) 
    if ( getTeamName( getPlayerTeam( plr ) ) == "Police" ) then 
        outputChatBox ( 'Cant You Give Heal..' ) 
    else 
        setElementHealth ( plr,100 ) 
        setPedArmor ( plr,100 ) 
    end 
end 
  
addEventHandler ( 'onMarkerHit', marker, Test ) 
Link to comment
ناقصكـ تتحقق من اللي خش الماركر و ناقصكـ تتحقق ان اللاعب عندهـ تيم او لا @ HD القائد

الـ =~ يعني مخالف للشي زي ما قلت يعني .

طيب لاهنت صحح تحقق حقي عشان افهم بس :mrgreen:

Link to comment

marker = createMarker ( ... ) 
  
function Test ( plr ) 
   if ( getElementType ( plr ) == "player" ) then 
    if ( getPlayerTeam( plr ) ) then 
     if ( getTeamName( getPlayerTeam( plr ) ) == "Police" ) then 
         outputChatBox ( 'Cant You Give Heal..' ) 
    else 
         setElementHealth ( plr,100 ) 
         setPedArmor ( plr,100 ) 
      end 
    end 
  end    
end 
addEventHandler ( 'onMarkerHit', marker, Test ) 
Link to comment
marker = createMarker ( ... ) 
  
function Test ( plr ) 
   if ( getElementType ( plr ) == "player" ) then 
    if ( getPlayerTeam( plr ) ) then 
     if ( getTeamName( getPlayerTeam( plr ) ) == "Police" ) then 
         outputChatBox ( 'Cant You Give Heal..' ) 
    else 
         setElementHealth ( plr,100 ) 
         setPedArmor ( plr,100 ) 
      end 
    end 
  end    
end 
addEventHandler ( 'onMarkerHit', marker, Test ) 

طيب بها الكود يمديني لو تيم الاعب مثالاً nil .. مايصير شيء صح ؟

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