Jump to content

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


Recommended Posts

Event # 
'onColShapeHit' 
  
function # 
createColCuboid -- صنع الحدود 
getElementType -- نتحقق من النوع 
-- اذا كان قصدك مود القروبات استخدم 
getElementData -- نتحقق من القروب 
-- استخدم ACL اذا كان قصدك قروب في ال 
isObjectInACLGroup -- نتحقق من القروب 
setElementPosition -- ينقله للمكان 
Edited by Guest
Link to comment

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

الكود:

addEventHandler( "onColShapeHit", a51col, opena51gates ) 
function # 
createColCuboid (x,y,z, 255, 255, 255 )----الحجم ممكن تقولو كيف احطه؟؟ كيف احسبه 
if getElementType ( hitElement) == "player" then-يتحقق من نوع اريد انا اذا كان لاعب وسياره 
if getTeamName(getPlayerTeam(source)) == "Police" and getElementData(source, "gang") == "SWAT" then--هنا  اسم القروب 
 if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("SWAT")) then --هنا اسل SWAT 
 setElementPosition(source, 0.0, 0.0, 10.0)هنا ينقله للمكان اللي احدده  
    end 
end 
  

Link to comment

Required Arguments

fX: x الاحداثيات

fY: y الاحداثيات

fZ: z الاحداثيات

fWidth: الي هو العرض , يعني كيف تبي يكون عرضه

fDepth: هنا العمق

fHeight: وهنا الارتفاع

مثال بسيط

local col = createColCuboid (1, 1, 1, 100, 100, 300) 
  
addEventHandler ("onColShapeHit", col,  
   function (element) 
     if getElementType (element) == "player" then 
     if getElementData (element, "gang") == "SWAT" then 
     outputChatBox ("لقد دخلت المنطقه *", element, 255, 100, 0) 
    end 
  end 
end) 
Edited by Guest
Link to comment

-.- انت مو النوع الي يبي يتعلم

انت النوع الي ابي اكواد جاهزه مابي اتعلم

انا عطيتك مثال عشان تتعلم منه

وتجي تقولي مو نفس الكود الي ابيه

وانا جالس اعلمك احسب انه بيفهم , ولكن

الحال في حاله , تبي كود جاهز , !

هنا لتعليم البرمجه , مو الطلبات الجاهزه

Link to comment
-.- انت مو النوع الي يبي يتعلم

انت النوع الي ابي اكواد جاهزه مابي اتعلم

انا عطيتك مثال عشان تتعلم منه

وتجي تقولي مو نفس الكود الي ابيه

وانا جالس اعلمك احسب انه بيفهم , ولكن

الحال في حاله , تبي كود جاهز , !

هنا لتعليم البرمجه , مو الطلبات الجاهزه

لو تعطيه كود جاه يجي يقلك فهمني و يوم تفهمه يقلك غلط

Link to comment

جـرب . #

إذا كـنت مستعمل قـروب

Al3grab = Group .

إأذا كـنت م ـستعمل ,

ahmedfef = gang .

# Server Side . 
local Colshape = createColCuboid ( x, y, z, W, D, H ) 
  
local Group = "YourGroup" 
  
addEventHandler ("onColShapeHit", Colshape, 
function (player) 
  if getElementType (player) == "player" then 
   if getElementData (player, "gang") == Group then 
        else 
    outputChatBox ("* [ مـمـنوع دخـول المحمية ] .", player, 255, 0, 0) 
    spawnPlayer ( player, x, y, z ) 
    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...