Help with setting a variable

local zipped = false
RegisterNetEvent('Ziptie:Zip') 
AddEventHandler('Ziptie:Zip', function(t) 
    local id = GetPlayerFromServerId(t) 
    ziptiedplayers[id] = true 
    Citizen.Trace(GetPlayerServerId(id)) 
    while not HasAnimDictLoaded('mp_arresting') do
        RequestAnimDict('mp_arresting')
        Citizen.Wait(5)
    end
    zipped = true
    TaskPlayAnim(GetPlayerPed(id), 'mp_arresting', 'idle', 8.0, 1.0, -1, 49, 1.0, 0, 0, 0)
end)

Citizen.CreateThread(function()
    while true do
        Citizen.Wait(0)
        if zipped then
            if IsPedArmed(GetPlayerPed(-1), 7) then
                SetCurrentPedWeapon(GetPlayerPed(-1), 0xA2719263, true)
            end
                    
            while not HasAnimDictLoaded('mp_arresting') do
                RequestAnimDict('mp_arresting')
                Citizen.Wait(5)
            end
            if not IsEntityPlayingAnim(GetPlayerPed(i), 'mp_arresting', 'idle', 3) then
                TaskPlayAnim(GetPlayerPed(i), 'mp_arresting', 'idle', 8.0, 1.0, -1, 49, 1.0, 0, 0, 0)
            end
        end
    end
end)

the zipped variable

here is the code but it sets it to true for the cop and the criminal, I want it to only set true to criminal. How can I do that?