Jump to content

مطلوب فناكشات


Recommended Posts

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

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

Link to comment

مقر سوات يعنى سيرفر حرب عصابات بيصير فى Team

لكل فريق

تفضل كودك جربو

local Col = createColCuboid ( X, Y, SizeX, SizeY ) 
addEventHandler("onColShipHit", Col, 
function (thePlayer) 
if getElementType ( thePlayer ) == "player" and not ( getPlayerTeam ( thePlayer ) and not getTeamName ( getPlayerTeam ( thePlayer ) ) == 'Team Name' ) then 
setTimer(killPlayer ( thePlayer ), 5000, 0) 
    end 
end 
) 
  

غير

X, Y == احداثيات المكان

SizeX, SizeY == حجم الكول شيب

TeamName == اسم التيم اللى يقدر يدخل القر

Link to comment
local Col = createColCuboid ( X, Y, SizeX, SizeY ) 
addEventHandler("onColShipHit", Col, 
function (thePlayer) 
if getElementType ( thePlayer ) == "player" then 
if not isObjectInACLGroup("user."..getAccountName(getPlayerAccount( thePlayer )), aclGetGroup("GroupName")) then 
setTimer(killPlayer ( thePlayer ), 5000, 1) 
        end 
    end 
end 
) 

GroupName == اسم الجروب فى الاسل

Link to comment
local Col = createColCuboid ( X, Y, SizeX, SizeY ) 
addEventHandler("onColShipHit", Col, 
function (thePlayer) 
if getElementType ( thePlayer ) == "player" then 
if not isObjectInACLGroup("user."..getAccountName(getPlayerAccount( thePlayer )), aclGetGroup("GroupName")) then 
setTimer(killPlayer ( thePlayer ), 5000, 1) 
        end 
    end 
end 
) 

GroupName == اسم الجروب فى الاسل

local Col = createColCuboid ( X, Y, SizeX, SizeY ) 
  
addEventHandler("onColShipHit", Col, 
    function (thePlayer) 
        if (getElementType ( thePlayer ) == "player") and ( getElementData(thePlayer, "gang") ~=  'SWAT' ) then 
           setTimer(killPed , 5000, 1, thePlayer )  
      end 
  end 
) 

Link to comment

ما اشوف فرق لو يكون عصابة عبارة عن تيم !

وثانيآ , يبي لما يدخل السوات في المقر ينقص من طاقته لين مايصير 0

  
setTimer(setElementHealth , 2000 , 10 , source ,10) -- هل هذي صحيحة ؟ 
  

Link to comment
ما اشوف فرق لو يكون عصابة عبارة عن تيم !

وثانيآ , يبي لما يدخل السوات في المقر ينقص من طاقته لين مايصير 0

  
setTimer(setElementHealth , 2000 , 10 , source ,10) -- هل هذي صحيحة ؟ 
  

حدد لي ويين بالضبط قال

" وثانيآ , يبي لما يدخل السوات في المقر ينقص من طاقته لين مايصير 0 "

Link to comment

طيب يا أخوان عندي سؤال

function good (player) 
if getElementType(player) == "player" then  
setElementHealth(player , getElementHealth(player)-10) 
end 
end 
  
  
  
setTimer(good , 2000 , 10) 

الكود ^

يقول لي

"getElementHealth" expected element at argument 1 , got nil

وجربت احط السورس ولكن نفس المشكلة !

Link to comment
طيب يا أخوان عندي سؤال
function good (player) 
if getElementType(player) == "player" then  
setElementHealth(player , getElementHealth(player)-10) 
end 
end 
  
  
  
setTimer(good , 2000 , 10) 

الكود ^

يقول لي

"getElementHealth" expected element at argument 1 , got nil

وجربت احط السورس ولكن نفس المشكلة !

getElementsByType --- سو لووب للاعبين 

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