Jump to content

Search the Community

Showing results for tags 'viatura'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • 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
    • General
    • Multi Theft Auto 0.5r2
    • Third party GTA mods
  • Archive
    • Archived Items
    • Trash

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Gang


Location


Occupation


Interests

Found 1 result

  1. Boa noite a todos, eu sou bem leigo em Lua, e toda vez que venho aqui fico feliz com a maneira que vocês fazem a gente entender pelo menos o minimo dos scripts que estamos tentando alterar, isso é sensacional. enfim. Hoje eu to com um problema em um sistema de spawn de vtr por acl. Queria que se possível me ajudassem a alterar o que quero nele. Spawn1 = createMarker(-65.258903503418, -343.11831665039, 5.4296875 -1,"cylinder", 1.9, 0, 0, 200, 40) Destroy = createMarker(-65.258903503418, -371.39807128906, 5.4296875 -2,"cylinder", 5.0, 128, 0, 0, 99) function getPlayerFromPartialName(name) local name = name and name:gsub("#%x%x%x%x%x%x", ""):lower() or nil if name then for _, player in ipairs(getElementsByType("player")) do local name_ = getPlayerName(player):gsub("#%x%x%x%x%x%x", ""):lower() if name_:find(name, 1, true) then return player end end end end veh = {} function spawnvtr ( thePlayer, comando, nick ) setElementHealth (veh, 200000) if veh[thePlayer] and isElement( veh[thePlayer] ) then destroyElement ( veh[thePlayer] ) veh[thePlayer] = nil end local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "BOMBEIROS") ) then veh[thePlayer] = createVehicle(529, -61.04016494751, -303.79797363281, 5.3578243255615, 0, 0, 270 ) warpPedIntoVehicle ( thePlayer, veh[thePlayer] ) --exports._infobox:addNotification(thePlayer, "", "success") else outputChatBox("#FFFFFF| #E10000BOMBEIROS #FFFFFF| Somente #E10000BOMBEIROS #FFFFFFPodem Pegar Este Veiculo.",thePlayer,255,255,255, true) end end addEventHandler("onMarkerHit", Spawn1, spawnvtr) function destroyvtr ( thePlayer ) if veh[thePlayer] and isElement(veh[thePlayer]) then destroyElement (veh[thePlayer]) --exports._infobox:addNotification(thePlayer, "", "success") else end end addEventHandler("onMarkerHit", Destroy, destroyvtr) Ele é bem simples, você passa em cima de um marker ele cria um determinado veiculo, e em cima de outro marker e ele destrói. Mas tem 2 poréns eu queria que um único player conseguisse spawnar quantos veículos ele quisesse, e quando ele spawna outro veículo, o anterior some. E o outro problema é que quando o player spawna o veículo e sai do server, ele não consegue mais desespawnar. Alguém pode me ajudar a resolver? Grato a Atenção
×
×
  • Create New...