Leaderboard
Popular Content
Showing content with the highest reputation on 17/01/19 in all areas
-
السلام عليكم ورحمه الله وبركاتة تعلن مجتمع العرب عن اقامتها مسابقة بسيطة في المنتدى الرسمي: للدخول اضغط هنا ولتحفيز الاعضاء على المشاركة ونشر المواضيع حيث انه اذا قام العضو بمشاركة الكثير من المواضيع فسيحصل على جوائز معينة الجائزة الاولى 500 ( مواضيع او مشاركات ) = Nitro Discord الجائزة الثانية 300 ( مواضيع او مشاركات ) = Nitro Discord Classic شروط المسابقة الوصول لاحدى المشاركات اعلاه الدخول لسيرفرنا بالديسكورد اضغط هنا المواضيع تكون منسقه مب تسليكيه بهدف زيادة المواضيع الردود ايضا تكون غير تسليكيه بهدف زيادة المشاركات من مزايا النيترو ديسكورد كلاسيك ومن مزايا النيترو ديسكورد مع تحيات فريق مجتمع العرب .3 points
-
1 point
-
Use math.floor. Exemplo: local health = getElementHealth( localPlayer ); outputChatBox( math.floor( health ) );1 point
-
Obrigado por explicar. Estou há 8 ou 9 anos jogando e programando, mas nunca percebi que 'onPlayerMarkerHit' era um evento. Agora eu sei!1 point
-
Próxima poste na seção correta: Programação em Lua Você deve utilizar: setPlayerHudComponentVisible1 point
-
Só uma observação, o código que ele postou não deveria funcionar nem mesmo corrigindo a altura/tamanho, pois o onPlayerMarkerHit é um evento relacionado ao ‘player’, e para que o evento seja acionado devemos anexá-lo à tal. A variável pré-definida ‘root’ engloba todos os elementos, inclusive os players (fonte), então no caso o correto seria assim: marker = createMarker(2101.368, -1801.239, 12.5, "cylinder", 1, 0, 255, 0, 200 ) function startJob(markerHit) if (markerHit == marker) then carro = createVehicle(448, 2097.831, -1801.282, 13.383) end end addEventHandler("onPlayerMarkerHit", root, startJob) (claro, ai ajusta novamente a altura/tamanho para que consiga a colisão) Usando o onMarkerHit como mostrado pelo @asrzk, ai sim podemos declarar o marker criado no 2º parâmetro do addEventHandler, pois esse evento relaciona-se com elementos do tipo “marker”.1 point
-
O que você quer são shader de markers, ou seja, texturizar um marcador. Eu tenho um aqui: mShader. Não é o listrado, mas é fácil de editar, se souber mexer com design. Print/vídeo do marker: YouTube @EDIT: Ah, já ia me esquecendo de falar sobre o seu script. Ele está quase correto, o problema realmente é o tamanho e a altura dele que, em server-side, a colisão é meio bugada, digamos assim. É sempre bom verificar o tipo de elemento que o marcador está recebendo, então sempre utilize o parâmetro 'hitElement' ou do jeito que você quiser, tipo assim: local theMarker = createMarker( x, y, z, "cylinder", 1.25, 0, 171, 0, 220 ); function someFunction( hitElement, d ) if ( getElementType( hitElement ) == "player" ) and ( d ) then -- getElementType() verifica o tipo de elemento. A letra "d" serve para verificar se o jogador está na mesma dimensão que o marker. local playerPos = { getElementPosition( hitElement ) }; someVeh = createVehicle( 411, playerPos[ 1 ], playerPos[ 2 ], playerPos[ 3 ] + 0.5 ); warpPedIntoVehicle( hitElement, someVeh ); end end addEventHandler( "onMarkerHit", theMarker, someFunction )1 point
-
You can add the original AK skin just like you add the custom new one.1 point
-
Ok, um script server-side com função anexada ao evento addCommandHandler e um getElementHealth que verifica se o jogador não está com a vida cheia. Se não estiver, adiciona + 10 na vida dele com setElementHealth e cria um timer anexado ao jogador com setTimer, que bloqueia o uso do comando por 30 segundos. Uhum, dai em vez de setElementHealth você usa setPedArmor. Mas use outro timer separado e outro comando.1 point
-
Assim como as Radar Area, não é possível rotacioná-lo. Eles sempre ficam retos em relação ao minimapa. Por isso que existe o colisor em forma de esfera.1 point
-
Você colocou a posição Z baixa demais. Para o marker funcionar perfeitamente geralmente ele fica um pouco acima do chão, então eu geralmente crio 2 markers, um que fica abaixo, e só serve para deixar mais bonito, e outro que é acionado no evento, e que eu deixo invisível.1 point
-
function empregos () dxDrawLine(637 - 1, 149 - 1, 637 - 1, 716, tocolor(254, 254, 254, 207), 1, false) dxDrawLine(1025, 149 - 1, 637 - 1, 149 - 1, tocolor(254, 254, 254, 207), 1, false) dxDrawLine(637 - 1, 716, 1025, 716, tocolor(254, 254, 254, 207), 1, false) dxDrawLine(1025, 716, 1025, 149 - 1, tocolor(254, 254, 254, 207), 1, false) dxDrawRectangle(637, 149, 388, 567, tocolor(0, 0, 0, 134), false) dxDrawText("Profissões", 677, 153, 988, 219, tocolor(255, 255, 255, 255), 3.00, "pricedown", "center", "top", false, false, false, false, false) dxDrawLine(677 - 1, 252 - 1, 677 - 1, 281, tocolor(195, 195, 195, 141), 1, false) dxDrawLine(988, 252 - 1, 677 - 1, 252 - 1, tocolor(195, 195, 195, 141), 1, false) dxDrawLine(677 - 1, 281, 988, 281, tocolor(195, 195, 195, 141), 1, false) dxDrawLine(988, 281, 988, 252 - 1, tocolor(195, 195, 195, 141), 1, false) dxDrawRectangle(677, 252, 311, 29, tocolor(0, 0, 0, 175), false) dxDrawLine(677 - 1, 291 - 1, 677 - 1, 320, tocolor(195, 195, 195, 148), 1, false) dxDrawLine(988, 291 - 1, 677 - 1, 291 - 1, tocolor(195, 195, 195, 148), 1, false) dxDrawLine(677 - 1, 320, 988, 320, tocolor(195, 195, 195, 148), 1, false) dxDrawLine(988, 320, 988, 291 - 1, tocolor(195, 195, 195, 148), 1, false) dxDrawRectangle(677, 291, 311, 29, tocolor(0, 0, 0, 175), false) dxDrawLine(677 - 1, 330 - 1, 677 - 1, 359, tocolor(191, 191, 191, 148), 1, false) dxDrawLine(988, 330 - 1, 677 - 1, 330 - 1, tocolor(191, 191, 191, 148), 1, false) dxDrawLine(677 - 1, 359, 988, 359, tocolor(191, 191, 191, 148), 1, false) dxDrawLine(988, 359, 988, 330 - 1, tocolor(191, 191, 191, 148), 1, false) dxDrawRectangle(677, 330, 311, 29, tocolor(0, 0, 0, 175), false) dxDrawText("Entregador De Jornal Level 0", 684, 257, 983, 275, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "top", false, false, false, false, false) dxDrawText("Entregador De Pizza Level 5", 683, 296, 982, 314, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "top", false, false, false, false, false) dxDrawText("Petroleiro Level 10", 683, 335, 982, 353, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "top", false, false, false, false, false) dxDrawText("", 654, 677, 654, 677, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, false, false, false) dxDrawText("www.gbgp.com.br", 655, 690, 1006, 702, tocolor(255, 255, 255, 255), 1.00, "bankgothic", "center", "top", false, false, false, false, false) dxDrawText("Aperte X para fechar!", 647, 672, 1015, 687, tocolor(255, 255, 255, 255), 1.00, "default", "center", "top", false, false, false, false, false) end function abrirpainel () if painel == false then addEventHandler ("onClientRender", root, empregos) showCursor (true) painel = true playSoundFrontEnd(7) end end addEvent ("open", true) addEventHandler ("open", root, abrirpainel) function fecharpainel () if painel == true then removeEventHandler ("onClientRender", root, empregos) showCursor (false) painel = false playSoundFrontEnd(7) end end addEvent ("fecharpainel", true) bindKey ("x", "down", fecharpainel) local x,y = guiGetScreenSize() 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 end1 point
-
Primeiro, você vai ver aulas ou vídeos sobre a lógica da programação, e as funções básicas de um script, após isso, você vai tentar ler códigos, assim vai começar a ler os seus próprios códigos e criando.1 point
-
Bom, o meu conselho é criar um tópico em inglês, na seção inglesa. Marque o ccw e o Dutchman101. Eles têm um conhecimento superior ao nosso sobre isso.1 point
-
آحسنت يخوي والله المبرمج الوحيد لى اشوفه يساعد المبتدئين واصل يا خوي ولا ترد ع الناس فاضيه ننتظر منك المزيد1 point
-
Entendo, mas como vc espera que o sistema funcione? A lógica dele.1 point
-
Vamos por partes. Sistema de medicação. Você já começou a fazer algo? Nos mostre e vamos lhe ajudar com possíveis problemas que estejam acontecendo ou dúvidas que você tenha na programação desse sistema.1 point
-
No link do restartResource o segundo exemplo faz exatamente isso.1 point
-
setTimer + restartResource Isso reinicia o resource em si. Dependendo do seu caso, pode ser outra coisa específica que você quer que execute num intervalo de tempo, nesse caso é usando setTimer em uma função.1 point
-
Tá, mas vc sabe lógica de programação? Vc já tentou fazer alguma coisa?1 point
-
Favorites added long ago. Also, it's as precise as it's gonna get.1 point
-
A função setAmbientSoundEnabled é client-side. Vejo que você está usando eventos que são server-side. addEventHandler( "onClientResourceStart", resourceRoot, function( ) setAmbientSoundEnabled( "general", false ); setAmbientSoundEnabled( "gunfire", false ); end ) Jogue este código em um script que seja client-side. Assim que você ligar, já irá funcionar.1 point
-
this server still the best for me but they people just don't support the best things like this server1 point
-
Hello everyone. I made duty script for mta dayz. I have looking around lot of times and i haven't seen one that works fine. Then i thought i can do it. And today i release this. It's fully editable. But you have to give a credit in meta! Features: UP COMMING: Before download i want do say Please give me +rep for making this script for free. Thats all!! Download: Github, google,mtasacommunity1 point