๐Ÿ“–Integrations-ESX

Resource Integrations guide with other resources.

Client Side:

Unlocked File Path:

PATH : fs_fraud/client/unlocked.lua

This file contain all functions you can edit like


function notification(title, msg, type, icon)
 
  --  exports['okokNotify']:Alert(title, msg, 5000, 'success')
    
      lib.notify({
         title = title,
         description = msg,
         type = type,
         duration = 5000,
         position = 'center-right',
         icon = icon
      })
    
end
 
function Draw3DText(x, y, z, text)
    SetTextScale(0.35, 0.35)
    SetTextFont(4)
    SetTextProportional(1)
    SetTextColour(255, 255, 255, 215)
    SetTextEntry("STRING")
    SetTextCentre(true)
    AddTextComponentString(text)
    SetDrawOrigin(x, y, z, 0)
    DrawText(0.0, 0.0)
    local factor = (string.len(text)) / 370
    DrawRect(0.0, 0.0 + 0.0125, 0.017 + factor, 0.03, 0, 0, 0, 75) --comment this out to remove background on 3dtext
    ClearDrawOrigin()
end

function LoadAnimDict(dict)
    if not HasAnimDictLoaded(dict) then
        RequestAnimDict(dict)

        while not HasAnimDictLoaded(dict) do
            Citizen.Wait(1)
        end
    end
end

 
function DrawHudText2(text,colour,coordsx,coordsy,scalex,scaley)
	SetTextFont(7)
	SetTextProportional(7)
	SetTextScale(scalex, scaley)
	local colourr,colourg,colourb,coloura = table.unpack(colour)
	SetTextColour(colourr,colourg,colourb, coloura)
	SetTextDropshadow(0, 0, 0, 0, coloura)
	SetTextEdge(1, 0, 0, 0, coloura)
	SetTextDropShadow()
	SetTextJustification(0)
	SetTextOutline()
	SetTextEntry("STRING")
	AddTextComponentString(text)
	EndTextCommandDisplayText(coordsx,coordsy)
end
 

Server Side:

Unlocked File Path:

PATH : fs_fraud/server/unlocked.lua

This file contain all functions you can edit like

RegisterNetEvent('fs_fwb_fraud:removefuelcan')
AddEventHandler('fs_fwb_fraud:removefuelcan',function ()
    local xPlayer = ESX.GetPlayerFromId(source)
    if xPlayer then
        xPlayer.removeInventoryItem("WEAPON_PETROLCAN", 1)  --comment this if ur inventory don't support weapon as item
    --    xPlayer.removeWeapon("WEAPON_PETROLCAN")              --uncomment this if ur inventory don't support weapon as item
    end
end)

--you can add custom alert here according to ur need but we don't provide support for it because we alrady provide defult function for it
RegisterNetEvent('fs_fraudalerts:alert', function(alerttype, coords)
	local xPlayers = ESX.GetExtendedPlayers("job", "police")
    for key, xPlayer in pairs(xPlayers) do 
            TriggerClientEvent('fs_fraud:setblip', xPlayer.source, coords, alerttype)
    end
end)

RegisterNetEvent('fs_fraud:insideatmonuse', function(pos)
     
    local xPlayer = ESX.GetPlayerFromId(source)
    local item = xPlayer.getInventoryItem(Config.Items.clonnedcard)
    local account = xPlayer.getAccount(Config.Atm.account)
    local randomChance = math.random(1,5) -- 1 in 5 chance to alert police and remmove item
    if item ~= nil then
        if item.count >= 1 then
            if randomChance == 5 then
                xPlayer.removeInventoryItem(Config.Items.clonnedcard, 1)
            
                notifys(source,lang['atm_ate_card'].description,lang['atm_ate_card'].type,lang['atm_ate_card'].icon)
                TriggerEvent('fs_fraudalerts:alert', 2, pos)
            else
                xPlayer.removeInventoryItem(Config.Items.clonnedcard, 1)
                xPlayer.addAccountMoney(Config.Atm.account, math.random(Config.Atm.amount.min, Config.Atm.amount.max))
            end
        else
            if Config.Atm.extras.cheque then
                local forgedcheque = xPlayer.getInventoryItem(Config.Items.forgedcheque)
                if forgedcheque ~= nil then
                    if forgedcheque.count >= 1 then
                        if randomChance == 5 then
                            xPlayer.removeInventoryItem(Config.Items.forgedcheque, 1)
                        
                            notifys(source,lang['atm_ate_card'].title,"cheque contain fake information.",lang['atm_ate_card'].type,lang['atm_ate_card'].icon)
                            TriggerEvent('fs_fraudalerts:alert', 2, pos)
                        else
                            xPlayer.removeInventoryItem(Config.Items.forgedcheque, 1)
                            xPlayer.addAccountMoney(Config.Atm.account, math.random(Config.Atm.extras.price.min, Config.Atm.extras.price.max))
                        end
                    end
                else
                    print('forgedcheque item not installed correctly in server')
                end
            end
        end
    else
        print('player expoliting by droping item after starting cc command') 
    end
end)

RegisterNetEvent('fs_fraud:sellChecktobanker', function(pos)
    local xPlayer = ESX.GetPlayerFromId(source)
    local forgedCheck = xPlayer.getInventoryItem(Config.Shops[4].items[1].name)
    local randomChance = math.random(1, 5)  -- 1 in 5 chance to alert police and remmove item
    if forgedCheck ~= nil then
        if forgedCheck.count >= 1 then
            if randomChance == 5 then
                TriggerEvent('k_fraudalerts:alert', 1, pos)
                xPlayer.removeInventoryItem(Config.Shops[4].items[1].name, 1)
                notifys(source,"Fraud Notification","Your cheque contain fake information police alrted!!","error",lang['atm_ate_card'].icon)
            else
                xPlayer.removeInventoryItem(Config.Shops[4].items[1].name, 1)
                xPlayer.addAccountMoney(Config.Shops[4].account, math.random(Config.Shops[4].items[1].price.min,Config.Shops[4].items[1].price.max))
            end
        else
            notifys(source, lang['nothing_to_sell'].title, lang['nothing_to_sell'].description,
                lang['nothing_to_sell'].type, lang['nothing_to_sell'].icon)
        end
    else
        notifys(source, lang['nothing_to_sell'].title, lang['nothing_to_sell'].description, lang['nothing_to_sell'].type,
            lang['nothing_to_sell'].icon)
    end
end)


function DropHacker(player)
    print('these are legit hackers if you think its false please contact us FWB Studio and open ticket')
    DropPlayer(player,"Trying to Trigger functions that are not triggered by script")
end

Last updated