Search the Community

Showing results for tags 'killer'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • Multi Theft Auto: San Andreas 1.x
    • Support for MTA:SA 1.x
    • User Guides
    • Open Source Contributors
    • Suggestions
    • Ban appeals
  • General MTA
    • News
    • Media
    • Site/Forum/Discord/Mantis/Wiki related
    • MTA Chat
    • Other languages
  • MTA Community
    • Scripting
    • Maps
    • Resources
    • Other Creations & GTA modding
    • Competitive gameplay
    • Servers
  • Other
  • Archive
  • Private Bugtracker

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



About Me





Found 2 results

  1. Estou usando um script para dar dinheiro ao jogador que matar outro player que tenha dinheiro em mãos, a parte do dinheiro está certa, porém quando um jogador morre de fome ou possui uma morte não causada por outros players, ele ainda assim perde dinheiro, tentei usar um getElementType pro killer mas não está dando certo. function setMoneyOnWasted ( killer ) local money = getPlayerMoney(source) local perde = money/10 if getElementType( killer ) ~= "player" then cancelEvent() else if (money <=0) then cancelEvent() else takePlayerMoney ( source, perde ) end end end
  2. Hello, i was making a blip event system, where the staff give a /eventoblip command, then a blip will be created above him on the MAP (F11), and when anonyone kills him it returns a message, then show the killer name for everyone in the server by outputchatbox, and give the killer items... I'm currently using mta dayz gamemode, the most part of the script is working perfectly fine, my error is: The script identify if the admin killed himself or if anyone killed the admin, but it doesn't identify the killer's name / account... It doesn't give the killer items and doesn't give the killer's name... The script: --function blip has paremeter: theplayer function blip (thePlayer) --variable accountname receive the value of the getaccountname of the player, to see the player login accountname = getAccountName(getPlayerAccount(thePlayer)) --if the player who triggered the blip function is a supermoderator or an admin then if isObjectInACLGroup("user." .. accountname, aclGetGroup("SuperModerator")) or isObjectInACLGroup("user." .. accountname, aclGetGroup("Admin")) then --output the message "special event - kill the adm identified as a $ on the map, the winner will get random items" outputChatBox ('#00BFFF==============================================================',getRootElement(),255,255,255,true) outputChatBox ('#00BFFF【 EVENTO ESPECIAL! 】#FFFFFF Mate o ADM identificado com o #098700cifrão ($) verde no mapa',getRootElement(),255,255,255,true) outputChatBox ('#FFFFFFO vencedor ganhará itens aleátorios!',getRootElement(),255,255,255,true) outputChatBox ('#00BFFF==============================================================',getRootElement(),255,255,255,true) --attach a "$" blip to the admin or supermod who started the event blip = createBlipAttachedTo (thePlayer,52,10) --set the admin data blood to 100 setElementData(thePlayer, "blood",100) --set the admin data blip event to true setElementData(thePlayer, "eventoblip",true) --set the max slots of the admin backpack to 350 setElementData(thePlayer, "MAX_Slots",350) end end --add the command /eventoblip that triggers the function blip addCommandHandler("eventoblip", blip) --table that determine what items the player will be given local itens = { {"Banana"}, {"Kiwi"}, {"Pizza"} } --function that calculates the size of the table itens above function tamanho( tabela ) local count = 0 for a in pairs( tabela ) do count = count + 1 end return count end -- function endevent has parameters: ammo, attacker, weapon, bodypart function fimdoevento(ammo, killer, weapon, bodypart) local getData = getElementData ( source, "eventoblip" ) -- quando o cara morrer , se o cara for o que tiver iniciado o evento, e o evento ainda tiver rolando if getData then -- se tiver um assassino entao if killer then local item = itens[math.random(tamanho(itens))][1] local quantidade = 1 destroyElement(blip) setElementData(source, "eventoblip",false) setElementData(killer, item , quantidade) setElementData(source, item, quantidade) outputChatBox ('#00a5ff==============================================================',getRootElement(),255,255,255,true) outputChatBox ('#00a5ff GETDATA TRUE',getRootElement(),255,255,255,true) outputChatBox ("#00a5ff Parabéns [#FF0000" .. getPlayerName(killer) .. "#00a5ff] matou o Staff e ganhou [#ff0000 "..quantidade.."x "..item.."#00a5ff]!",getRootElement(),255,255,255,true) outputChatBox ('#00a5ff==============================================================',getRootElement(),255,255,255,true) else destroyElement(blip) setElementData(source, "eventoblip",false) outputChatBox ('#00a5ff==============================================================',getRootElement(),255,255,255,true) outputChatBox ('#00a5ff O Staff #FF0000' .. getPlayerName(source) .. ' #00a5ff se matou, o evento irá reiniciar',getRootElement(),255,255,255,true) outputChatBox ('#00a5ff==============================================================',getRootElement(),255,255,255,true) end end end --add an event handler of type onplayerwasted, that triggers the fimdoevento (translating: endevent) function addEventHandler("onPlayerWasted", getRootElement(), fimdoevento) function finalizarevento(thePlayer) local pegaData = getElementData ( thePlayer, "eventoblip" ) accountname = getAccountName(getPlayerAccount(thePlayer)) if isObjectInACLGroup("user." .. accountname, aclGetGroup("SuperModerator")) or isObjectInACLGroup("user." .. accountname, aclGetGroup("Admin")) then if pegaData then destroyElement(blip) setElementData(thePlayer, "eventoblip",false) removeElementData(thePlayer,"eventoblip") outputChatBox ('#00BFFF==============================================================',getRootElement(),255,255,255,true) outputChatBox ('#FF0000【 ATENÇÃO! 】#FFFFFF O Staff finalizou o evento.',getRootElement(),255,255,255,true) outputChatBox ('#FFFFFFO ele explicará o motivo em breve!',getRootElement(),255,255,255,true) outputChatBox ('#00BFFF==============================================================',getRootElement(),255,255,255,true) setElementData(thePlayer, "blood",12000) setElementData(thePlayer, "MAX_Slots",350) else outputChatBox ('#FFFFFFO Evento não está acontecendo !!!',thePlayer,255,255,255,true) end end end addCommandHandler("finalizareventoblip", finalizarevento) The meta.xml: <meta> <info author="Gabriel Bigardi" version="1.0" type="script" name="BLIP event"/> <script src="blip.lua" type="server" /> </meta> Thanks !!!