local imgui = require 'mimgui'
local samp = require 'samp.events'
local sampev = require("lib.samp.events")
require "lib.moonloader"
local sw, sh = 355, 425
local active = imgui.new.bool(false)
local checkbox = imgui.new.bool(false)
local ffi = require "ffi"
local buf = imgui.new.char[24]()
function main()
wait(1000)
sampRegisterChatCommand("sfsi", function() active[0] = not active[0] end)
sampAddChatMessage("{ff0078}[SFSI Helper]{ffffff} Loaded. Made by {ff0078}21Cristi", 0xff0078)
sampAddChatMessage("{ff0078}[SFSI Helper]{ffffff} Scrie {ff0078}/sfsi{ffffff} pentru a deschide meniul interactiv.", 0xff0078)
while true do
wait(0)
end
end
imgui.OnInitialize(function()
imgui.GetIO().IniFilename = nil
imgui.StyleColorsDark()
end)
local mainFrame = imgui.OnFrame(function() return active[0] end, function(self)
local sw, sh = getScreenResolution()
imgui.SetNextWindowSize(imgui.ImVec2(sw / 5.4, sh / 2.5), imgui.Cond.FirstUseEver)
imgui.SetNextWindowPos(imgui.ImVec2(sw / 1.6, sh / 2), imgui.Cond.FirstUseEver, imgui.ImVec2(-0.3, 0.5))
imgui.Begin('SFSI Helper', active)
if imgui.BeginTabBar('Tabs') then
if imgui.BeginTabItem('Flying') then
imgui.Text('ID-ul clientului (conectat pe server):')
imgui.InputText("ID", buf, ffi.sizeof(buf), imgui.InputTextFlags.CharsDecimal)
imgui.Text('Intrebi pe /sx daca clientul a fost acceptat de altcineva')
imgui.SetCursorPos(imgui.ImVec2(10, 115))
if imgui.Button("Intreaba", imgui.ImVec2(80, 20)) then
if ffi.string(buf) ~= "" then
sampSendChat(string.format("/sx L-a acceptat cineva pe %s (%s) ?", sampGetPlayerNickname(ffi.string(buf)), ffi.string(buf)))
end
end
imgui.Text('Anunta pe /f ca ai preluat un client')
imgui.SetCursorPos(imgui.ImVec2(10, 160))
if imgui.Button("Anunta", imgui.ImVec2(80, 20)) then
if ffi.string(buf) ~= "" then
sampSendChat(string.format("/f %s (%s) la mine pentru licenta de Flying.", sampGetPlayerNickname(ffi.string(buf)), ffi.string(buf)))
end
end
imgui.Text('Incepe lectia cu clientul')
imgui.SetCursorPos(imgui.ImVec2(10, 205))
if imgui.Button("Startlesson", imgui.ImVec2(80, 20)) then
if ffi.string(buf) ~= "" then
sampSendChat(string.format("/startlesson %s flying", sampGetPlayerNickname(ffi.string(buf))))
end
end
imgui.Text('Instructiunile pentru test')
imgui.SetCursorPos(imgui.ImVec2(10, 250))
if imgui.Button("Instructiuni", imgui.ImVec2(80, 20)) then
if ffi.string(buf) ~= "" then
sampSendChat("Condu Maverick-ul pe orice aeroport doresti, apoi aterizezi.")
sampSendChat("Odata ajuns, reia zborul si intoarce-te de unde am plecat.")
sampSendChat("Daca Maverick-ul atinge sub 950.0HP, esti picat. Poti verifica cu /dl HP-ul.")
end
end
imgui.Text('Acorda licenta clientului (in caz ca a trecut testul)')
imgui.SetCursorPos(imgui.ImVec2(10, 295))
if imgui.Button("Acorda", imgui.ImVec2(80, 20)) then
if ffi.string(buf) ~= "" then
sampSendChat("/say Felicitari, ai trecut testul pentru licenta de Flying.")
sampSendChat(string.format("/givelicense %s flying", sampGetPlayerNickname(ffi.string(buf))))
end
end
imgui.Text('Anunti clientul ca a picat testul de licenta')
imgui.SetCursorPos(imgui.ImVec2(10, 340))
if imgui.Button("Picat", imgui.ImVec2(80, 20)) then
if ffi.string(buf) ~= "" then
sampSendChat("Din pacate, ai picat testul pentru licenta de Flying.")
end
end
imgui.Text('Opreste lectia cu clientul')
imgui.SetCursorPos(imgui.ImVec2(10, 385))
if imgui.Button("Stoplesson", imgui.ImVec2(80, 20)) then
if ffi.string(buf) ~= "" then
sampSendChat("/stoplesson "..ffi.string(buf))
end
end
imgui.EndTabItem()
end
if imgui.BeginTabItem('Sailing') then
imgui.Text('ID-ul clientului (conectat pe server):')
imgui.InputText("ID", buf, ffi.sizeof(buf), imgui.InputTextFlags.CharsDecimal)
imgui.Text('Intrebi pe /sx daca clientul a fost acceptat de altcineva')
imgui.SetCursorPos(imgui.ImVec2(10, 115))
if imgui.Button("Intreaba", imgui.ImVec2(80, 20)) then
if ffi.string(buf) ~= "" then
sampSendChat(string.format("/sx L-a acceptat cineva pe %s (%s) ?", sampGetPlayerNickname(ffi.string(buf)), ffi.string(buf)))
end
end
imgui.Text('Anunta pe /f ca ai preluat un client')
imgui.SetCursorPos(imgui.ImVec2(10, 160))
if imgui.Button("Anunta", imgui.ImVec2(80, 20)) then
if ffi.string(buf) ~= "" then
sampSendChat(string.format("/f %s (%s) la mine pentru licenta de sailing.", sampGetPlayerNickname(ffi.string(buf)), ffi.string(buf)))
end
end
imgui.Text('Incepe lectia cu clientul')
imgui.SetCursorPos(imgui.ImVec2(10, 205))
if imgui.Button("Startlesson", imgui.ImVec2(80, 20)) then
if ffi.string(buf) ~= "" then
sampSendChat(string.format("/startlesson %s sailing", sampGetPlayerNickname(ffi.string(buf))))
end
end
imgui.Text('Ghidarile pentru test')
imgui.SetCursorPos(imgui.ImVec2(10, 250))
if imgui.Button("Sail LS", imgui.ImVec2(80, 20)) then
if ffi.string(buf) ~= "" then
sampSendChat("Condu barca pana la farul de pe plaja. Odata ajuns, te intorci inapoi.")
sampSendChat("Daca barca atinge sub 950.0 HP, esti picat. Poti verifica HP-ul cu comanda /dl")
end
end
imgui.SetCursorPos(imgui.ImVec2(95, 250))
if imgui.Button("Sail LV", imgui.ImVec2(80, 20)) then
if ffi.string(buf) ~= "" then
sampSendChat("Condu barca pana la fosta baza NG (vaporul de langa Aero SF). Odata ajuns, te intorci inapoi.")
sampSendChat("Daca barca atinge sub 950.0 HP, esti picat. Poti verifica HP-ul cu comanda /dl")
end
end
imgui.SetCursorPos(imgui.ImVec2(180, 250))
if imgui.Button("Sail SF", imgui.ImVec2(80, 20)) then
if ffi.string(buf) ~= "" then
sampSendChat("Condu barca pana la docurile din Bayside. Odata ajuns, te intorci inapoi.")
sampSendChat("Daca barca atinge sub 950.0 HP, esti picat. Poti verifica HP-ul cu comanda /dl")
end
end
imgui.Text('Acorda licenta clientului (in caz ca a trecut testul)')
imgui.SetCursorPos(imgui.ImVec2(10, 295))
if imgui.Button("Acorda", imgui.ImVec2(80, 20)) then
if ffi.string(buf) ~= "" then
sampSendChat("/say Felicitari, ai trecut testul pentru licenta de Sailing.")
sampSendChat(string.format("/givelicense %s sailing", sampGetPlayerNickname(ffi.string(buf))))
end
end
imgui.Text('Anunti clientul ca a picat testul de licenta')
imgui.SetCursorPos(imgui.ImVec2(10, 340))
if imgui.Button("Picat", imgui.ImVec2(80, 20)) then
if ffi.string(buf) ~= "" then
sampSendChat("Din pacate, ai picat testul pentru licenta de Sailing.")
end
end
imgui.Text('Opreste lectia cu clientul')
imgui.SetCursorPos(imgui.ImVec2(10, 385))
if imgui.Button("Stoplesson", imgui.ImVec2(80, 20)) then
if ffi.string(buf) ~= "" then
sampSendChat("/stoplesson "..ffi.string(buf))
end
end
imgui.EndTabItem()
end
if imgui.BeginTabItem('Fishing') then
imgui.Text('ID-ul clientului (conectat pe server):')
imgui.InputText("ID", buf, ffi.sizeof(buf), imgui.InputTextFlags.CharsDecimal)
imgui.Text('Intrebi pe /sx daca clientul a fost acceptat de altcineva')
imgui.SetCursorPos(imgui.ImVec2(10, 115))
if imgui.Button("Intreaba", imgui.ImVec2(80, 20)) then
if ffi.string(buf) ~= "" then
sampSendChat(string.format("/sx L-a acceptat cineva pe %s (%s) ?", sampGetPlayerNickname(ffi.string(buf)), ffi.string(buf)))
end
end
imgui.Text('Anunta pe /f ca ai preluat un client')
imgui.SetCursorPos(imgui.ImVec2(10, 160))
if imgui.Button("Anunta", imgui.ImVec2(80, 20)) then
if ffi.string(buf) ~= "" then
sampSendChat(string.format("/f %s (%s) la mine pentru licenta de Fishing.", sampGetPlayerNickname(ffi.string(buf)), ffi.string(buf)))
end
end
imgui.Text('Incepe lectia cu clientul')
imgui.SetCursorPos(imgui.ImVec2(10, 205))
if imgui.Button("Startlesson", imgui.ImVec2(80, 20)) then
if ffi.string(buf) ~= "" then
sampSendChat(string.format("/startlesson %s fishing", sampGetPlayerNickname(ffi.string(buf))))
end
end
imgui.Text('Setul de intrebari pentru test')
imgui.SetCursorPos(imgui.ImVec2(10, 250))
if imgui.Button("Intrebarea 1", imgui.ImVec2(80, 20)) then
if ffi.string(buf) ~= "" then
sampSendChat("/cw Cu ce comanda pescuiesti?")
end
end
imgui.SetCursorPos(imgui.ImVec2(95, 250))
if imgui.Button("Intrebarea 2", imgui.ImVec2(80, 20)) then
if ffi.string(buf) ~= "" then
sampSendChat("/cw Unde pescuiesti?")
end
end
imgui.SetCursorPos(imgui.ImVec2(180, 250))
if imgui.Button("Intrebarea 3", imgui.ImVec2(80, 20)) then
if ffi.string(buf) ~= "" then
sampSendChat("/cw Unde duci pestele prins?")
end
end
imgui.SetCursorPos(imgui.ImVec2(265, 250))
if imgui.Button("Intrebarea 4", imgui.ImVec2(80, 20)) then
if ffi.string(buf) ~= "" then
sampSendChat("/cw Ce primesti daca pescuiesti fara licenta?")
end
end
imgui.Text('Acorda licenta clientului (in caz ca a trecut testul)')
imgui.SetCursorPos(imgui.ImVec2(10, 295))
if imgui.Button("Acorda", imgui.ImVec2(80, 20)) then
if ffi.string(buf) ~= "" then
sampSendChat("/say Felicitari, ai trecut testul pentru licenta de Fishing.")
sampSendChat(string.format("/givelicense %s fishing", sampGetPlayerNickname(ffi.string(buf))))
end
end
imgui.Text('Anunti clientul ca a picat testul de licenta')
imgui.SetCursorPos(imgui.ImVec2(10, 340))
if imgui.Button("Picat", imgui.ImVec2(80, 20)) then
if ffi.string(buf) ~= "" then
sampSendChat("Din pacate, ai picat testul pentru licenta de Fishing.")
end
end
imgui.Text('Opreste lectia cu clientul')
imgui.SetCursorPos(imgui.ImVec2(10, 385))
if imgui.Button("Stoplesson", imgui.ImVec2(80, 20)) then
if ffi.string(buf) ~= "" then
sampSendChat("/stoplesson "..ffi.string(buf))
end
end
imgui.EndTabItem()
end
if imgui.BeginTabItem('Weapon') then
imgui.Text('ID-ul clientului (conectat pe server):')
imgui.InputText("ID", buf, ffi.sizeof(buf), imgui.InputTextFlags.CharsDecimal)
imgui.Text('Intrebi pe /sx daca clientul a fost acceptat de altcineva')
imgui.SetCursorPos(imgui.ImVec2(10, 115))
if imgui.Button("Intreaba", imgui.ImVec2(80, 20)) then
if ffi.string(buf) ~= "" then
sampSendChat(string.format("/sx L-a acceptat cineva pe %s (%s) ?", sampGetPlayerNickname(ffi.string(buf)), ffi.string(buf)))
end
end
imgui.Text('Anunta pe /f ca ai preluat un client')
imgui.SetCursorPos(imgui.ImVec2(10, 160))
if imgui.Button("Anunta", imgui.ImVec2(80, 20)) then
if ffi.string(buf) ~= "" then
sampSendChat(string.format("/f %s (%s) la mine pentru licenta de Weapon.", sampGetPlayerNickname(ffi.string(buf)), ffi.string(buf)))
end
end
imgui.Text('Incepe lectia cu clientul')
imgui.SetCursorPos(imgui.ImVec2(10, 205))
if imgui.Button("Startlesson", imgui.ImVec2(80, 20)) then
if ffi.string(buf) ~= "" then
sampSendChat(string.format("/startlesson %s weapon", sampGetPlayerNickname(ffi.string(buf))))
end
end
imgui.Text('Setul de intrebari pentru test')
imgui.SetCursorPos(imgui.ImVec2(10, 250))
if imgui.Button("Intrebarea 1", imgui.ImVec2(80, 20)) then
if ffi.string(buf) ~= "" then
sampSendChat("/cw Enumera-mi 10 arme ilegale cu foc din GTA San Andreas.")
end
end
imgui.SetCursorPos(imgui.ImVec2(95, 250))
if imgui.Button("Intrebarea 2", imgui.ImVec2(80, 20)) then
if ffi.string(buf) ~= "" then
sampSendChat("/cw Enumera-mi 8 safezone-uri.")
end
end
imgui.SetCursorPos(imgui.ImVec2(180, 250))
if imgui.Button("Intrebarea 3", imgui.ImVec2(80, 20)) then
if ffi.string(buf) ~= "" then
sampSendChat("/cw Ce este interzis sa faci in aceste zone?")
end
end
imgui.SetCursorPos(imgui.ImVec2(265, 250))
if imgui.Button("Intrebarea 4", imgui.ImVec2(80, 20)) then
if ffi.string(buf) ~= "" then
sampSendChat("/cw Cu ce comanda pescuiesti?")
end
end
imgui.Text('Acorda licenta clientului (in caz ca a trecut testul)')
imgui.SetCursorPos(imgui.ImVec2(10, 295))
if imgui.Button("Acorda", imgui.ImVec2(80, 20)) then
if ffi.string(buf) ~= "" then
sampSendChat("/say Felicitari, ai trecut testul pentru licenta de Weapon.")
sampSendChat(string.format("/givelicense %s weapon", sampGetPlayerNickname(ffi.string(buf))))
end
end
imgui.Text('Anunti clientul ca a picat testul de licenta')
imgui.SetCursorPos(imgui.ImVec2(10, 340))
if imgui.Button("Picat", imgui.ImVec2(80, 20)) then
if ffi.string(buf) ~= "" then
sampSendChat("Din pacate, ai picat testul pentru licenta de Weapon.")
end
end
imgui.Text('Opreste lectia cu clientul')
imgui.SetCursorPos(imgui.ImVec2(10, 385))
if imgui.Button("Stoplesson", imgui.ImVec2(80, 20)) then
if ffi.string(buf) ~= "" then
sampSendChat("/stoplesson "..ffi.string(buf))
end
end
imgui.EndTabItem()
end
if imgui.BeginTabItem('Materials') then
imgui.Text('ID-ul clientului (conectat pe server):')
imgui.InputText("ID", buf, ffi.sizeof(buf), imgui.InputTextFlags.CharsDecimal)
imgui.Text('Intrebi pe /sx daca clientul a fost acceptat de altcineva')
imgui.SetCursorPos(imgui.ImVec2(10, 115))
if imgui.Button("Intreaba", imgui.ImVec2(80, 20)) then
if ffi.string(buf) ~= "" then
sampSendChat(string.format("/sx L-a acceptat cineva pe %s (%s) ?", sampGetPlayerNickname(ffi.string(buf)), ffi.string(buf)))
end
end
imgui.Text('Anunta pe /f ca ai preluat un client')
imgui.SetCursorPos(imgui.ImVec2(10, 160))
if imgui.Button("Anunta", imgui.ImVec2(80, 20)) then
if ffi.string(buf) ~= "" then
sampSendChat(string.format("/f %s (%s) la mine pentru licenta de Materials.", sampGetPlayerNickname(ffi.string(buf)), ffi.string(buf)))
end
end
imgui.Text('Incepe lectia cu clientul')
imgui.SetCursorPos(imgui.ImVec2(10, 205))
if imgui.Button("Startlesson", imgui.ImVec2(80, 20)) then
if ffi.string(buf) ~= "" then
sampSendChat(string.format("/startlesson %s materials", sampGetPlayerNickname(ffi.string(buf))))
end
end
imgui.Text('Setul de intrebari pentru test')
imgui.SetCursorPos(imgui.ImVec2(10, 250))
if imgui.Button("Intrebarea 1", imgui.ImVec2(80, 20)) then
if ffi.string(buf) ~= "" then
sampSendChat("/cw Cu ce comanda cumperi materiale?")
end
end
imgui.SetCursorPos(imgui.ImVec2(95, 250))
if imgui.Button("Intrebarea 2", imgui.ImVec2(80, 20)) then
if ffi.string(buf) ~= "" then
sampSendChat("/cw Unde nu ai voie sa vinzi arme?")
end
end
imgui.SetCursorPos(imgui.ImVec2(180, 250))
if imgui.Button("Intrebarea 3", imgui.ImVec2(80, 20)) then
if ffi.string(buf) ~= "" then
sampSendChat("/cw Enumera-mi 5 safezone-uri.")
end
end
imgui.SetCursorPos(imgui.ImVec2(265, 250))
if imgui.Button("Intrebarea 4", imgui.ImVec2(80, 20)) then
if ffi.string(buf) ~= "" then
sampSendChat("/cw Cu ce comanda vinzi o arma?")
end
end
imgui.Text('Acorda licenta clientului (in caz ca a trecut testul)')
imgui.SetCursorPos(imgui.ImVec2(10, 295))
if imgui.Button("Acorda", imgui.ImVec2(80, 20)) then
if ffi.string(buf) ~= "" then
sampSendChat("/say Felicitari, ai trecut testul pentru licenta de Materials.")
sampSendChat(string.format("/givelicense %s materials", sampGetPlayerNickname(ffi.string(buf))))
end
end
imgui.Text('Anunti clientul ca a picat testul de licenta')
imgui.SetCursorPos(imgui.ImVec2(10, 340))
if imgui.Button("Picat", imgui.ImVec2(80, 20)) then
if ffi.string(buf) ~= "" then
sampSendChat("Din pacate, ai picat testul pentru licenta de Materials.")
end
end
imgui.Text('Opreste lectia cu clientul')
imgui.SetCursorPos(imgui.ImVec2(10, 385))
if imgui.Button("Stoplesson", imgui.ImVec2(80, 20)) then
if ffi.string(buf) ~= "" then
sampSendChat("/stoplesson "..ffi.string(buf))
end
end
imgui.EndTabItem()
end
imgui.EndTabBar()
end
imgui.End()
end)