If you want to allow multiple answers for each question, then continue using check boxes. However, if you want to allow only one answer, then use radio buttons instead.
etapas = {};
acertou = {};
function Prova(button)
local quantidade = acertou[localPlayer]
if button == "left" then
if etapas[localPlayer] == false then
FecharProva -- What is this? A Variable? Its not doing anything... Why is this here or what do you want it to do?
etapas[localPlayer] = true
AbrirProva -- What is this? A Variable? Its not doing anything... Why is this here or what do you want it to do?
elseif etapas[localPlayer] == true then
if Pergunta == false then
FecharProva -- What is this? A Variable? Its not doing anything... Why is this here or what do you want it to do?
Pergunta = 1
AbrirProva -- What is this? A Variable? Its not doing anything... Why is this here or what do you want it to do?
elseif Pergunta == 1 then
if source == opcaoC then
if guiCheckBoxGetSelected(source) then
acertou[localPlayer] = quantidade+1
end
end
FecharProva -- What is this? A Variable? Its not doing anything... Why is this here or what do you want it to do?
Pergunta = 2
AbrirProva -- What is this? A Variable? Its not doing anything... Why is this here or what do you want it to do?
elseif Pergunta == 2 then
if source == opcaoC then
if guiCheckBoxGetSelected(source) then
acertou[localPlayer] = quantidade+1
end
end
FecharProva -- What is this? A Variable? Its not doing anything... Why is this here or what do you want it to do?
Pergunta = 3
AbrirProva -- What is this? A Variable? Its not doing anything... Why is this here or what do you want it to do?
end
elseif Pergunta == 3 then
if source == opcaoC then
if guiCheckBoxGetSelected(source) then
acertou[localPlayer] = quantidade+1
end
end
FecharProva -- What is this? A Variable? Its not doing anything... Why is this here or what do you want it to do?
if quantidade >= 2 then
outputChatBox ( "[TLRP] #34eb3dVocê passou na prova com "..quantidade.." acertos. Parabéns!!", 255, 255, 255, true )
acertou[localPlayer] = 0
etapas[localPlayer] = false;
triggerServerEvent(localPlayer, "NSCR:TerminouProva", localPlayer) -- The 1st argument (localPlayer) isn't needed for Server Side Triggers
else
outputChatBox ( "[TLRP] #ff0000Você falhou na prova com "..quantidade.." acertos e foi kickado. (Maximo de erros: 3)", 255, 255, 255, true )
kickPlayer(localPlayer)
end
end
end
end
end