-
Posts
343 -
Joined
-
Last visited
-
Days Won
2
Everything posted by Doongogar
-
function MarkerEntregaFunction(thePlayer) if isPedInVehicle(thePlayer) then if getElementData(thePlayer, "EntregadorD") == true and getElementData(ocupado, "kombiEntregas") == true and getElementData(thePlayer, "Entregou") == false then givePlayerMoney(thePlayer, 1000) setElementVisibleTo(MarkerEntrega, thePlayer, false) setElementVisibleTo(BlipEntrega, thePlayer, false) setElementVisibleTo(MarkerEntrega2, thePlayer, true) setElementVisibleTo(BlipEntrega2, thePlayer, true) setElementData(thePlayer, "Entregou2", true) end end end addEventHandler("onMarkerHit", MarkerEntrega, MarkerEntregaFunction) erro na segunda linha tentei usar getPedOccupiedVehicle(thePlayer) e deu o mesmo erro...
-
então ta dizendo que o argumento 2 do addEventHandler no server ta errado não to entendendo "expected element at argument 2 got nil" lado server: function MarkerEntregaFunction(thePlayer) if isPedInVehicle(thePlayer) then local ocupado = getPedOccupiedVehicle(thePlayer) if getElementData(thePlayer, "EntregadorD") == true and getElementData(ocupado, "kombiEntregas") == true then givePlayerMoney(thePlayer, 1000) destroyElement(MarkerEntrega) triggerClientEvent(thePlayer, "MarkerClientDrogas2", thePlayer) end end end addEventHandler("onMarkerHit", MarkerEntrega, MarkerEntregaFunction) lado client: function MarkerClient() MarkerEntrega = createMarker(-1191.005859375,-1062.3449707031,129.21875 - 1, "cylinder", 2.5, 69, 69, 69) end addEvent("MarkerClientDrogas", true) addEventHandler("MarkerClientDrogas", root, MarkerClient)
-
como eu sei o nome dessa variavel no painel de login que uso?
-
deixar todos os objetos do server de um tal modelo inquebravel
Doongogar replied to Doongogar's topic in Programação em Lua
function inquebravel () for index, objetos in ipairs(getElementsByType("object")) do if getElementModel(objetos) == 2412 then setObjectBreakable(objetos, false) end end end addEventHandler("onClientResourceStart", root, inquebravel) addEventHandler("onClientResourceRestart", root, inquebravel) tentei assim, não da erro, porém não funciona oque ta errado? -
function LavarDinheiro(thePlayer, cmd, quantia) if (quantia) and (quantia >= 1000) then limpo = 75 * quantia / 100 have = exports.BVNInventario:GiveAndTakeAndGetItem("get", thePlayer, "dinheirosujo") if getElementType(thePlayer) == "player" then if isObjectInACLGroup("user." ..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup ("GANG")) then if isElementWithinMarker(thePlayer, markerLava) then if not isPedInVehicle(thePlayer) then if have >= 1000 then if getElementData(thePlayer, "lavando") == false then setElementPosition(thePlayer, 2787.3779296875,-2426.3830566406,13.633763313293) setElementRotation(thePlayer, 0, 0, 179) setPedAnimation(thePlayer, "INT_HOUSE", "wash_up", -1, true, false, false) toggleAllControls(thePlayer, false) exports._infobox:addNotification(thePlayer, "Lavando#FF0000...", "info") setElementData(thePlayer, "lavando", true) setTimer(function() setPedAnimation(thePlayer, nil) toggleAllControls(thePlayer, true) setElementData(thePlayer, "lavando", false) local pagou = exports.BVNInventario:GiveAndTakeAndGetItem("take", thePlayer, "dinheirosujo", quantia) if pagou then local recebeu = givePlayerMoney(thePlayer, limpo) if recebeu then exports._infobox:addNotification(thePlayer, "Você Lavou R$:"..quantia.." Em Dinheiro Sujo Que Deram R$:"..math.floor(limpo).." em Dinheiro limpo", "money") end end end, 4000, 1, thePlayer) end else exports._infobox:addNotification(thePlayer, "Dinheiro Sujo Insuficiente", "error") end else exports._infobox:addNotification(thePlayer, "Saia do Veiculo Para Lavar o Dinheiro", "error") end end end end end end addCommandHandler("lavar", LavarDinheiro) fiz esse script de lavar dinheiro mas na segunda linha ficando dando erro dizendo que o script ta tentando comparar o numero com o valor da linha "attempt compare number with string" algo assim, poderiam me ajudar a corrigir isso? (perdão a indentação ta identado aqui mas quando passei pro site ficou meio bugado)
-
muito obrigado, ajudou mesmo!
-
eu fiz uma lavagem de dinheiro que retira 25% do dinheiro sujo ai 75% do valor é do player mas eu gostaria que na mensagem não aparecesse os numeros decimais
-
eu queria saber como bloqueia os paineis quando ta na tela de login, de um jeito que n bloqueie a tecla ja que a pessoa precisa escrever ta abrindo o inventario quando escrevo
-
saber qual IP adicionou/remover algum arq do Filezilla/Tcadmin
Doongogar replied to Doongogar's topic in Programação em Lua
como daria pra fazer? -
então o helicopter chega a girar as helices e faz a barulheira como se fosse levantar e tbm ele se move pros lados, mas ele não sobe não aparece erro no debug e quando eu tento ligar faz o barulho de motor ligando mas continua não subindo
-
entendi obrigado
-
onPlayerChangeNick removeHex onPlayerJoin onPlayerChat
-
vish, eu tlgd que pra mexer com o painel P tem que ser avançado oque não é o meu caso então eu nem tento isso eu vi que tem algumas permissões: (function.aclGroupAddObject, function.aclGroupRemoveObject, function.aclDestroyGroup) eu tentei retirar essas permissões mas não foi, não teria nenhum outro jeito?
-
então eu crio uma função para setar um element data na pessoa ao logar então verifico se ela não tem esse element data pra poder aparecer a loadscreen?
-
e so colocar o createobject no lado server
-
pretendo colocar ele como if pra so aparecer a tela de download quando alguem nao ta logado tentei colocar a prioridade de download no meta mas n foi
-
como eu exporto o "isguestaccount" pro client
-
tem como eu tirar so o manage acl ao inves da aba resources inteira do paine P?
-
duvida: é possivel colocar uma animação em moto
Doongogar replied to uCz.exe's topic in Programação em Lua
como uma animacao de pilotagem? -
pra que serve esse "isElement"? alias muito obrigado
-
config = { ['Vips'] = { ---- ACL---- {'Alpha'}, {'Epsylon'}, {'Sigma'}, {'Omega'}, }, } ta assim panguei denovo a acl Alpha e Epsylon que não tava criada kkkk to pegando o jeito denovo fiquei um tempo sem pc, obrigado aos interessados
-
addEvent('zoin.onInputPrintVip', true) addEventHandler('zoin.onInputPrintVip', root, function(player) triggerClientEvent(player, 'zoin.printPainelVip', player) for i, v in ipairs(config['Vips']) do if isObjectInACLGroup('user.'..getAccountName(getPlayerAccount(player)), aclGetGroup(v[1])) then -- essa linha triggerClientEvent(player, 'zoin.onInsertTableVips', player, v[1]) end end end ) ta dizendo que o segundo argumento ta dando valor booleano