Jump to content

[HELP] Liquor store and limonade storage robbery


ville

Recommended Posts

Hello, i started making liquor and limonade storage robbery. Limonade storage works fine but then i cant rob liquor store? Can someone help me, im new in scripting..

function createRob() 
    Marker = createMarker ( 1324.40,286.06,20, "cylinder", 1, 173, 255, 47, 170 ) 
    setElementCollisionsEnabled( Marker, false ) 
    bl = createBlipAttachedTo(Marker,56) 
    outputChatBox( "Limonade storage robbary available!. Rob it from yellow dot blip.", root, 0, 255, 0 ) 
end 
addEventHandler("onResourceStart", resourceRoot,createRob) 
  
function createRob2() 
    Marker = createMarker ( 1359.57,205.12,19, "cylinder", 1, 173, 255, 47, 170 ) 
    setElementCollisionsEnabled( Marker, false ) 
    bl = createBlipAttachedTo(Marker,49) 
    outputChatBox( "Liquor store available!. Rob it from drink blip.", root, 0, 255, 0 ) 
end 
addEventHandler("onResourceStart", resourceRoot,createRob2) 
  
addEventHandler("onMarkerLeave",root, 
function ( player ) 
    if ( source ~= Marker ) then 
        return 
    end 
    if ( isPedInVehicle( player ) ) then 
        return 
    end 
    local playerTeam = getPlayerTeam(player) 
    if ( getTeamName(playerTeam) == "Criminal" ) then 
     
        destroyElement( Marker ) 
        destroyElement( bl ) 
        randomMoney = math.random ( 5000, 15000 ) 
        randomWanted = math.random ( 5, 6 ) 
        givePlayerMoney(player,randomMoney) 
        setPlayerWantedLevel ( player, randomWanted ) 
        robPlayer = getPlayerName(player) 
        outputChatBox("#ffffff[#00ff00ALARM!#ffffff] #c48027" .. robPlayer .. " #ff0000robbed liquor store/limonade store, and earned #00ff00" .. tostring(randomMoney) .."$ #ff0000and #00ff00" .. tostring(randomWanted) .. "#ff0000 starts.",root,0,255,0,true) 
        setTimer( createRob, 600000, 1 ) 
    else 
        outputChatBox("#ffffff[#00ff00PROTIP#ffffff] #ff0000You need to be criminal!",player,0,255,0,true) 
    end 
end 
) 

Link to comment
  • 1 year later...

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