Jump to content

طلب #############


Recommended Posts

انا اريد اني اعمل حماية علي البداية يعني مااحد يقدر ينزل سيارات ولا يطلق نار وكذا

باختصار عايز اعمل GreenZone علي بداية ومنطقة اخري

لو ااحد معه مود وانا اغير الاحداثيات يكون مشكور كثير

Link to comment

Created By TAPL

BlockKill = createColCuboid(423.7018737793, 756.60314941406,-100,370,265,150 ) 
greenzonemaparea = createRadarArea ( 423.7018737793, 756.60314941406, 370, 265, 255, 0, 0, 77 ) 
  
function isInColKill () 
    if isElementWithinColShape(localPlayer, BlockKill) then 
        return true 
    end 
end 
  
function ClientExplosionCFunction() 
    if isElementWithinColShape(source, BlockKill) then 
        cancelEvent() 
    end 
end 
addEventHandler("onClientExplosion", root, ClientExplosionCFunction) 
  
function stopDamage() 
    if isInColKill ()  then 
        cancelEvent()  
    end 
end 
addEventHandler("onClientPlayerDamage", localPlayer, stopDamage) 
  
addEventHandler("onClientPreRender", root, 
function() 
    if isInColKill() then 
        if not getElementData(localPlayer, "TurfStat1") then 
            setElementData(localPlayer, "TurfStat1", {"Safe Zone", {0, 255, 0}}) 
        end 
        if getPedWeaponSlot(localPlayer) ~= 0 then 
            setPedWeaponSlot(localPlayer, 0) 
            exports.guimessages:outputClient("You are not allowed to fight inside the safe zone.", 255, 0, 0) 
        end 
    end 
end) 
  
function onClientColShapeLeave(player) 
    if player == localPlayer then 
        setElementData(localPlayer, "TurfStat1", false) 
    end 
end 
addEventHandler("onClientColShapeLeave", BlockKill, onClientColShapeLeave) 
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...