Parazitas Posted January 11, 2016 Share Posted January 11, 2016 Hello guys! I'm a bad scripter and i need edit one thing... Edit this script cuz just criminals can rob the shop. function createRob() Marker = createMarker ( 252.3,-54.6,0.9, "cylinder", 1, 255, 255, 0, 170 ) setElementCollisionsEnabled( Marker, false ) bl = createBlipAttachedTo(Marker,49) outputChatBox( "Liquor store robbery is available. You can rob it in a wine glass blip.", root, 0, 255, 0 ) end addEventHandler("onResourceStart", resourceRoot,createRob) addEventHandler("onMarkerLeave",root, function ( player ) if ( source ~= Marker ) then return end if ( isPedInVehicle( player ) ) then return end destroyElement( Marker ) destroyElement( bl ) randomMoney = math.random ( 5000, 20000 ) randomWanted = math.random ( 1, 6 ) givePlayerMoney(player,randomMoney) setPlayerWantedLevel ( player, randomWanted ) robPlayer = getPlayerName(player) outputChatBox("#ffffff[#00ff00ALARM!#ffffff] #c48027" .. robPlayer .. " #ff0000robbed a liquor store and got: #00ff00" .. tostring(randomMoney) .."$ #ff0000and #00ff00" .. tostring(randomWanted) .. "#ff0000 wanted stars.",root,0,255,0,true) setTimer( createRob, 600000, 1 ) end ) Link to comment
Army@1 Posted January 11, 2016 Share Posted January 11, 2016 function createRob() Marker = createMarker ( 252.3,-54.6,0.9, "cylinder", 1, 255, 255, 0, 170 ) setElementCollisionsEnabled( Marker, false ) bl = createBlipAttachedTo(Marker,49) outputChatBox( "Liquor store robbery is available. You can rob it in a wine glass blip.", root, 0, 255, 0 ) end addEventHandler("onResourceStart", resourceRoot,createRob) addEventHandler("onMarkerLeave",root, function ( player ) if ( source ~= Marker ) then return end if ( isPedInVehicle( player ) ) then return end if ( getTeamName(getPlayerTeam( player )) == "TeamName") then destroyElement( Marker ) destroyElement( bl ) randomMoney = math.random ( 5000, 20000 ) randomWanted = math.random ( 1, 6 ) givePlayerMoney(player,randomMoney) setPlayerWantedLevel ( player, randomWanted ) robPlayer = getPlayerName(player) outputChatBox("#ffffff[#00ff00ALARM!#ffffff] #c48027" .. robPlayer .. " #ff0000robbed a liquor store and got: #00ff00" .. tostring(randomMoney) .."$ #ff0000and #00ff00" .. tostring(randomWanted) .. "#ff0000 wanted stars.",root,0,255,0,true) setTimer( createRob, 600000, 1 ) end end ) Replace 'TeamName' with criminal team name, on line 17. Link to comment
Miika Posted April 2, 2016 Share Posted April 2, 2016 I'm author of this script. I have v3 version of this, comment if you need it. It have moving doors that closes for 20 seconds when you rob it + criminals only. Link to comment
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