Ezequiel Posted August 15, 2019 Share Posted August 15, 2019 inimarker = createMarker(2825.11694, 1295.62183, 9.76514, "cylinder", 1.5, 255, 0, 0, 100) finmarker = createMarker(2826.12085, 1355.72925, 9.75000, "cylinder", 1.5, 255, 255, 0, 100) iniblip = createBlipAttachedTo(inimarker, 42) finblip = createBlipAttachedTo(finmarker, 0) setElementVisibleTo(finmarker, root, false) setElementVisibleTo(finblip, root, false) vehserver = {} addEventHandler("onMarkerHit", inimarker, function(player) local lvls = tonumber(getElementData(player, "Level")) if lvls and lvls >= 35 then if not (vehserver[player]) then if (getElementDimension(player) == 0) then if vehserver[player] and isElement(vehserver[player]) then destroyElement(vehserver[player]) vehserver[player] = createVehicle(609,2830.94849, 1294.29333, 10.77368) warpPedIntoVehicle(player, vehserver[player]) setElementVisibleTo(finblip, player, true) setElementVisibleTo(finmarker, player, true) outputChatBox("#483D8B[X] #FFFFFFPara Parar de Trabalhar Digite /Cancelar", player, 255, 255, 255, true); end else outputChatBox("#483D8B[X] #FF3232ERRO. #FFFFFFVoçe Já Está Trabalhando].", player, 255, 255, 255, true); end else outputChatBox("#483D8B[X] #FF3232ERRO. #FFFFFFNecessita Estar Nivel 35 Para Continuar", player, 255, 255, 255, true); end end function fim(player) if vehserver[player] and isElement(vehserver[player]) then givePlayerMoney(player, 1000) destroyElement(vehserver[player]) setElementVisibleTo(finblip, player, false) setElementVisibleTo(finmarker, player, false) outputChatBox("#00ff00Você GANHOU R$1000", player, 255,255,255,true) end end addEventHandler("onMarkerHit", finmarker, fim) function cancelarserver(player) destroyElement(vehserver[player]) setElementVisibleTo (finblip, player, false) setElementVisibleTo (finmarker, player, false) outputChatBox("#00ff00Você Cancelou", player, 255,255,255,true) end addCommandHandler("cancelar", cancelarserver) Fiz um Script bem simples mas quero que apenas pessoas com mais de level "35" possam usar esse trabalho, estou desde ontem tentando fazer isso mas não estou achando meu erro, se alguém puder me ajudar desde já agradeço. Link to comment
DNL291 Posted August 15, 2019 Share Posted August 15, 2019 Digite /debugscript 3 para ver erros no script. Posts em português deve ser em Portuguese / Português @Ezequiel. Tópico movido. Link to comment
Ezequiel Posted August 16, 2019 Author Share Posted August 16, 2019 esta dando erro na linha 13.. mas não sei oq mudar, pode me ajudar? Link to comment
Other Languages Moderators Lord Henry Posted August 16, 2019 Other Languages Moderators Share Posted August 16, 2019 Qual erro? Link to comment
DNL291 Posted August 16, 2019 Share Posted August 16, 2019 Com uma depuração básica você pode descobrir o erro, faça um print no valor lvls, e no getElementData 1 Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now