Jump to content

بدي كود حماية لجروب معين


MeZo999

Recommended Posts

  
local col = createColRectangle(.........) 
addEventHandler("onColShapeHit",root,function ( element ) 
if ( source == col ) then 
if ( getElementType(element) == 'player' and not isPedInVehicle(element) ) then 
if not ( getElementData(element,'Group') == 'NameGroup' ) then 
setElementPosition(element,x,y,z) 
end 
end 
end 
end) 
  

Link to comment
local groupName = "اسم القروب المسموح له بدخول المنطقة" 
local x, y, z = 0, 0, 0 -- الإحداثيات الي ينتقل لها اللاعب إذا كان مهو بالقروب 
local colShape = createColRectangle ( fX, fY, fWidth, fHeight ) 
  
addEventHandler ( "onColShapeHit", colShape, 
    function ( theElm ) 
        if ( getElementType ( theElm ) == "player" ) and ( getElementData ( theElm, "Group" ) ~= groupName ) then 
            if ( isPedInVehicle ( theElm ) ) then 
                setElementPosition ( getPedOccupiedVehicle ( theElm ), x, y, z ) 
            else 
                setElementPosition ( theElm, 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...