Jump to content

[Help]Wanted Bribe Pickup


3B00DG4MER

Recommended Posts

Hello,Today i made script which on Hit it -1 Wanted Level

But,When i hit it nothing happend

Client side :

  
function bribe () 
createPickup ( 2507.1298828125, -1701.2734375, 14.508857727051, 3, 1247, 25000, 1) 
end 
addEventHandler ( "onResourceStart", getRootElement(), bribe ) 
function pickedUpWantedCheck ( player ) 
    if ( getElementType(source) == "pickup" ) then 
        if getPickupType ( source ) == 3 then 
            if (getElementData ( source, "model" ) == "1247" ) then 
                local level = getPlayerWantedLevel(player) 
                if ( level > 0 ) then 
                    setPlayerWantedLevel ( player, level-1 ) 
                end 
            end 
        end 
    end 
end 
addEventHandler ( "onPickupHit", getRootElement(), pickedUpWantedCheck ) 

Link to comment
  
  
function bribe () 
local bribe = createPickup ( 2507.1298828125, -1701.2734375, 14.508857727051, 3, 1247, 25000, 1) 
end 
addEventHandler ( "onResourceStart", getRootElement(), bribe ) 
function pickedUpWantedCheck ( thePlayer ) 
                local level = getPlayerWantedLevel(thePlayer) 
                if ( level > 0 ) then 
                    setPlayerWantedLevel ( thePlayer, level-1 ) 
                end 
end 
addEventHandler ( "onPickupHit", bribe, pickedUpWantedCheck ) 
  

Link to comment
  
addEventHandler("onPickupHit",createPickup(2507.1298828125,-1701.2734375,14.508857727051,3,1247,25000),function(player) 
    if getPlayerWantedLevel(player)>0 then 
        setPlayerWantedLevel(player,getPlayerWantedLevel(player)-1) 
    end 
end) 
  

Link to comment
  
  
function bribe () 
local bribe = createPickup ( 2507.1298828125, -1701.2734375, 14.508857727051, 3, 1247, 25000, 1) 
end 
addEventHandler ( "onResourceStart", getRootElement(), bribe ) 
function pickedUpWantedCheck ( thePlayer ) 
                local level = getPlayerWantedLevel(thePlayer) 
                if ( level > 0 ) then 
                    setPlayerWantedLevel ( thePlayer, level-1 ) 
                end 
end 
addEventHandler ( "onPickupHit", bribe, pickedUpWantedCheck ) 
  

Thanks

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