COOKIE2 Posted April 22, 2010 Share Posted April 22, 2010 (edited) hey i found a script that allows you to buy nitro and repair with /buy nitro /buy repair command and i made a gui with 2 buttons 1 repair 2 nitro how do i set that if i click 1 that i buy a repair? price = {} price.nitro = 5000 price.repair = 5000 addCommandHandler("buy", function (player, command, item) if item == "nitro" then if getPlayerMoney(player) > price.nitro then local vehicle = getPedOccupiedVehicle(player) if vehicle then addVehicleUpgrade(vehicle, 1010) takePlayerMoney(player, price.nitro) outputChatBox("You've bought a nitro", player, 0, 222, 0, true) else outputChatBox("You are not in a vehicle", player, 222, 0, 0, true) end else outputChatBox("Not enough cash, nitro costs $"..price.nitro, player, 222, 0, 0, true) end elseif item == "repair" then if getPlayerMoney(player) > price.repair then local vehicle = getPedOccupiedVehicle(player) if vehicle then fixVehicle(vehicle) takePlayerMoney(player, price.repair) outputChatBox("You've bought a repair", player, 0, 222, 0, true) else outputChatBox("You are not in a vehicle", player, 222, 0, 0, true) end else outputChatBox("Not enough cash, repair costs $"..price.repair, player, 222, 0, 0, true) end end end ) Edited April 24, 2010 by Guest Link to comment
Xierra Posted April 23, 2010 Share Posted April 23, 2010 I think you could give us the code first? It needs variables. Link to comment
50p Posted April 23, 2010 Share Posted April 23, 2010 anyone? No, until you learn to use [lua][/lua] tags. Link to comment
raulrobi Posted April 24, 2010 Share Posted April 24, 2010 THIS ISNT YOUR OWN CODE.U STEAHLED FROM XBOST BY MY TOPIC https://forum.multitheftauto.com/viewtop ... 91&t=27378 Link to comment
Taalasmaa Posted April 24, 2010 Share Posted April 24, 2010 THIS ISNT YOUR OWN CODE.U STEAHLED FROM XBOST BY MY TOPIChttps://forum.multitheftauto.com/viewtop ... 91&t=27378 Yes, COOKIE12 IS LIAR, STEALER, FAKE /voteban COOKIE12 Link to comment
karlis Posted April 24, 2010 Share Posted April 24, 2010 (edited) he are allowed to copy them, BUT THATS SPAM to make topic about contents of other topic /voteban COOKIE2 Edited April 24, 2010 by Guest Link to comment
dzek (varez) Posted April 24, 2010 Share Posted April 24, 2010 @karlis, @Taalasmaa and others his nickname is COOKIE2, not COOKIE12 or COOKIE Link to comment
COOKIE2 Posted April 24, 2010 Author Share Posted April 24, 2010 dude its not stealing.... u made it public and its not even yours so Link to comment
COOKIE2 Posted April 24, 2010 Author Share Posted April 24, 2010 please stay on topic i want help with this Link to comment
karlis Posted April 24, 2010 Share Posted April 24, 2010 then act like one who want help, AND NO NEED FOR HELP TOPIC WITCH IS MADE FROM CONTENTS OF ANOTHER HELP TOPIC Link to comment
COOKIE2 Posted April 24, 2010 Author Share Posted April 24, 2010 can someone just please help me Link to comment
Taalasmaa Posted April 24, 2010 Share Posted April 24, 2010 can someone just please help me Nope, anyone wont help you anymore, after what have you done. Link to comment
DakiLLa Posted April 24, 2010 Share Posted April 24, 2010 I guess this topic is gonna be closed soon, same as the previos topics made by Cookie Link to comment
Gamesnert Posted April 24, 2010 Share Posted April 24, 2010 I guess this topic is gonna be closed soon I guess so too, because I'm about to press the button. COOKIE2: Please post any problems you have with a script in the right topic if it already exists. (here) Also, use [ lua][/lua] tags for your code, it's not a surprise nobody is taking the effort of helping you. Link to comment
Recommended Posts