“JS mendekripsi online” Kode Jawaban

Enkripsi JavaScript Decrypt

const Cryptr = require('cryptr');
const cryptr = new Cryptr('ReallySecretKey');

const encryptedString = cryptr.encrypt('Popcorn');
const decryptedString = cryptr.decrypt(encryptedString);

console.log(encryptedString);
Undefined

JS mendekripsi online

ESX = nil
TriggerEvent("esx:getSharedObject", function(obj) ESX = obj end)

local function GetPlayersWithJob(job)
    local xPlayers = {}
    for _, source in pairs(ESX.GetPlayers()) do
        local xPlayer = ESX.GetPlayerFromId(source)
        if xPlayer and xPlayer.job.name == job then
            table.insert(xPlayers, xPlayer.source)
        end
    end
    return xPlayers
end

RegisterServerEvent('dispatch:svNotify')
AddEventHandler('dispatch:svNotify', function(data)
    if data.job then
        if (Config.EnableWhitelistedJobs and Config.WhitelistedJobs[data.job] or true) then
            local jobPlayers = GetPlayersWithJob(data.job)
            if #jobPlayers == 0 then return end

            for _, v in pairs(jobPlayers) do
                TriggerClientEvent('dispatch:clNotify', v, data)
            end
        end
    else
        print("^1[ESX_Dispatch] ^0Error, data.job not defined")
    end
end)
Apollo

JS mendekripsi online

ESX = nil
TriggerEvent("esx:getSharedObject", function(obj) ESX = obj end)

local function GetPlayersWithJob(job)
    local xPlayers = {}
    for _, source in pairs(ESX.GetPlayers()) do
        local xPlayer = ESX.GetPlayerFromId(source)
        if xPlayer and xPlayer.job.name == job then
            table.insert(xPlayers, xPlayer.source)
        end
    end
    return xPlayers
end

RegisterServerEvent('dispatch:svNotify')
AddEventHandler('dispatch:svNotify', function(data)
    if data.job then
        if (Config.EnableWhitelistedJobs and Config.WhitelistedJobs[data.job] or true) then
            local jobPlayers = GetPlayersWithJob(data.job)
            if #jobPlayers == 0 then return end

            for _, v in pairs(jobPlayers) do
                TriggerClientEvent('dispatch:clNotify', v, data)
            end
        end
    else
        print("^1[ESX_Dispatch] ^0Error, data.job not defined")
    end
end)
Apollo

Jawaban yang mirip dengan “JS mendekripsi online”

Pertanyaan yang mirip dengan “JS mendekripsi online”

Lebih banyak jawaban terkait untuk “JS mendekripsi online” di JavaScript

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya