Jump to content

طلب يا مبرمجين


AL-SAYED

Recommended Posts

جرب هذا

function playerDamage( attacker, weapon, attackerweapon, loss ) 
    local Team = getTeamFromName ( "Police" )--ضيف قروب الشرطه 
    if Team then 
    if ( attackerweapon == 0 ) then--بدل 0 بأسم العصى لشرطه 
      spawnPlayer ( player, x, y, z )--حط ألأحداثيات الي راح ينتقل لهم الاعب مو تنسخه وتلصقه وتقول ماشتغل 
     end 
    end 
end 
addEventHandler ( "onPlayerDamage", getRootElement (), playerDamage) 

Link to comment
جرب هذا
function playerDamage( attacker, weapon, attackerweapon, loss ) 
    local Team = getTeamFromName ( "Police" )--ضيف قروب الشرطه 
    if Team then 
    if ( attackerweapon == 0 ) then--بدل 0 بأسم العصى لشرطه 
      spawnPlayer ( player, x, y, z )--حط ألأحداثيات الي راح ينتقل لهم الاعب مو تنسخه وتلصقه وتقول ماشتغل 
     end 
    end 
end 
addEventHandler ( "onPlayerDamage", getRootElement (), playerDamage) 

function playerDamage( attacker, weapon, attackerweapon, loss ) 
    local Team = getTeamFromName ( "Police" )--ضيف قروب الشرطه 
    if Team then 
    if ( attackerweapon == 3 ) and ( loss >= 2 ) then--بدل 0 بأسم العصى لشرطه 
      spawnPlayer ( player, x, y, z )--حط ألأحداثيات الي راح ينتقل لهم الاعب مو تنسخه وتلصقه وتقول ماشتغل 
     end 
    end 
end 
addEventHandler ( "onPlayerDamage", root, playerDamage) 

Link to comment
  • Other Languages Moderators
function playerDamage(attacker, weapon) 
     local Team = getTeamFromName("Police") 
     local aTeam = getPlayerTeam(attacker) 
     if Team and aTeam and Team == aTeam and (weapon == 3) then 
          setElementPosition(source, x, y, z) 
     end 
end 
addEventHandler("onPlayerDamage", root, playerDamage) 

Link to comment
function playerDamage(attacker, weapon) 
     local Team = getTeamFromName("Police") 
     local aTeam = getPlayerTeam(attacker) 
     if Team and aTeam and Team == aTeam and (weapon == 3) then 
          setElementPosition(source, x, y, z) 
     end 
end 
addEventHandler("onPlayerDamage", root, playerDamage) 

بالشرط ؟ Team ليه كررت

Link to comment
function playerDamage(attacker, weapon) 
     local Team = getTeamFromName("Police") 
     local aTeam = getPlayerTeam(attacker) 
     if Team and aTeam and Team == aTeam and (weapon == 3) then 
          setElementPosition(source, x, y, z) 
     end 
end 
addEventHandler("onPlayerDamage", root, playerDamage) 

بالشرط ؟ Team ليه كررت

اذا كان موجود واذا كان يساوي ذاه ذاك

اتمنى وضحت

Link to comment

طيب هو حطهم أثنينهم قبل علامة المسآواهـ

  
     local Team = getTeamFromName("Police") 
     local aTeam = getPlayerTeam(attacker) 
     if Team and aTeam and Team == ......... 
  

بدون الإختصارات أوضح

  
if getTeamFromName("Police") and getPlayerTeam(attacker) and getTeamFromName("Police") == ... 
  

Link to comment
  • Other Languages Moderators
function playerDamage(attacker, weapon) 
     local Team = getTeamFromName("Police") 
     local aTeam = getPlayerTeam(attacker) 
     if Team and aTeam and Team == aTeam and (weapon == 3) then 
          setElementPosition(source, x, y, z) 
     end 
end 
addEventHandler("onPlayerDamage", root, playerDamage) 

بالشرط ؟ Team ليه كررت

لان يا عزيزي إذا ما كان في تيم شرطة و ما كان اللاعب في تيم الشرطة

بيكون الشرط كذا

if false == false then

بالتالي الشرط بيتحقق بدون ما يكون اللاعب في تيم الشرطة و بدون ما يكون تيم شرطة موجود من الأساس

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