DonOmar Posted July 4, 2016 Share Posted July 4, 2016 Hi today i wanna ask for any script to disable Grenades and Satchels and Rockets in LS and SF can anyone help me with the code ? Link to comment
Bean666 Posted July 4, 2016 Share Posted July 4, 2016 (edited) Here is an example made by Tails: local bannedIds = { [16] = true, [17] = true, [18] = true, [39] = true, [40] = true, } local hillAreaLS = createColRectangle ( -905.5929, -2933.0986, 4000, 3500 ) local hillAreaSF = createColRectangle( -2994.09448,-1378.01746,2000,4900) local hillAreaLV = createColRectangle (-905.5929,602.33,4000,2500) function forcePlayerWeapon(prevId, curId) if isElementWithinColShape(source, hillAreaLS) then if bannedIds[curId] then outputChatBox("blocked explosives") setPedWeaponSlot(source, 0) end end end addEventHandler("onPlayerWeaponSwitch", root, forcePlayerWeapon) Edited July 4, 2016 by Guest Link to comment
DonOmar Posted July 4, 2016 Author Share Posted July 4, 2016 idk how to create it iam a noob scripter Link to comment
Bean666 Posted July 4, 2016 Share Posted July 4, 2016 idk how to create it iam a noob scripter here is an ex made by tails: local bannedIds = { --- weapon IDs [16] = true, [17] = true, [18] = true, [39] = true, [40] = true, } local hillAreaLS = createColRectangle ( -905.5929, -2933.0986, 4000, 3500 ) function forcePlayerWeapon(prevId, curId) if isElementWithinColShape(source, hillAreaLS) then if bannedIds[curId] then outputChatBox("blocked explosives") setPedWeaponSlot(source, 0) end end end addEventHandler("onPlayerWeaponSwitch", root, forcePlayerWeapon) Link to comment
Bean666 Posted July 4, 2016 Share Posted July 4, 2016 if you want only you can only use in LV then use: if not isElementWithinColShape(source, LVColShape) then Link to comment
Bean666 Posted July 4, 2016 Share Posted July 4, 2016 uhhh.... i already gave you the code... Link to comment
DonOmar Posted July 4, 2016 Author Share Posted July 4, 2016 oh ty bro for ur much help. Link to comment
Bean666 Posted July 4, 2016 Share Posted July 4, 2016 anyways here( it only allows you to use explosives in las venturas): local bannedIds = { [16] = true, [17] = true, [18] = true, [39] = true, [40] = true, } local colshape = createColRectangle ( 861.20703125, 600, 2100, 2400 ) redzonemaparea = createRadarArea (861.20703125, 600, 2100, 2400, 255, 0, 0, 120) function colshapehit(player) if (getElementType(player) == "player" ) then outputChatBox("You've Entered/Left Las Venturas!", player, 255, 0, 0) end end addEventHandler("onColShapeHit", colshape, colshapehit) addEventHandler("onColShapeLeave", colshape, colshapehit) function forcePlayerWeapon(prevId, curId) if not isElementWithinColShape(source, colshape) then if bannedIds[curId] then outputChatBox("You can only use explosives in Las venturas!") setPedWeaponSlot(source, 0) end end end addEventHandler("onPlayerWeaponSwitch", root, forcePlayerWeapon) Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now