[Release] [Standalone] Boost's simple numpad

I cant open the door, because it says: Incorrect

if closestV.locked then

            exports['Boost-Numpad']:openNumpad(1234,true,function(correct)

                if correct then

                    local locked = not closestV.locked

                    if closestV.audioRemote then src = NetworkGetNetworkIdFromEntity(playerPed) else src = nil end

                    TriggerServerEvent('nui_doorlock:updateState', closestDoor, locked, src) -- Broadcast new state of the door to everyone

                end

            end)

        else

            local locked = not closestV.locked

            if closestV.audioRemote then src = NetworkGetNetworkIdFromEntity(playerPed) else src = nil end

            TriggerServerEvent('nui_doorlock:updateState', closestDoor, locked, src) -- Broadcast new state of the door to everyone

        end

        --debug(closestDoor, closestV)

        if closestV.audioRemote then src = NetworkGetNetworkIdFromEntity(playerPed) else src = nil end

        TriggerServerEvent('nui_doorlock:updateState', closestDoor, locked, src) -- Broadcast new state of the door to everyone

    end

end)

is there anything new?

Here’s the problem /\ Each time I entered the same code, but it doesn’t reset the old code.

Add this code to /html/app.js:

c_code = '';

(line 21)

case 'closeui':
   $('#container').fadeOut();
   c_code = '';
break;

(line 34)

if(c_code == code){
   $.post('http://Boost-Numpad/SubmitCode', 'true');
}else{
   $('#display').addClass('text-red-500')
   $('#display').text('Incorrect')
   c_code = '';
}

(line 41)

$("#clear").click(function() {
   $('#display').removeClass('text-red-500')
   $("#display").html('')
   c_code = '';
});

Now:
image

1 Like

Ahh I see kinda didn’t see that I’am not reseting the code :slight_smile: will update the repo

where do i put the Usage