Jump to content

#Viniih

Members
  • Posts

    6
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

#Viniih's Achievements

Vic

Vic (3/54)

1

Reputation

  1. Funcionou mano, muito obrigadooooooooooooooooooooooo
  2. Sim, é a variável que faz a contagem dos tenis
  3. Estou tentando fazer um modo que salve as roupas que o player compra em um element data, até ai tudo bem, consigo inserir as roupas normalmente na tabela. Ao tentar puxar para verificar as roupas que o player tem ele não apresenta na numeração correta --SERVER-- --(FIZ ISSO SÓ PRA TESTAR) ESTOU SETANDO O TENIS NUMERO 5 E 8 PARA TODOS OS PLAYERS-- function loadingClothes() for _, player in ipairs (getElementsByType("player")) do if getElementModel(player) > 0 then setElementModel(player, 0) end local roupas = { tenis = {5, 8} } setElementData(player, "Roupas", roupas) end end addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), loadingClothes) --CLIENT-- --ESSE É O PAINEL, "shoes" É A NUMERAÇÃO DE CADA TENIS(NO CASO ERA PRA APARECER QUE EU JA POSSUIA O TENIS 5 E 8) local shoesC = getElementData(localPlayer, "Roupas") if shoesC.tenis[shoes] then dxDrawButton ("JA POSSUI", x*1230, y*795, x*300, y*35, tocolor(255, 148, 0, 200), tocolor(255, 148, 0, 255), tocolor(255, 148, 0, 255),x*1) else dxDrawButton ("COMPRAR", x*1230, y*795, x*300, y*35, tocolor(255, 148, 0, 200), tocolor(255, 148, 0, 255), tocolor(255, 148, 0, 255),x*1) end Mas no painel dentro do jogo, quando vou ver ele aparece que eu possuo o tênis 1 e 2 e não possuo o 5 e 8 http://prntscr.com/mopwhm
  4. function revistar_jogador ( thePlayer, comando, nick ) if nick then if getPlayerFromPartialName ( nick ) then local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "ComandosPolicia") ) then -- Acl Pra Quem Pode Usar o Comando local player_a_ser_revistado = getPlayerFromPartialName ( nick ) local nick_do_jogador = getPlayerName ( player_a_ser_revistado ) local nick_do_policial = getPlayerName ( thePlayer ) local estrelas_de_procurado = getPlayerWantedLevel ( player_a_ser_revistado ) local policiax, policiay, policiaz = getElementPosition ( thePlayer ) -- Encontrar posição do policial local revistadox, revistadoy, revistadoz = getElementPosition ( player_a_ser_revistado ) -- Encontrar posição de quem sera revistado local dist = getDistanceBetweenPoints3D ( policiax, policiay, policiaz, revistadox, revistadoy, revistadoz ) -- Calcular a distancia entre os dois elementos if ( dist > 5 ) then -- se a distancia for 5 executara a função a seguir outputChatBox("#000000[#ff0000POLICIA#000000] #c1c1c1Chegue Mais Perto Do Jogador Pra Executar Este Comando!", thePlayer, 255, 255, 255, true) -- Chat Box elseif ( dist < 4 )then -- Caso ao contrario a distancia for 4 executara a função a seguir setPedAnimation( thePlayer, "POLICE", "plc_drgbst_01", 3100, true, false, false, false) outputChatBox("#000000[#ff0000POLICIA#000000] #c1c1c1O #ff0000Policial #ffffff"..nick_do_policial.." #c1c1c1esta #ff0000Revistando #c1c1c1o #ff0000Suspeito "..nick_do_jogador.."", root, 255, 255, 255, true) -- Chat Box setTimer ( function() outputChatBox("#000000[#ff0000POLICIA#000000] #c1c1c1Nivel de #ff0000Procurado #c1c1c1do #ff0000Suspeito#c1c1c1:"..estrelas_de_procurado.."", thePlayer, 255, 255, 255, true) -- Nivel de procurado do jogador if getElementData(player_a_ser_revistado, "Habilitacoes:Motos") then -- Verifica se ele tem carteira de moto outputChatBox("Player com carteira de moto", thePlayer, 255, 255, 255, true) else outputChatBox("Player sem carteira de moto", thePlayer, 255, 255, 255, true) end end, 3390, 1 ) triggerClientEvent(thePlayer, "doShowDXProgressBar", thePlayer) -- Chamar evento do client end else outputChatBox("#000000[#ff0000POLICIA#000000] #c1c1c1Você nao tem permissao a este comando!", thePlayer, 255, 255, 255, true) -- Se voce nao for da acl voce nao tera permissao a este comando end end end end addCommandHandler ( "revistar", revistar_jogador ) Só adicionar uma "verificação" abaixo do output do nivel de procurado Obs: ele vai verificar só de moto, vc tem que fazer o mesmo com a de carro, caminhao e etc.
  5. It worked! Now another doubt, to take the facebook photo of the player to use as avatar using the above function? English by Google translator
  6. (IF POSSIBLE / SE FOR POSSÍVEL) How do I use an internet img in the dxDrawImage function? Como faço para usar uma img da internet na função dxDrawImage? Example: local link = "https://media.rockstargames.com/rockstargames-newsite/img/global/downloads/buddyiconsconavatars/sanandreas_truth_256x256.jpg" function teste() dxDrawImage(0, 0, 256, 256, link, 0, 0, 0, tocolor(255, 255, 255, 255), false) end addEventHandler("onClientRender", root, teste)
×
×
  • Create New...