Jump to content

gui???


COOKIE2

Recommended Posts

Posted (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 by Guest
Posted
THIS ISNT YOUR OWN CODE.U STEAHLED FROM XBOST BY MY TOPIC

https://forum.multitheftauto.com/viewtop ... 91&t=27378

Yes, COOKIE12 IS LIAR, STEALER, FAKE

/voteban COOKIE12

http://www.sincitygaming.net - The next generation of gaming!

SinCity Gaming | UltiRace 24/7 - 188.165.199.162:22003

SinCity Gaming | Roleplay Gaming - Beta soon!

SinCity Gaming | Zombie Mode + - 188.165.199.162:22005

Instead of using ip: 188.165.199.162 you can use: sincitygaming.net

Posted

@karlis, @Taalasmaa and others

his nickname is COOKIE2, not COOKIE12 or COOKIE :P

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)!

Posted
can someone just please help me :shock:

Nope, anyone wont help you anymore, after what have you done.

http://www.sincitygaming.net - The next generation of gaming!

SinCity Gaming | UltiRace 24/7 - 188.165.199.162:22003

SinCity Gaming | Roleplay Gaming - Beta soon!

SinCity Gaming | Zombie Mode + - 188.165.199.162:22005

Instead of using ip: 188.165.199.162 you can use: sincitygaming.net

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

Projects:

Slothbot | Maximap

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...