Jump to content

Search the Community

Showing results for tags 'annoying'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Multi Theft Auto: San Andreas 1.x
    • Support for MTA:SA 1.x
    • User Guides
    • Open Source Contributors
    • Suggestions
    • Ban appeals
  • General MTA
    • News
    • Media
    • Site/Forum/Discord/Mantis/Wiki related
    • MTA Chat
    • Other languages
  • MTA Community
    • Scripting
    • Maps
    • Resources
    • Other Creations & GTA modding
    • Competitive gameplay
    • Servers
  • Other
    • General
    • Multi Theft Auto 0.5r2
    • Third party GTA mods
  • Archive
    • Archived Items
    • Trash

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Gang


Location


Occupation


Interests

Found 1 result

  1. I tried to create Colshape-based antiDM system. It looks like this: antiDeathMatchColShapes= {353.71392822266, 170.66009521484, 1005.3893432617, 100, 100, 1, 3} animebankess = createPed (233, 359.71392822266, 173.66009521484, 1008.3893432617, -90) outputChatBox(tostring(animebankess)) setElementDimension ( animebankess, 1 ) setElementInterior ( animebankess, 3 ) addEventHandler("onClientResourceStart", getRootElement(), function () outputChatBox("Yeah!") outputChatBox(antiDeathMatchColShapes[1]) local i = 1 local count = 1 AntiDmZones = {} repeat outputChatBox("done once!") colX = antiDeathMatchColShapes[i] colY = antiDeathMatchColShapes[i+1] colZ = antiDeathMatchColShapes[i+2] colR = antiDeathMatchColShapes[i+3] colH = antiDeathMatchColShapes[i+4] colDim = antiDeathMatchColShapes[i+5] colInt = antiDeathMatchColShapes[i+6] table.insert(AntiDmZones, createColTube(colX, colY, colZ, colR, colH)) setElementDimension(AntiDmZones[count], colDim) setElementInterior(AntiDmZones[count], colInt) count = count + 1 i=i+8 until not antiDeathMatchColShapes[i] addEventHandler("onClientPedDamage", getRootElement(), function (attacker) local i = 1 while AntiDmZones[i] do outputChatBox(tostring(source)) checkOne = isElementWithinColShape(source, AntiDmZones[i]) checkTwo = isElementWithinColShape(attacker, AntiDmZones[i]) outputChatBox(tostring(checkOne)) outputChatBox(tostring(checkTwo)) if isElementWithinColShape(source, AntiDmZones[i]) or isElementWithinColShape(attacker, AntiDmZones[i]) then cancelEvent() end i=i+1 end end) addEventHandler("onClientPlayerDamage", getRootElement(), function (attacker) local i = 1 while AntiDmZones[i] do outputChatBox(tostring(getElementType(AntiDmZones[i]))) if isElementWithinColShape(source, AntiDmZones[i]) or isElementWithinColShape(attacker, AntiDmZones[i]) then cancelEvent() end i=i+1 end end) addEventHandler("onClientVehicleDamage", getRootElement(), function (attacker) local i = 1 while AntiDmZones[i] do outputChatBox(tostring(getElementType(AntiDmZones[i]))) if isElementWithinColShape(source, AntiDmZones[i]) or isElementWithinColShape(attacker, AntiDmZones[i]) then cancelEvent() end i=i+1 end end) addEventHandler("onClientPlayerStealthKill", getRootElement(), function (attacker) local i = 1 while AntiDmZones[i] do outputChatBox(tostring(getElementType(AntiDmZones[i]))) if isElementWithinColShape(source, AntiDmZones[i]) or isElementWithinColShape(attacker, AntiDmZones[i]) then cancelEvent() end i=i+1 end end) end) And even if ped inside the colshape, check returns false. But if player inside colshape - check returns true. Two hours spent to find out what is the problem - two hours just wasted. Sorry for my weird usage of loops.
×
×
  • Create New...