Soren Posted November 18, 2011 Posted November 18, 2011 Hi all im serching a script that when you touch a merker you get a weapon to destroy other people like in the map Puma - Circle circles I have this script but it does not work ids = { "Marker (corona)(1)", "Marker (corona)(2)" } addEventHandler ( "onMarkerHit" ,getResourceRootElement ( ), function ( element ) if ids[getElementID ( source )] and getElementType ( element ) == "player" then giveWeapon ( element, 38, 500, true ) setPedDoingGangDriveBy ( element, true ) end end ) I want to know if the script it's ok and if not you can send me the good one pls If its ok ple send me a pm telling me how to install it on the map Atte: iSoren
CapY Posted November 19, 2011 Posted November 19, 2011 (edited) https://wiki.multitheftauto.com/wiki/CreateMarker https://wiki.multitheftauto.com/wiki/GiveWeapon https://wiki.multitheftauto.com/wiki/Set ... angDriveby https://wiki.multitheftauto.com/wiki/OnMarkerHit Make it from a scratch again, read the function arguments. local marker1 = createMarker(x, y,z , "type", size, r, g, b...) local marker2 = createMarker(x, y,z , "type", size, r, g, b...) function blah () giveWeapon ( source, weaponId, ammo ) setPedDoingGangDriveby ( source, true ) end addEventHandler ( "onMarkerHit" , marker1, blah) addEventHandler ( "onMarkerHit" , marker2, blah) Something like that... Edited November 20, 2011 by Guest
Castillo Posted November 19, 2011 Posted November 19, 2011 ids = { ["Marker (corona)(1)"] = true, ["Marker (corona)(2)"] = true } addEventHandler ( "onMarkerHit",root, function ( element ) if getElementID ( source ) and ids[getElementID ( source )] and getElementType ( element ) == "player" then giveWeapon ( element, 38, 500, true ) setPedDoingGangDriveby ( element, true ) end end ) P.S: CapY, please don't talk like that, you keep doing everything wrong, you can't really tell him to read the arguments if you don't. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Soren Posted November 20, 2011 Author Posted November 20, 2011 https://wiki.multitheftauto.com/wiki/CreateMarkerhttps://wiki.multitheftauto.com/wiki/GiveWeapon https://wiki.multitheftauto.com/wiki/Set ... angDriveby https://wiki.multitheftauto.com/wiki/OnMarkerHit Make it from a scratch again, read the function arguments. local marker1 = createMarker(x, y,z , "type", size, r, g, b...) local marker2 = createMarker(x, y,z , "type", size, r, g, b...) function blah () giveWeapon ( source, weaponId, ammo ) setPedDoingGangDriveBy ( source, true ) end addEventHandler ( "onMarkerHit" , marker1, blah) addEventHandler ( "onMarkerHit" , marker2, blah) Something like that... Thx it works
Castillo Posted November 20, 2011 Posted November 20, 2011 That will never work, setPedDoingGangDriveBy is wrong, it should be: setPedDoingGangDriveby . San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
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