Leaderboard
Popular Content
Showing content with the highest reputation on 02/01/19 in all areas
-
2 points
-
Hi there. The Winter Holidays are here, so as usual we have got a new recap and status update post for you. Here is the summary of what has happened this year. ? 2018 in Recap We made efforts towards the new release through the first half of the year, so there was not much to talk about. There was an incompatibility issue with the 360 Total Security software which we advised you about and later in the year, there was a similar issue with McAfee. Late July, we have asked you about your thoughts about refreshing the community.multitheftauto.com portal. We have received some interesting feedback from you and we are still thinking about ways of implementing it, while considering our current resources. Also in July, we have migrated our bug tracking services to GitHub Issues, making it easier to track specific issues and link them to GitHub commits and pull requests. This has also allowed us to clean up our bug tracker - the old system had nearly 8000 tracked issues, some of which were 13 years old or so. On 7th of September, we have released Multi Theft Auto: San Andreas 1.5.6. This release added support for custom IFP animations among other things, like fixing the input and FPS lag reported by some of our users. Then a few days later, we have advised you to upgrade your MTA:SA servers to the latest version due to a server crash exploit that was discovered. There were some additional issues with this hotfix that were spotted later, but they have been all fixed within few days. If you have not yet upgraded your servers though, we still urge you to do so. ? A bunch of interesting MTA:SA-related YouTube videos from this year nX_ Vol.18 - CodeNX™ - 첫 장 - video by ElCrowMvs / map by nX [GTA:DM] Wonder - Interstellar - by Wonder MTA [MTA] Vice City - Map Preview #1 (JStreamer v3) - by Liberty City Roleplay Multi Theft Auto - Tactics - by LoG4nTG Multi Theft Auto - MTA CIT / GTA SA - San Andreas Police Department's 7th Anniversary (Dance Show) - video by PeteyFTW / server: CIT Multi Theft Auto San Andreas Fail + Funny moments #1 - by Mr. Green Gaming Multi Theft Auto: San Andreas - MTA DD - Map: Orgazm Cross - video by Game Master / map by Orgazm MTA:SA Fast And Furious Paradise Trailer ! - by SDRIFTER Abdlmounaim ? Current player counts and version fragmentation statistics Type Amount of players Date / Time Recent peak number of concurrent unique players 30625 players 2018.12.16 (at 16.30 GMT) Highest recorded number of concurrent unique players 34653 players 2018.02.03 (at 17.30 GMT) Recent number of daily unique players 150390 players 2018.12.01 (Saturday) Highest recorded number of daily unique players 185818 players 2018.02.03 (Saturday) Recent number of monthly unique players 605834 players November, 2018 Highest recorded number of monthly unique players 805903 players January, 2018 Player counts were just slightly lower than last year, but we have also had some nice peak values at the beginning of the year. Good to see that there is still an interest in old but great games. MTA:SA Version or series Percentage of players using that version or series as of 24th of December, 2018 1.6.0 (alpha) 0.05% 1.5.6 97.20% 1.5.5 2.00% 1.5.4 (and older) 0.40% 1.4.x 0.20% 1.3.x 0.15% Similar to last year, two of our most recent releases are used by over 99% of our player base. It means that there is little fragmentation between our releases and that players in general upgrade to the newest release once it is available. Also, there seems to be some interest in the newest alpha version as well - that is nice too. ? Status updates Community-wise, our Discord has expanded this year - currently we have got 10 language-specific sections available for you there, as well as the active as usual English ones. We have also opened a new forum section recently to keep appeals for global game bans in one place. Over the next few weeks we intend to refresh our forum rules to better suit the current forum needs. As for mod's development, we will continue working on the next release. We are thinking of integrating a new version of the client installer to reduce amount of issues encountered when installing MTA:SA (as well as to make it easier to investigate the remaining ones). We will also consider adding new features provided by our community members, such as editing collisions and adjusting surface properties by CrosRoad95. That's it for now. ?❄Happy Holidays and all the best to you in 2019! ? -- MTA Team1 point
-
Fora o que o @Lord Henry e o @DNL291 comentou, com o que você aprendeu, tente fazer códigos básicos parar começar a enteder a lógica do código. Outra coisa que é boa é você pegar códigos da internet e tentar ler, qual é a função dela, entre outras coisas..1 point
-
Estude lógica de programação e algorítmos primeiro. Recomendo esse tutorial: https://www.youtube.com/watch?v=M2Af7gkbbro&list=PLHz_AreHm4dmSj0MHol_aoNYCSGFqvfXV&index=2&t=201 point
-
Estude a lógica da programação. Ter zero de conhecimento vai dificultar muito as coisas no começo. Saiba primeiro o básico, depois de estar mais familiarizado com a programação você vai estudar e entender a wiki do MTA melhor. E principalmente, aprenda sobre a linguagem Lua, aqui alguns links úteis pra você: https://www.lua.org/lua-br.html http://lua-users.org/wiki/ https://www.tutorialspoint.com/lua/1 point
-
Eu faria só a marker de entrar no trabalho no lado server, as markers da missão te recomendo deixar no lado client. Eu editei o script e deixei da forma que eu faria, espero que você entenda a lógica do código e aprenda a fazer nesse mesmo padrão (que você pode utilizar para outros tipos trabalhos). Server: local StartEmprego02 = createMarker (775.66833496094, -2138.0109863281, 36.464061737061 -1, "cylinder", 1.2, 0 ,26 ,255, 95) -- Local Onde Pega O Emprego ------------------------------------------------------------------------------------------------------------------------------------------------------------ local LetraTEmprego02 = createBlipAttachedTo ( StartEmprego02, 23 ) -- Letra T setBlipVisibleDistance( LetraTEmprego02 , 700) -- Distancia Letra T "200" = 200 Metros Pra Ficar Visivel ------------------------------------------------------------------------------------------------------------------------------------------------------------ function HitarMarkerJobEmprego02 ( ThePlayer, d ) if getElementType(ThePlayer) == "player" and d and isPedInVehicle(ThePlayer) ~= true then outputChatBox("#ffffff[ #001AFFTrabalho De Traficante #ffffff] - #FFFFFFDigite#001AFF/trafico #ffffff- Para pegar as drogas!", ThePlayer, 255, 255, 255, true) end end addEventHandler("onMarkerHit", StartEmprego02, HitarMarkerJobEmprego02) ------------------------------------------------------------------------------------------------------------------------------------------------------------ local vehEmprego02 = {} function ComecoDeTudoEmprego02 (source) if isElementWithinMarker(source, StartEmprego02) and isPedInVehicle(source) ~= true and getElementDimension(source) == getElementDimension(StartEmprego02) then if vehEmprego02[source] and isElement( vehEmprego02[source] ) then destroyElement ( vehEmprego02[source] ) end local x,y,z = getElementPosition(source) setElementData( source, "Trabalho", "traficante de drogas" ) vehEmprego02[source] = createVehicle(482, 818.57098388672, -2143.6784667969, 35.606742858887) setVehicleLocked(vehEmprego02[source],true) warpPedIntoVehicle ( source, vehEmprego02[source] ) setPlayerWantedLevel( source, 1 ) triggerClientEvent( player, "traficante:onRequestDoAction", player, "create" ) outputChatBox("#ffffff[ #001AFFTrabalho #ffffff] - #FFFFFFAgora Você É Um Traficante", source, 255, 255, 255, true) -- Mensagem Apos Pegar O Emprego outputChatBox("#ffffff[ #001AFFTrabalho #ffffff] - #FFFFFFLeve a Van até o Local Indicado no Mapa", source, 255, 255, 255, true) outputChatBox("#ffffff[ #001AFFTrabalho #ffffff] - #FFFFFFSe você for pego pela policia será preso! Então tome cuidado.", source, 255, 255, 255, true) -- Mensagem Apos Pegar O Emprego local vehOwner = source addEventHandler( "onVehicleExplode", vehEmprego02[source], function() removePlayerFromJob( vehOwner, source, true ) outputChatBox( "#ffffff[ #001AFFTrabalho #ffffff] - O seu veículo explodiu e você perdeu o emprego!", vehOwner, 230, 0, 0 ) end ) end end addCommandHandler ( "trafico", ComecoDeTudoEmprego02 ) -- Comando Pra Pegar O Emprego addEvent( "traficante:onPlayerFinishMission", true ) addEventHandler("traficante:onPlayerFinishMission", root, function() givePlayerMoney(client, 200) outputChatBox("#ffffff[ #001AFFTrabalho #ffffff] - #FFFFFFEntrega Finalizada, Você recebeu R$200.",client,0,0,0,true) -- Mensagem Apos Finalizar O Emprego removePlayerFromJob( client, vehEmprego02[client] ) end ) ------------------------------------------------------------------------------------------------------------------------------------------------------------ function SaiuDoEmprego02 (player) if (vehEmprego02[player]) and isElement(vehEmprego02[player]) then removePlayerFromJob( player, vehEmprego02[player], true ) outputChatBox ("#ffffff[#001AFFTrabalho #ffffff] - #FFFFFFVocê Saiu Da Van E A Droga Foi Presa.", player ,0,0,0,true) -- Perder O Emprego Apos Sair Do Veiculo end end addEventHandler ( "onVehicleExit", resourceRoot, SaiuDoEmprego02 ) ------------------------------------------------------------------------------------------------------------------------------------------------------------ function MorreuNoEmprego02 ( ammo, attacker, weapon, bodypart ) if isElement(vehEmprego02[source]) then removePlayerFromJob( source, vehEmprego02[source], true ) outputChatBox ("#ffffff[ #001AFFTrabalho #ffffff] - #FFFFFFVoce Morreu e Perdeu o Emprego", source ,0,0,0,true) -- Perder O Emprego Apos Morrer end end addEventHandler ( "onPlayerWasted", getRootElement(), MorreuNoEmprego02 ) ------------------------------------------------------------------------------------------------------------------------------------------------------------ function SaiuDoServerEmprego02 ( quitType ) if isElement(vehEmprego02[source]) then destroyElement (vehEmprego02[source]) -- Destruir Veiculo Apos Jogador Sair Do Servidor No Emprego end end addEventHandler ( "onPlayerQuit", getRootElement(), SaiuDoServerEmprego02 ) function removePlayerFromJob( player, pVeh, removeFromClient ) if isElement(player) and isElement(pVeh) then setElementData( player, "Trabalho", nil ) destroyElement( pVeh ) if removeFromClient then triggerClientEvent( player, "traficante:onRequestDoAction", player, "destroy" ) end end end local _destroyElement = destroyElement function destroyElement(elem) if isElement(elem) then return _destroyElement(elem) end return false end ------------------------------------------------------------------------------------------------------------------------------------------------------------ Client local traficante_locations = { { 1135.3686523438, -2004.0344238281, 69.0078125 }, { 1130, -2010, 69 } --{ x, y, z }, --{ x, y, z }, --{ x, y, z } } local traficante = {} function onRequestDoActionFunc ( actionstr ) if actionstr == "create" then createLocation( 1 ) elseif actionstr == "destroy" then destroyElement( traficante.StopEmprego02 ) destroyElement( traficante.BlipFinalEmprego02 ) traficante.StopEmprego02, traficante.BlipFinalEmprego02 = nil, nil end end addEvent( "traficante:onRequestDoAction", true ) addEventHandler( "traficante:onRequestDoAction", root, onRequestDoActionFunc ) function FimDeTudoEmprego02 () if traficante.StopEmprego02 and isElementWithinMarker(localPlayer, traficante.StopEmprego02) and getElementData( localPlayer, "trabalho" ) == "traficante de drogas" then if indexID == #traficante_locations then indexID = nil destroyElement( traficante.StopEmprego02 ) destroyElement( traficante.BlipFinalEmprego02 ) traficante.StopEmprego02, traficante.BlipFinalEmprego02 = nil, nil return triggerServerEvent( "traficante:onPlayerFinishMission", localPlayer ) end outputChatBox( "#ffffff[ #001AFFTrabalho #ffffff] - Outra entrega disponível, leve a van até o local", 0,0,0,true ) createLocation( indexID + 1 ) end end addCommandHandler ( "entregar", FimDeTudoEmprego02 ) function AvisoEntregaFimEmprego02 (hitElement, dim) if isPedInVehicle(hitElement) and hitElement == localPlayer and dim and source == traficante.StopEmprego02 then outputChatBox("#ffffff[ #001AFFTrabalho #ffffff] - #FFFFFFDigite #001AFF/entregar #FFFFFFPara Concluir o Trabalho",0,0,0,true) end end addEventHandler( "onClientMarkerHit", resourceRoot, AvisoEntregaFimEmprego02 ) function createLocation( id ) indexID = tonumber(id) or 1 destroyElement( traficante.StopEmprego02 ) destroyElement( traficante.BlipFinalEmprego02 ) local x,y,z = unpack( markerTruck[indexID] ) traficante.StopEmprego02 = createMarker( x, y, z, "cylinder", 7, 0 ,26 ,255, 95 ) traficante.BlipFinalEmprego02 = createBlipAttachedTo( traficante.StopEmprego02, 0 ) return indexID end local _destroyElement = destroyElement function destroyElement(elem) if isElement(elem) then return _destroyElement(elem) end -- return false end As coordenadas basta você adicionar na tabela traficante_locations. Não testei o código em nenhum momento, então pode haver erros.1 point
-
1 point
-
E para evitar que o veículo exploda, que é o que ocorre quando a hp é inferior a 250, use: setElementHealth( vehicle, 250 ).1 point
-
I would recommend using recreating the rendertarget when you switch to MTAs window https://wiki.multitheftauto.com/wiki/OnClientRestore1 point
-
Tá, vamos primeiramente entender a lógica do que você precisa fazer. O veículo bate em algo e perde HP. O evento que ativa toda vez que um veículo toma dano é o onVehicleDamage. Nesse evento, verifica quanto de HP o veículo possui com getElementHealth. Se o veículo estiver com menos de 250 de vida, então: Blinda o veículo e desliga o motor. Se o jogador usar algum comando pra ligar o motor, verifica a vida do veículo de novo. Se a vida do veículo ainda estiver com menos de 250, volta a desligar o motor. Se o jogador sair e entrar no veículo novamente, verifica a vida do veículo ao entrar no veículo com o evento onVehicleEnter. Se a vida do veículo ainda estiver com menos de 250, blinda o veículo e desliga o motor novamente. Se a vida do veículo em qualquer um dos casos acima for maior que 250, desblinda o veículo e permite que ligue o motor normalmente. Agora vamos programar isso, em partes. (server-side) function vehicleHPVerify (loss) -- loss é a quantidade de HP que o veículo perdeu nesta batida. Não é a vida que ele possui. local thePlayer = getVehicleController (source) -- thePlayer é o motorista do veículo. Pode ser nulo em casos onde o jogador saiu do veículo antes da batida, portanto deve-se verificar a existencia dele antes de usá-lo. if (getElementHealth (source) < 250) then -- Se o veículo tem menos de 250 de vida, então: setVehicleDamageProof (source, true) -- Blinda o veículo. setVehicleEngineState (source, false) -- Desliga o motor do veículo. if (thePlayer) then -- Se existe um motorista no veículo, então: outputChatBox ("Seu veículo quebrou o motor. Chame um mecânico.", thePlayer) -- Mostra essa mensagem ao jogador. end end end addEventHandler ("onVehicleDamage", root, vehicleHPVerify) -- Executa esse evento sempre que algum veículo tomar dano. function vehicleEngineDisable (thePlayer, seat, jacked) if (getElementHealth (source) < 250) then -- Se o veículo que o jogador entrou tem menos de 250 de vida, então: if (seat == 0) then -- Se o jogador entrou como motorista, então: setVehicleDamageProof (source, true) -- Blinda o veículo. setVehicleEngineState (source, false) -- Desliga o motor do veículo. end else -- Se o veículo não tem menos de 250 de vida, então: setVehicleDamageProof (source, false) -- Desblinda o veículo. Mesmo se o jogador não entrar como motorista. O motor liga sozinho ao entrar em um veículo, não precisa ligá-lo aqui. end end addEventHandler ("onVehicleEnter", root, vehicleEngineDisable) -- A função a seguir só deve ser usada caso você tenha um comando /motor pra ligar/desligar o motor do veículo. function antiVehicleEngine (cmd) if (cmd == "motor") then local theVehicle = getPlayerOccupiedVehicle (source) -- theVehicle é igual ao veículo que o jogador que executou o comando está. Será false se ele estiver a pé. if (theVehicle) then -- Se o jogador que executou o comando está em um veículo, então: if (getPedOccupiedVehicleSeat (source) == 0) then -- Se o jogador que executou o comando for o motorista, então: if (getElementHealth (theVehicle) < 250) then -- Se o veículo que o jogador está tem menos de 250 de vida, então: cancelEvent() -- Cancela o comando /motor. outputChatBox ("O motor falhou.", source) -- Manda essa mensagem ao jogador. setVehicleEngineState (theVehicle, false) -- Desliga o motor do veículo. end end end end end addEventHandler ("onPlayerCommand", root, antiVehicleEngine) -- Executa essa função quando alguém executar algum comando. (mandar mensagens no chat também chama essa função, pois o jogador na verdade está usando /say ao fazer isso) (não testado)1 point
-
1 point
-
1 point
-
1 point
-
ولله يا اخي شي يحرق , يسرق الأكواد هوا و يجي يتهمني اني سارقها و يقول ان الجريد ليست حقي هوا حق المنشور , ولله اي انسان عاقل يقدر يميز بين الأتنين و يساعد في المواضيع باكواد من مودات اخري ذي مود شات العقرب و مود احتلال تابل و مودات اخري , المشكله انو فاكرنا اغبيه و لما يجي يتكلم يتكلم مثل الطفل و يقولك عمره 18 سنه , بلله شفت حد عمره 18 سنه يقول الناس صدقوني ذا كذاب و شغل الستات الي تشوفها في افلام المصريه القديمه الي تكون قاتله حد و تقعد تترجا الناس تصدقها انها ما قتلتو صراحه شي يحرق الدم تسلم يسطا هيمو طرح الجريد ليست قريب بعد ما اخلص امتحاناتي ناقص شويه فانكشنات و اخلصو1 point
