local sampev = require("samp.events")
local vkeys = require("vkeys")
carfixnumber = -1
function main()
repeat wait(0) until isSampAvailable()
while true do
wait(0)
if isKeyDown(vkeys.VK_MENU) then
if isKeyJustPressed(vkeys.VK_1) then
carfixnumber = 1
sampSendChat("/cars")
end
if isKeyJustPressed(vkeys.VK_2) then
carfixnumber = 2
sampSendChat("/cars")
end
if isKeyJustPressed(vkeys.VK_3) then
carfixnumber = 3
sampSendChat("/cars")
end
if isKeyJustPressed(vkeys.VK_4) then
carfixnumber = 4
sampSendChat("/cars")
end
if isKeyJustPressed(vkeys.VK_5) then
carfixnumber = 5
sampSendChat("/cars")
end
end
end
end
function sampev.onShowDialog(dialogId, dialogStyle, dialogTitle, okButtonText, cancelButtonText, dialogText)
if carfixnumber ~= -1 then
if dialogId == 162 then
sampSendDialogResponse(162, 1, carfixnumber - 1, -1)
return false
end
if dialogId == 163 then
sampSendDialogResponse(163, 1, 9, -1)
carfixnumber = -1
return false
end
end
end