diff --git a/drugs-mats.lua b/drugs-mats.lua index ef50906..2adff53 100755 --- a/drugs-mats.lua +++ b/drugs-mats.lua @@ -73,18 +73,10 @@ function main() end if isKeyJustPressed(vkeys[ini.global.key]) and not sampIsDialogActive() and not sampIsChatInputActive() and not sampIsCursorActive() then - local text = string.format("math.ceil(((%d + 1) - %d) / %d)", ini[inikeys].hp, getCharHealth(playerPed), ini[inikeys].hp_one_gram) - sampAddChatMessage(text,-1) local gramm = math.ceil(((ini[inikeys].hp + 1) - getCharHealth(playerPed)) / ini[inikeys].hp_one_gram) - local text = string.format("if %s > %s then %s = %s end", gramm, ini[inikeys].max_use_gram, gramm, ini[inikeys].max_use_gram) - sampAddChatMessage(text,-1) if gramm > ini[inikeys].max_use_gram then gramm = ini[inikeys].max_use_gram end - local text = string.format("if %s <= %s and %s > 0 then gramm = 1 end", second_timer, math.floor(ini[inikeys].seconds * bonus_drugs), gramm, second_timer) - sampAddChatMessage(text,-1) if second_timer <= math.floor(ini[inikeys].seconds * bonus_drugs) and second_timer > 0 then gramm = 1 end sampSendChat(string.format('/%s %d', ini[inikeys].server_cmd, gramm)) - sampAddChatMessage(gramm,-1) - end if pos then