Jump to content

Put weapons in DD map


Soren

Recommended Posts

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 :wink::wink::wink:

Link to comment

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 by Guest
Link to comment
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.

Link to comment
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...

Thx it works

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...