Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 22/10/20 in all areas

  1. Quando for inserir um código, use o bagulhinho de programação que tem nas opções de formatação, está representado por "< >" Veja se funciona assim: --------- Variaveis local PedLoja = createPed(0, 438.416, -1504.399, 18.459) setElementRotation(PedLoja, -0, 0, 284.044) setElementFrozen(PedLoja, true) local BlipLoja = createBlipAttachedTo(PedLoja, 17) local BlipLojaAssalta = createBlipAttachedTo(PedLoja, 18) setElementVisibleTo(BlipLojaAssalta, root, false) local DinheiroAdicionado = 2000 --Dinheiro roubado quando assaltar ---- Sistema function IniciarAssalto (Ped) if Ped == PedLoja then local arma = getPedWeapon ( source ) if arma == 0 or arma == 1 or arma == 2 or arma == 3 or arma == 4 or arma == 5 or arma == 6 or arma == 7 or arma == 8 or arma == 9 or arma == 16 or arma == 17 or arma == 18 or arma == 39 or arma == 41 or arma == 42 or arma == 43 or arma == 10 or arma == 11 or arma == 12 or arma == 14 or arma == 15 or arma == 44 or arma == 45 or arma == 46 or arma == 40 then return end if getElementData(source, "TS:Assaltando") then return end if getElementData(Ped, "TS:Assaltando") then triggerClientEvent(source, "addNotification", root, "#0037FF✘#ffffffINFO#0037FF✘➺ #ffffffEssa loja foi assaltada recentemente!", "info") return end local x, y, z = getElementPosition( source ) local x1, y1, z1 = getElementPosition( Ped ) local distance = getDistanceBetweenPoints3D( x, y, z, x1, y1, z1 ) if distance >= 3 then return end triggerClientEvent(source, "TS:PainelAssalto2", source) end end addEventHandler ("onPlayerTarget", root, IniciarAssalto) function ComecarAAssaltar (source) if getElementData(source, "TS:Assaltando") then return end local arma = getPedWeapon ( source ) if arma == 0 or arma == 1 or arma == 2 or arma == 3 or arma == 4 or arma == 5 or arma == 6 or arma == 7 or arma == 8 or arma == 9 or arma == 16 or arma == 17 or arma == 18 or arma == 39 or arma == 41 or arma == 42 or arma == 43 or arma == 10 or arma == 11 or arma == 12 or arma == 14 or arma == 15 or arma == 44 or arma == 45 or arma == 46 or arma == 40 then return end for id, Policial in ipairs(getElementsByType("player")) do if isObjectInACLGroup ( "user." ..getAccountName (getPlayerAccount(Policial)), aclGetGroup ( "ComandosPolicia" ) ) then triggerClientEvent(Policial, "TS:MensagemPolicial2", Policial) setElementData(source, "TS:Assaltando", true) setPedAnimation(source, "SHOP", "ROB_Loop", -1, false) setPedAnimation(PedLoja, "SHOP", "SHP_Rob_GiveCash", -1, false) setElementFrozen(source, true) toggleAllControls(source, false) setElementPosition(source, 439.935, -1504.115, 18.459) setElementRotation(source, -0, 0, 100.156) setElementData(PedLoja, "TS:Assaltando", true) setPedAnimation(source, "SHOP", "ROB_Loop", -1, false) setPedAnimation(source, "SHOP", "ROB_Loop", -1, false) setPedAnimation(source, "SHOP", "ROB_Loop", -1, false) setPedAnimation(source, "SHOP", "ROB_Loop", -1, false) setPedAnimation(source, "SHOP", "ROB_Loop", -1, false) LojaAssaltada(source) setTimer(function() setPedAnimation(source, nil) setPedAnimation(PedLoja, nil) setElementFrozen(source, false) toggleAllControls(source, true) local Dinheiro = getPlayerMoney ( source ) setPlayerMoney (source, Dinheiro + DinheiroAdicionado ) setElementData(source, "TS:Assaltando", false) end, 1*60000, 1) end end end addEvent("TS:IniciarAssalto2", true) addEventHandler("TS:IniciarAssalto2", root, ComecarAAssaltar) function LojaAssaltada(source) setElementVisibleTo(BlipLoja, root, false) setElementVisibleTo(BlipLojaAssalta, root, true) setTimer(function() setElementVisibleTo(BlipLoja, root, true) setElementVisibleTo(BlipLojaAssalta, root, false) setElementData(PedLoja, "TS:Assaltando", false) end, 7*60000, 1 ) end A identação tá meio porca pq vc postou sem identação, só tentei dar uma melhorada mas to com preguiça kkk Se ajudei dá um likezin aí
    1 point
  2. Hi, use onClientPlayerDamage event, check if players animation is this one when he is under the vehicle (couldn't find it quickly, sorry). If so - cancelEvent(). ^This will also cancel being beaten by another player if you are on the ground. There is damage_causing parameter given by onClientPlayerDamage event. Check if here for its id, then cancel the event.
    1 point
  3. 1 point
  4. It's already being worked on.. see https://github.com/multitheftauto/mtasa-blue/pull/1684 (new ID's for objects) and https://github.com/multitheftauto/mtasa-blue/pull/1701 (vehicles).. it's possible that it will be merged and released soon, during 1.5.8's lifespan, like with so many major features.
    1 point
  5. Los Santos Roleplay What is Sunrise Gaming? Sunrise Gaming is a very new community founded at the start of March. Our discord server went public on the 17th of March, 2020. We are a community who are currently setting up a Multi Theft Auto (Medium) Roleplay server. Although we'd like to start afresh with new scripts and such, we don't have the resources or the time to and do not really see the benefit of recreating an entire game mode from scratch when there are already amazing opensource resources out there for us to use as the core of our server. We currently have three figures who manage the community and steer it in the right direction. These people do all the behind the scenes work which allow the community to stay afloat and ensure that the community keeps it core values. This includes; AdamZZ. The Community Founder, does all the work keeping the community running and organised, anything from paperwork, payments or simply scouting for talent which may be beneficial to the community. Mo7. Lead Administrator. Mo focuses mainly on how the community looks. Graphics designs (Our logos and everything alike), making sure that we look formal & presentable in any situation. He also helps out with the development of the server from time to time to ensure that we are always on track to meet our deadlines. Walter. Another Lead Administrator, focuses mainly on development, editing any scripts we use and ensuring that the server runs optimally, minimising lag. Walter also focuses on development of unique scripts which are implemented into the already existing scripts we use. All three of the people mentioned above are responsible for the final decisions that the community makes and ensure that their players are as happy as they can be with the results of any developments. Unique Features! As stated before, we use open-source scripts as the foundation of what the server is. Counted that the server is.. Not even a week old, we don't really have anything to share. However, we are currently working on bringing in custom scripts & maps to the server. This post will be updated over time with features which we add. How to join? Our MTA server is currently locked and in its early development stages, whilst the UCP & Forums are being setup as you read this. So, for now, the best you can do if you're interested in giving Sunrise a shot is join our discord server at; https://discord.gg/n88UhgX Staff Roster: (To be made) Official Server Rules: Thank you for your time, and we hope to see you soon - and again, sorry for the lack of detail at the moment, as stated, we are fresh out the oven right now. AdamZZ Credits: Thanks to; Emerald Gaming Development Team & any contributors to the open source version of the available resources.
    1 point
×
×
  • Create New...