bartje01 Posted November 9, 2010 Posted November 9, 2010 Hey. How to make a money drop script? Can anyone explain or give me the wiki page? I can't findit.
Castillo Posted November 9, 2010 Posted November 9, 2010 function createMoney(player) local x, y, z = getElementPosition(player) local x1, y1, x2, y2 x1 = (x-2)+(math.random()*4) y1 = (y-2)+(math.random()*4) x2 = (x-2)+(math.random()*4) y2 = (y-2)+(math.random()*4) local moneyAmmount = getPlayerMoney(player) takePlayerMoney(player, moneyAmmount) setElementData(createPickup(x1, y1, z, 3, 1212), "ammount", moneyAmmount) setElementData(createPickup(x2, y2, z, 3, 1212), "ammount", moneyAmmount) end function moneyPickupHit(player) local money = getElementData(source, "ammount") if money then givePlayerMoney(player, money) destroyElement(source) end end function playerDied(ammo, attacker, weapon, bodypart) if (isElement(attacker)) then createMoney(source) end end addEventHandler("onPickupUse", getRootElement(), moneyPickupHit) addEventHandler("onPlayerWasted", getRootElement(), playerDied) try this. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
bartje01 Posted November 9, 2010 Author Posted November 9, 2010 NIICEEE IT works perfectly. Thankyou so much. Now one last question for today Can somebody give me a little tutorial wiki example or anything else about making a safe zone? It is so important for me at the moment. Thanks in advace.
Castillo Posted November 9, 2010 Posted November 9, 2010 you need to create a col shape (is the most efficient) then use onColShapeHit functions: createRadarArea -->> https://wiki.multitheftauto.com/wiki/CreateRadarArea createColRectangle -->> https://wiki.multitheftauto.com/wiki/CreateColRectangle toggleControl -->> https://wiki.multitheftauto.com/wiki/ToggleControl events: onColShapeHit -->> https://wiki.multitheftauto.com/wiki/OnColShapeHit onColShapeLeave -->> https://wiki.multitheftauto.com/wiki/OnColShapeLeave San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
dzek (varez) Posted November 9, 2010 Posted November 9, 2010 btw: there was some default mta resource with money drop, isn't it? Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online! programista php rzeszów Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting. Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!
Castillo Posted November 9, 2010 Posted November 9, 2010 no varez. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
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