local keys = {['0x31']=24, ['0x32']=31}
function main()
repeat wait(0) until isSampAvailable()
while true do
wait(0)
if not sampIsCursorActive() then
for k,v in pairs(keys) do
if k == ('0x31') and isKeyJustPressed(k) then
setCurrentCharWeapon(PLAYER_PED,keys['0x31'])
elseif k == ('0x32') and isKeyJustPressed(k) then
setCurrentCharWeapon(PLAYER_PED,keys['0x32'])
end
end
end
end
end