RetoRetajix Posted June 18, 2011 Share Posted June 18, 2011 Can someone help me and write a simple house robbing mod? something like this: if players skin is 28 or 29, there are red house blips on screen where will be marker, when player steps on it gets random money from 300 to 1200 and also gets wanted star, and pls dont forget to put if player has 6 stars, do not add any more start. Link to comment
CowTurbo Posted June 18, 2011 Share Posted June 18, 2011 Usuly, we are not making requests, but, i made you reeaaallyy start beta, so you have to go on with it by your own, i added much things what you didnt wanted, such as money give 200 - 600, so you have to find it and edit it by you own, and some parts i wasnt added, such as if skin is 28 .. I wasnt added them because you can learn then, by editing this script. I hope you can finish with it, good luck -- CLIENT -- --[[ ::..* Robbing System * ::.. ]] local robingMarkers = {} local robingStartMarkers = {} local robbingBlips = {} robingStartMarkers[1] = createMarker(0,0,3, 'cylinder',1.5, 200,200,200,150 ) function onConnectAndStart () setElementData ( getLocalPlayer(), "Robbing", false ) end addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), onConnectAndStart ) function startMarkerHit (hitPlayer, matchingDim) for index,markers in pairs(robingStartMarkers) do if (source == markers) then if not ( getPedOccupiedVehicle ( getLocalPlayer() )) then startRobbing () else outputChatBox ( "* ERROR: Please come out from your vehicle to start robbing!", 255,0,0 ) end end end end addEventHandler ( "onClientMarkerHit", getRootElement(), startMarkerHit ) function startRobbing () if not ( getElementData ( getLocalPlayer(), "Robbing" )) == true then robingMarkers[1] = createMarker(2,0,3, 'cylinder',1.5, 200,200,200,150 ) robingMarkers[2] = createMarker(4,0,3, 'cylinder',1.5, 200,200,200,150 ) robingMarkers[3] = createMarker(6,0,3, 'cylinder',1.5, 200,200,200,150 ) -- create here markers where have to be robing markers robbingBlips[1] = createBlip (2, 0, 3, 32, 2 ) robbingBlips[2] = createBlip (4, 0, 3, 32, 2 ) robbingBlips[3] = createBlip (6, 0, 3, 32, 2 ) -- create here robbing Blips addEventHandler ( "onClientMarkerHit", getRootElement(), robMarkerHit ) else outputChatBox ( "* ERROR: You already robbing!", 255,0,0 ) end end function robMarkerHit (hitPlayer, matchingDim) for index,markers in pairs(robingMarkers) do if (source == markers) then if not ( getPedOccupiedVehicle ( getLocalPlayer() )) then triggerServerEvent ( "addStar", getLocalPlayer()) triggerServerEvent ( "addMoney", getLocalPlayer()) else outputChatBox ( "* ERROR: Please come out from your vehicle to start robbing!", 255,0,0 ) end end end end addEventHandler ( "onClientMarkerHit", getRootElement(), robMarkerHit ) function stopRobbing (commandName) for i,v in pairs ( robingMarkers ) do destroyElement ( v ) end for i,v in pairs ( robbingBlips ) do destroyElement ( v ) end end -- server -- function addStar ( ) local wanted = getPlayerWantedLevel ( source ) if not ( wanted == 6 ) then setPlayerWantedLevel ( source, wanted+1 ) end end addEvent ( "addStar", true ) addEventHandler ( "addStar", getRootElement(), addStar ) function addMoney ( ) local money = math.random(200,600) givePlayerMoney ( source, math.random(200,600) outputChatBox ( "* INFO: Well done, you robbed house and earned "..money.."$ ! Go on with robbing and earn money!", source, 0,255,0 ) end end addEvent ( "addMoney", true ) addEventHandler ( "addMoney", getRootElement(), addMoney ) Link to comment
will briggs Posted June 18, 2011 Share Posted June 18, 2011 Yeah RetorRetajix This isnt' a request forum, and most members dont give out there code, but as Cow Turbo is nice and generous he has helped you... You need to make things yourself or give examples to be corrected... Learn LUA Here : http://www.wiki.multitheftauto.com Thanks Link to comment
RetoRetajix Posted June 18, 2011 Author Share Posted June 18, 2011 thank you alll very very much Link to comment
Resmurf Posted June 18, 2011 Share Posted June 18, 2011 Turbo should put release this on community, Leechers coming ... Link to comment
will briggs Posted June 18, 2011 Share Posted June 18, 2011 Ohh btw, melrpm, put SAUR Moderator not Utopia RPG. SAUR = San Andreas Utopia Rpg 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