TheMaysTRo Posted July 29, 2014 Posted July 29, 2014 Hello . i create a col shape . local tempCol = createColCuboid ( 2360.6469726563,-1803.5179443359,1442.5999755859, 500, 120, 10.0 ) and when i hit this col shape only .I want to toggle vehicles and jetpack off there . and toggle them back on when i exit col shape .
Max+ Posted July 29, 2014 Posted July 29, 2014 what do you mean by toggel them off ? you want to destory vehilces & JetPacks in the col Shape if you enter and create them back if you exit ? - New , Kill System - New, GameMode Intro - Leve / Exp System - New nametag showing style - New , Hud For Players - Skin Selection from SA-MP - Money System / Buy Weapons - Drop Weapons - New, Flood System - New , Group Assign - Gun license For Weapons - Random Rule System For Money
TheMaysTRo Posted July 29, 2014 Author Posted July 29, 2014 what do you mean by toggel them off ?you want to destory vehilces & JetPacks in the col Shape if you enter and create them back if you exit ? if someone entred the colshape with car , his car destroyed or something , and jetpack . he can't use them in the colshape
Max+ Posted July 29, 2014 Posted July 29, 2014 (edited) Try this --- ServerSide local tempCol = createColCuboid ( 2360.6469726563,-1803.5179443359,1442.5999755859, 500, 120, 10.0 ) addEventHandler("onColShapeHit",resourceRoot, function ( player ) if ( isElementWithinColShape ( player, tempCol ) ) then if ( doesPedHaveJetPack ( player ) ) and ( isPedInVehicle ( player )) then removePedJetPack ( player ) removePedFromVehicle ( player ) outputChatBox ( ' You Cant Use JetPack Or Vehicle in Here ',player, 255, 0, 0 ) end end end ) Edited # Edited July 29, 2014 by Guest - New , Kill System - New, GameMode Intro - Leve / Exp System - New nametag showing style - New , Hud For Players - Skin Selection from SA-MP - Money System / Buy Weapons - Drop Weapons - New, Flood System - New , Group Assign - Gun license For Weapons - Random Rule System For Money
TheMaysTRo Posted July 29, 2014 Author Posted July 29, 2014 Try this --- ClientSide local tempCol = createColCuboid ( 2360.6469726563,-1803.5179443359,1442.5999755859, 500, 120, 10.0 ) addEventHandler("onClientColShapeHit",tempCol, function ( theElement ) if ( theElement == localPlayer ) then if ( doesPedHaveJetPack ( theElement ) ) then removePedJetPack ( theElement ) vehicles = getElementsByType("vehicle") for _,v in ipairs(vehicles) do destroyElement ( v ) outputChatBox ( ' You Cant Use JetPack Or Vehicle in Here ', 255, 0, 0 ) end end end end ) Not working :[
Max+ Posted July 29, 2014 Posted July 29, 2014 Try Now i edited my post /debugscript 3 Change it in meta.xml to serverside - New , Kill System - New, GameMode Intro - Leve / Exp System - New nametag showing style - New , Hud For Players - Skin Selection from SA-MP - Money System / Buy Weapons - Drop Weapons - New, Flood System - New , Group Assign - Gun license For Weapons - Random Rule System For Money
AboShanab Posted July 29, 2014 Posted July 29, 2014 (edited) @Max+ : Your Code For Hit In Colshape Not With In Colshape .. Try To Use setTimer .. Edited July 29, 2014 by Guest Skype : aboshanab_
Max+ Posted July 29, 2014 Posted July 29, 2014 @Max+ : Your Code For Hit In Marker Not With In Marker ..Try To Use setTimer .. ? onClientColShapeHit it's for col shapes ! - New , Kill System - New, GameMode Intro - Leve / Exp System - New nametag showing style - New , Hud For Players - Skin Selection from SA-MP - Money System / Buy Weapons - Drop Weapons - New, Flood System - New , Group Assign - Gun license For Weapons - Random Rule System For Money
#DRAGON!FIRE Posted July 29, 2014 Posted July 29, 2014 local colshape = createColCuboid ( .... ) local Timer = { }; addEventHandler( "onColShapeHit", resourceRoot, function ( element ) if ( source == colshape ) then if ( getElementType ( element ) == "player" ) then if ( isTimer ( Timer[ element ] ) ) then killTimer ( Timer[ element ] ) end Timer[ element ] = setTimer ( function ( element ) if ( isElementWithinColShape ( element, colshape ) ) then if ( doesPedHaveJetPack ( element ) ) then removePedJetPack ( element ) end if ( getPedOccupiedVehicle( element ) ) then destroyElement ( getPedOccupiedVehicle( element ) ) end else killTimer ( Timer[ element ] ) end, 100, 0, element ) end end end ) addEventHandler( "onColShapeLeave", resourceRoot, function ( element ) if ( source == colshape ) then if ( getElementType ( element ) == "player" ) then if ( isTimer ( Timer[ element ] ) ) then killTimer ( Timer[ element ] ) Timer[ element ] = nil end end end end ) To Contact Me at Skype : [email protected]
Max+ Posted July 29, 2014 Posted July 29, 2014 local colshape = createColCuboid ( .... ) local Timer = { }; addEventHandler( "onColShapeHit", resourceRoot, function ( element ) if ( source == colshape ) then if ( getElementType ( element ) == "player" ) then if ( isTimer ( Timer[ element ] ) ) then killTimer ( Timer[ element ] ) end Timer[ element ] = setTimer ( function ( element ) if ( isElementWithinColShape ( element, colshape ) ) then if ( doesPedHaveJetPack ( element ) ) then removePedJetPack ( element ) end if ( getPedOccupiedVehicle( element ) ) then destroyElement ( getPedOccupiedVehicle( element ) ) end else killTimer ( Timer[ element ] ) end, 100, 0, element ) end end end ) addEventHandler( "onColShapeLeave", resourceRoot, function ( element ) if ( source == colshape ) then if ( getElementType ( element ) == "player" ) then if ( isTimer ( Timer[ element ] ) ) then killTimer ( Timer[ element ] ) Timer[ element ] = nil end end end end ) why the timer is needed here ? - New , Kill System - New, GameMode Intro - Leve / Exp System - New nametag showing style - New , Hud For Players - Skin Selection from SA-MP - Money System / Buy Weapons - Drop Weapons - New, Flood System - New , Group Assign - Gun license For Weapons - Random Rule System For Money
#DRAGON!FIRE Posted July 29, 2014 Posted July 29, 2014 if u hit the colshape and with Jet or Vehicle it destroyed .. then ? But if I take a jet or vehicle again !! To Contact Me at Skype : [email protected]
Max+ Posted July 29, 2014 Posted July 29, 2014 if u hit the colshape and with Jet or Vehicle it destroyed .. then ? But if I take a jet or vehicle again !! but it's when he enter the col every time he get in it's get destroyed . 1 - New , Kill System - New, GameMode Intro - Leve / Exp System - New nametag showing style - New , Hud For Players - Skin Selection from SA-MP - Money System / Buy Weapons - Drop Weapons - New, Flood System - New , Group Assign - Gun license For Weapons - Random Rule System For Money
#DRAGON!FIRE Posted July 29, 2014 Posted July 29, 2014 No !! .. your code just when player enter . To Contact Me at Skype : [email protected]
TheMaysTRo Posted July 29, 2014 Author Posted July 29, 2014 Try this --- ServerSide local tempCol = createColCuboid ( 2360.6469726563,-1803.5179443359,1442.5999755859, 500, 120, 10.0 ) addEventHandler("onColShapeHit",resourceRoot, function ( player ) if ( isElementWithinColShape ( player, tempCol ) ) then if ( doesPedHaveJetPack ( player ) ) and ( isPedInVehicle ( player )) then removePedJetPack ( player ) removePedFromVehicle ( player ) outputChatBox ( ' You Cant Use JetPack Or Vehicle in Here ',player, 255, 0, 0 ) end end end ) Edited # well , not working local colshape = createColCuboid ( .... ) local Timer = { }; addEventHandler( "onColShapeHit", resourceRoot, function ( element ) if ( source == colshape ) then if ( getElementType ( element ) == "player" ) then if ( isTimer ( Timer[ element ] ) ) then killTimer ( Timer[ element ] ) end Timer[ element ] = setTimer ( function ( element ) if ( isElementWithinColShape ( element, colshape ) ) then if ( doesPedHaveJetPack ( element ) ) then removePedJetPack ( element ) end if ( getPedOccupiedVehicle( element ) ) then destroyElement ( getPedOccupiedVehicle( element ) ) end else killTimer ( Timer[ element ] ) end, 100, 0, element ) end end end ) addEventHandler( "onColShapeLeave", resourceRoot, function ( element ) if ( source == colshape ) then if ( getElementType ( element ) == "player" ) then if ( isTimer ( Timer[ element ] ) ) then killTimer ( Timer[ element ] ) Timer[ element ] = nil end end end end ) not working also
TheMaysTRo Posted July 29, 2014 Author Posted July 29, 2014 Help Please ? i want that no one can use a jetpack or vehicle on this col shape
Et-win Posted July 29, 2014 Posted July 29, 2014 "It doesn't work, help!", "It doesn't work, fix it!", "It do"... Tell us what DOESN'T work, tell us what DEBUGSCRIPT 3 gives... Saying "It doesn't work" doesn't help us at ALL to help you....... ~Scripts~ Clan War System V1.2.0 ~Maps~ [DM]Et-win - The Run [FUN]Et-win - Drift Rocket [FUN]Et-win - Drift Rocket // [DD]Et-win - Cross 3xC
TheMaysTRo Posted July 29, 2014 Author Posted July 29, 2014 "It doesn't work, help!", "It doesn't work, fix it!", "It do"... Tell us what DOESN'T work, tell us what DEBUGSCRIPT 3 gives... Saying "It doesn't work" doesn't help us at ALL to help you....... well i gave you the col shape code ,thats what i can do , itried what they gave me and its not working , if you don't like to help don't help me .
Et-win Posted July 29, 2014 Posted July 29, 2014 Maybe I'd want to help, but it's easier for us if you tell us what doesn't work. ~Scripts~ Clan War System V1.2.0 ~Maps~ [DM]Et-win - The Run [FUN]Et-win - Drift Rocket [FUN]Et-win - Drift Rocket // [DD]Et-win - Cross 3xC
TheMaysTRo Posted July 29, 2014 Author Posted July 29, 2014 Maybe I'd want to help, but it's easier for us if you tell us what doesn't work. ok . i tried this and i don't know why its not working ? any idea ? local hayMarker2 = createMarker (2614.2666015625,-1754.1813964844,1442.5999755859, "cylinder", 290, 2500, 0, 0, 100, getRootElement()) setElementVisibleTo (hayMarker2,root,false ) function jetpackremove (player) if doesPedHaveJetPack( player ) then removePedJetPack ( player ) end end addEventHandler ("onMarkerHit", hayMarker2, jetpackremove)
#DRAGON!FIRE Posted July 30, 2014 Posted July 30, 2014 i forget end ... try this and don't forget remove .... and put your colshape args local colshape = createColCuboid ( .... ) local Timer = { }; addEventHandler( "onColShapeHit", resourceRoot, function ( element ) if ( source == colshape ) then if ( getElementType ( element ) == "player" ) then if ( isTimer ( Timer[ element ] ) ) then killTimer ( Timer[ element ] ) end Timer[ element ] = setTimer ( function ( element ) if ( isElementWithinColShape ( element, colshape ) ) then if ( doesPedHaveJetPack ( element ) ) then removePedJetPack ( element ) end if ( getPedOccupiedVehicle( element ) ) then destroyElement ( getPedOccupiedVehicle( element ) ) end else killTimer ( Timer[ element ] ) end end, 100, 0, element ) end end end ) addEventHandler( "onColShapeLeave", resourceRoot, function ( element ) if ( source == colshape ) then if ( getElementType ( element ) == "player" ) then if ( isTimer ( Timer[ element ] ) ) then killTimer ( Timer[ element ] ) Timer[ element ] = nil end end end end ) To Contact Me at Skype : [email protected]
Amine#TN Posted January 19, 2017 Posted January 19, 2017 can i get the function when player have case then remove his jetpack TN Zombies infection Project OWNERi choose a wrong partner
ViRuZGamiing Posted January 20, 2017 Posted January 20, 2017 This person isn't capable of filling in arguments so we have another case of ''hey I need this script'' "If debugging is the process of removing software bugs, then programming must be the process of putting them in."
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