Jump to content

MrDante

Members
  • Posts

    176
  • Joined

  • Last visited

Everything posted by MrDante

  1. Sim, foi o que eu fiz, entendi, pensei que tinha diferenças
  2. , como eu te expliquei, se eu usar ele no /suborno, vai ser retirado o dinheiro sem ser aceitado, que ja é outro comando que não vem ao caso
  3. Isso eu sei, eu ja sei sobre isso, o aceitar suborno não vem ao caso. o que eu quero saber é como eu vou usar para oferecer tal quantia no /suborno..
  4. o takePlayerMoney eu vou usar no aceitar suborno, pois se eu usar ele, o dinheiro vai ser retirado ao usar o comando sem o policial ter aceitado. E agora??
  5. Agora vem outro problema, quando o player digitar /suborno policia total_de_dinheiro no chat aparece que ofereceu o dinheiro todo dele '- agora complicou tudo, e a ideia é oferecer uma tal grana, não o dinheiro todo, e o policia pode aceitar ou não
  6. olhe os topicos acima --' Blz, eu fiz um teste aki com o total de dinheiro 5000 da esse erro Bad Argument @ "getPlayerMoney" [Expected Player at argument 1, got number"5000" Codigo function subornarpolicial (thePlayer, _, nick, amount) if nick then if getPlayerFromPartialName ( nick ) then if amount then local money = getPlayerMoney(thePlayer) if (money > 0) then local nick_do_policial = getPlayerName(thePlayer) local policial_a_ser_subornado = getPlayerFromPartialName ( nick ) local nick_do_jogador = getPlayerName(policial_a_ser_subornado) local money_suborno = getPlayerMoney(tonumber(amount)) if getElementData(thePlayer, "algemado") or getElementData(thePlayer, "navtr") then outputChatBox('#000000[#ff0000POLICIA#000000] #c1c1c1O Jogador algemado lhe ofereceu "..money_suborno.." para você liberar ele, digite /aceitarsuborno para aceitar ou /recusarsuborno para recusar.', policial_a_ser_subornado, 255, 255, 255,true) else outputChatBox('#000000[#ff0000POLICIA#000000] #c1c1c1Você precisa estar preso ou algemado para executar este comando!', thePlayer, 255, 255, 255, true) end end end else outputChatBox('#000000[#ff0000POLICIA#000000] #c1c1c1Comando correto: /suborno nick_do_policial total_de_dinheiro!', thePlayer, 255, 255, 255, true) end else outputChatBox('#000000[#ff0000POLICIA#000000] #c1c1c1Comando correto: /suborno nick_do_policial total_de_dinheiro!', thePlayer, 255, 255, 255, true) end end addCommandHandler ('suborno', subornarpolicial)
  7. Sim, eu fiz para definir a quantidade do dinheiro que o jogador vai oferecer, porem nao sei se está certo
  8. Galera, eu quero que o seguinte, quando o jogador que estiver com um Elemento Data ele possa executar o comando /suborno nome_do_jogador dinheiro que seria um suborno para poder ser removido o Elemento Data no caso, quem tem ele não pode executar comando nenhum, enfim isso não é o pedido de ajuda Eu queria saber o que está errado, pois deu erro de bad argument "getPlayerMoney"quantidade de dinheiro" got number" function subornarpolicial (thePlayer, _, nick, amount) if nick then if getPlayerFromPartialName ( nick ) then if amount then if getPlayerMoney(tonumber(amount)) then local nick_do_policial = getPlayerName(thePlayer) local policial_a_ser_subornado = getPlayerFromPartialName ( nick ) local nick_do_jogador = getPlayerName(policial_a_ser_subornado) local money_suborno = getPlayerMoney(tonumber(amount)) if getElementData(thePlayer, "algemado") or getElementData(thePlayer, "navtr") then outputChatBox('#000000[#ff0000POLICIA#000000] #c1c1c1O Jogador algemado lhe ofereceu "..money_suborno.." para você liberar ele, digite /aceitarsuborno para aceitar ou /recusarsuborno para recusar.', policial_a_ser_subornado, 255, 255, 255,true) else outputChatBox('#000000[#ff0000POLICIA#000000] #c1c1c1Você precisa estar preso ou algemado para executar este comando!', thePlayer, 255, 255, 255, true) end end end else outputChatBox('#000000[#ff0000POLICIA#000000] #c1c1c1Comando correto: /suborno nick_do_policial total_de_dinheiro!', thePlayer, 255, 255, 255, true) end else outputChatBox('#000000[#ff0000POLICIA#000000] #c1c1c1Comando correto: /suborno nick_do_policial total_de_dinheiro!', thePlayer, 255, 255, 255, true) end end addCommandHandler ('suborno', subornarpolicial) tambem tentei isso function subornarpolicial (thePlayer, _, nick, money, amount) if nick then if money then if getPlayerFromPartialName ( nick ) then if getPlayerMoney(tonumber(amount)) then local nick_do_policial = getPlayerName(thePlayer) local policial_a_ser_subornado = getPlayerFromPartialName ( nick ) local nick_do_jogador = getPlayerName(policial_a_ser_subornado) local money_suborno = getPlayerMoney(tonumber(amount)) if getElementData(thePlayer, "algemado") or getElementData(thePlayer, "navtr") then outputChatBox('#000000[#ff0000POLICIA#000000] #c1c1c1O Jogador algemado lhe ofereceu "..money_suborno.." para você liberar ele, digite /aceitarsuborno para aceitar ou /recusarsuborno para recusar.', policial_a_ser_subornado, 255, 255, 255,true) else outputChatBox('#000000[#ff0000POLICIA#000000] #c1c1c1Você precisa estar preso ou algemado para executar este comando!', thePlayer, 255, 255, 255, true) end end end else outputChatBox('#000000[#ff0000POLICIA#000000] #c1c1c1Comando correto: /suborno nick_do_policial total_de_dinheiro!', thePlayer, 255, 255, 255, true) end else outputChatBox('#000000[#ff0000POLICIA#000000] #c1c1c1Comando correto: /suborno nick_do_policial total_de_dinheiro!', thePlayer, 255, 255, 255, true) end end addCommandHandler ('suborno', subornarpolicial)
  9. Olha mt obrigado, mas surgiu uma pergunta, o q muda se o looping for nick ou player? a e desculpa, acho que minha lerdeza está tão perfeita que nem percebi que o newage respondeu
  10. I want the player type it /reforço and the message goes to everyone who is in the acl ComandosPolicia Understood?
  11. I've done that, but as I said, who's in ComandosPolicia acl can type, I want to appear to everyone who is in the acl, not for those who are in acl
  12. Well, I saw a business, who's in ComandoPolicia acl can type, but I want the message you are sending is for all the acl!
  13. First of all, I am Brazilian sorry for bad English Hello guys I have a problem, I want the next when the player enter the message to everyone in such a acl, however I do not know what you can do to work, I tried, from a look function PedirReforco(thePlayer) for k, nick in pairs(getElementsByType("player")) do local x, y, z = getElementPosition(thePlayer) local sx, sy, sz = getElementPosition(nick) local dist = getDistanceBetweenPoints3D(x, y, z, sx, sy, sz) local location = getZoneName ( x, y, z ) local nick1 = getPlayerName(nick) local accName = getAccountName ( getPlayerAccount ( nick ) ) local NickChamador = getPlayerName( thePlayer ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "ComandosPolicia") ) then outputChatBox ("#000000[#ff0000POLICIA#000000] #c1c1c1O jogador "..NickChamador.." pediu reforços mais proximo de "..location.." a "..math.floor(dist).." Km/H.", nick1, 255, 255, 255, true) end end end addCommandHandler("reforço", PedirReforco)
  14. Blz, Algumas coisas eu entendi, foi o erro nas variáveos, agora vem no chatbox, eu n sei o que eu uso for k, nick in pairs(getElementsByType("player")) do local x, y, z = getElementPosition(thePlayer) local sx, sy, sz = getElementPosition(nick) local dist = getDistanceBetweenPoints3D(x, y, z, sx, sy, sz) local location = getZoneName ( x, y, z ) local nick1 = getPlayerName(nick) local accName = getAccountName ( getPlayerAccount ( nick ) ) local NickChamador = getPlayerName( thePlayer ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "ComandosPolicia") ) then outputChatBox ("#000000[#ff0000POLICIA#000000] #c1c1c1O jogador "..NickChamador.." pediu reforços mais proximo de "..location.." a "..math.floor(dist).." Km/H.", nick1, 255, 255, 255, true) o codigo q te mante ta correto.. so veja oq erro if isObjectInACLGroup ("user."..accName, aclGetGroup ( "ComandosPolicia") ) then ou o nick1 no argumento do chatbox??? Não estou entendendo
  15. Blz, Algumas coisas eu entendi, foi o erro nas variáveos, agora vem no chatbox, eu n sei o que eu uso for k, nick in pairs(getElementsByType("player")) do local x, y, z = getElementPosition(thePlayer) local sx, sy, sz = getElementPosition(nick) local dist = getDistanceBetweenPoints3D(x, y, z, sx, sy, sz) local location = getZoneName ( x, y, z ) local nick1 = getPlayerName(nick) local accName = getAccountName ( getPlayerAccount ( nick ) ) local NickChamador = getPlayerName( thePlayer ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "ComandosPolicia") ) then outputChatBox ("#000000[#ff0000POLICIA#000000] #c1c1c1O jogador "..NickChamador.." pediu reforços mais proximo de "..location.." a "..math.floor(dist).." Km/H.", nick1, 255, 255, 255, true)
  16. Galera eu quero que o seguinte, quando o player digite /reforco aparecera a msg para todos de tal acl, porem deu erro, tentei usar um looping porem nao deu certo function PedirReforcos ( thePlayer ) for k, nick in pairs(getElementsByType("player")) do local x, y, z = getElementPosition(thePlayer) local nick = getPlayerName(nick) local sx, sy, sz = getElementPosition(nick) local dist = getDistanceBetweenPoints3D(x, y, z, sx, sy, sz) local location = getZoneName ( x, y, z ) local accName = getAccountName ( getPlayerAccount ( nick ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "ComandosPolicia") ) then outputChatBox ("#000000[#ff0000POLICIA#000000] #c1c1c1O jogador "..thePlayer.." pediu reforços mais proximo de "..location.." a "..math.floor(dist).." Km/H.", nick, 255, 255, 255, true) end end end addCommandHandler("reforcos", PedirReforcos)
  17. Agora deu certo, obrigado ai Hornet
  18. Galera, é o seguinte, eu estava com um projeto de que quando o jogador digite tal comando, ira criar uma especie de arma (mais especifico projectile) e que venha do ceu e acerte a pessoa que digitou o comando, a parte de atirar eu consegui, só não consegui fazer com que acerte o jogador alguém poderia dar algumas dicas de como fazer isso Função(Client) function meteoro(targetPlayer) local x, y, z = getElementPosition(getLocalPlayer()) createProjectile(getLocalPlayer(),19, x ,y, z,1.0, getLocalPlayer()) end addCommandHandler("meteoro", meteoro)
  19. Galera, é o seguinte, quero fazer click por imagem, que quando o comando da clica aparece uma imagem, e quando clica de volta, aparece outra, especificando quando esta ativado aparece o botao verde, quando nao esta aparece botao vermelho, porem unica forma que achei é optar por setElementData, so que, vou usar o mod "superman" para isso, o que eu quero é que quando o botão clica primeira vez, ele ativa, quando clica segunda, ele desativa( ou seja o Element Data ficará false), só que não estou conseguindo alguma forma de clicar pela segunda vez e o element data ficar false, alguem pode ajudar? talvez minha explicação ficou horrivel, mas vou deixar a função mais clara Client local Superman = {} if getElementData(localPlayer, "superman:dx") then dxDrawImage(botX+sizeX+371, botX2+sizeX2+255, 32, 14,isCursorOnElement(botX+sizeX+371, botX2+sizeX2+255, 32, 14) and"images/verde-off.png" or "images/verde-on.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) else dxDrawImage(botX+sizeX+371, botX2+sizeX2+255, 32, 14,isCursorOnElement(botX+sizeX+371, botX2+sizeX2+255, 32, 14) and"images/vermelho-off.png" or "images/vermelho-on.png" , 0, 0, 0, tocolor(255, 255, 255, 255), false) end function Superman.cmdstart (_,state) if painel == true then if state == "down" then if isCursorOnElement (botX+sizeX+371, botX2+sizeX2+255, 32, 14) then local self = Superman setElementData(localPlayer, "superman:dx", true) if isPedInVehicle(localPlayer) or isPlayerFlying(localPlayer) then return end setElementVelocity(localPlayer, 0, 0, TAKEOFF_VELOCITY) setTimer(Superman.startFlight, TAKEOFF_FLIGHT_DELAY, 1) end end end end addEventHandler ("onClientClick", root, Superman.cmdstart) function isCursorOnElement(x,y,w,h) local mx,my = getCursorPosition () local fullx,fully = guiGetScreenSize() cursorx,cursory = mx*fullx,my*fully if cursorx > x and cursorx < x + w and cursory > y and cursory < y + h then return true else return false end end
  20. Try To Make GUI Invisible then
×
×
  • Create New...