Search the Community

Showing results for tags 'spawn'.

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 20 results

  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
  2. Quero por outro marcador e outro spawn de carro, pra ficar 2 spawns, mais sempre buga e fica somente 1 ou buga e fica 2 marcadores e 1 veiculo, aqui esta o script com 1 spawn de carro, eu quero colocar outro spawn iniMarker = createMarker( 163.7912902832, 1808.8654785156, 16.640625, "cylinder", 3.5, 200,225,1,50) destroyM = createMarker( 127.0807723999, 1809.0919189453, 16.640625, "cylinder", 3.9, 255,255,255,100) function msg(player) outputChatBox("#FFD700»Você Pegou Um Carro Do #00FF00Exécito Brasileiro«", player, 255,255,255,true) end addEventHandler("onMarkerHit", iniMarker, msg) veh = {} function spawnVehicle(player) if isElementWithinMarker(player, iniMarker) then if veh[player] and isElement( veh[player] ) then destroyElement(veh[player]) veh[player] = nil end veh[player] = createVehicle(490, 157.12101745605, 1822.6125488281, 17.640625) warpPedIntoVehicle(player, veh[player]) end end addEventHandler("onMarkerHit", iniMarker, spawnVehicle) function msgDestroy(player) outputChatBox("Voce Destroiu o Carro Do #00FF00Exécito Brasileiro", player, 255,255,255,true) end addEventHandler("onMarkerHit", destroyM, msgDestroy) function destroy(player) if isElementWithinMarker(player, destroyM) then if isPedInVehicle(player) == true then destroyElement(veh[player]) outputChatBox("", player, 255,255,255,true) else outputChatBox("", player, 255,255,255,true) end end end addEventHandler("onMarkerHit", destroyM, destroy)
  3. Glr continuando aki meus estudos em script . oque estou fazendo de erado ? me ajudem function inicio (player) caminhao = createVehicle (515, 1194.816, -1297.128, 13.384+1) trailer = createVehicle (584, 1204.033, -1299.422, 13.386+1) outputChatBox("teste",root,255,255,255,true) end addEventHandler("setTimer", inicio, 10000, 0)
  4. Yes, I saw the wiki and it'd be awesome if I could make it real.. So I just copied it and replaced "float x float y float z" with my custom location but the server did not even find the resource itself. I had meta.xml next to it but nothing. I want as many guarding enemy slothbots as I want. Slothbot is also running but nothing.. please help! element spawnBot ( float x, float y, float z, int rotation = 0, [ int skinID = 0, int interior = 0, int dimension = 0, team theTeam = nil, int weapon = 0, string theMode = "hunting", element theModesubject = nil ] )
  5. Hi everyone, im need help ! How can I change the way spawn is that after I respond, I get parachute! How can I get the parachute spawn?
  6. I'm trying to spawn in every hospital in GTA S.A, I want the player to be born in the nearest hospital. What band could I add in my script to work this function? I'm sorry for my english xD
  7. Quisiera como pudiera hacer que mi panel cuando muera alguien se abra automaticamente ya que solo abre cuando entras al sv x,y = guiGetScreenSize() JobsWin = guiCreateWindow(x/3 - 170,y/3 - 20,200,320,"Selecciona Tu Equipo",false) teamsList = guiCreateGridList(0,22,186,255,false,JobsWin) column = guiGridListAddColumn( teamsList, "Teams", 0.85 ) for id, team in ipairs(getElementsByType("team")) do local row = guiGridListAddRow ( teamsList ) guiGridListSetItemText ( teamsList, row, 1, getTeamName ( team ), false, false ) guiGridListSetItemColor ( teamsList, row, 1, getTeamColor ( team ) ) end guiWindowSetMovable ( teamsList, false ) guiWindowSetMovable ( JobsWin, false ) guiWindowSetSizable ( teamsList, false ) guiWindowSetSizable ( JobsWin, false ) send = guiCreateButton(0,285,90,25,"Seleccionar",false,JobsWin) CloseButton = guiCreateButton(105,285,90,25,"Cerrar",false,JobsWin) guiSetVisible(JobsWin, true) showCursor(true) setTimer ( showingTeams, 1000, 1) function close() if source == CloseButton then guiSetVisible(JobsWin, false) showCursor(false) end end addEventHandler ( "onClientGUIClick", root, function ( button ) if button == "left" then if source == send then local row, col = guiGridListGetSelectedItem ( teamsList ) local teamName = guiGridListGetItemText ( teamsList, row, col ) triggerServerEvent ( "onPlayerChooseTeam", getLocalPlayer(), teamName ) end end end) addEventHandler("onClientGUIClick", getResourceRootElement(getThisResource()), close)
  8. Hello, I have a server and I would like to use a spawn by Groups I want the clan members to be able to activate and deactivate this spawn with a command. If you can help me, I thank you --------------------------------------------------------------------------------------------------------------------------- local GroupName = 'KILLERS' function onWasted () if getElementData(source,'Group') == 'KILLERS' then setTimer( function (source) setElementDimension( source, 0 ) setElementPosition( source, 2478.705078125+math.random(1,1), -1685.421875+math.random(1,1), 13.5078125 ) setElementInterior( source, 0 ) setPedArmor ( source, 100) setPedFightingStyle ( source, 5) end, 1000, 1, source) end end addEventHandler ( "onPlayerSpawn", getRootElement(), onWasted )
  9. Hello guys .So my problem is that i can't spawn added vehicle to the DayZ v0.9.9.5a . It can't spawn itself but spawned from admin panel show how much part's it need etc . But it must spawn itself .And how do i change cars names ? I know u guys can help me so let's do it . PS Sorry for bad english
  10. local Veiculos = {494} -- IDs dos Veículos. Tulio = {} function CreateVehicle (source) if getElementData (source, "Pegou", true) then outputChatBox ('#c1c1c1Aguarde #ffffff20 #ffffffsegundos para pegar novamente.',source,255,255,255,true) return end if isElement(Tulio[source]) then destroyElement (Tulio[source]) Tulio[source] = nil end local x,y,z = getElementPosition (source) local Cars = Veiculos[math.random(#Veiculos)] Tulio[source] = createVehicle (Cars,x,y,z) setElementData (source, "Pegou",true) setTimer (setElementData, 20000, 1, source, "Pegou", false) end addCommandHandler ("494", CreateVehicle) function DestroyVeiculo () destroyElement (Tulio[source]) end addEventHandler ("onPlayerLogout", root, DestroyVeiculo) addEventHandler ("onPlayerQuit", root, DestroyVeiculo) addEventHandler ("onPlayerWasted", root, DestroyVeiculo) Como eu faço com que esse script faça o veiculo do player sair do lado e não encima dele?
  11. Saludos a todos. Hace dos días que tengo el mismo problema y no puedo solucionarlo.. Resulta que tengo dos ordenadores, uno lo utilizo para mis creaciones y testear el servidor (PC sobremesa) Y el otro lo utilizo unicamente como host para el servidor. Dentro del ordenador de testeo todo funciona bien y sin errores. Pero al momento de transladar el servidor al ordenador que utilizo como host, aparece el siguiente error: ERROR: DayZ\Vehicle_spawns.lua:1805: attemp to call global 'getvehicleMaxFuel' <a nil value> Sé que es un error conocido por muchos, se forma cuando intentas spawnear un vehiculo desde el panel de admin (P) Esto genera que se malogre la base de datos del servidor (Internal.db) El problema es que como dije antes, en el servidor de testeo todo funciona perfectamente. Entonces, ¿Porque me aparece este error solo en el ordenador que utilizo como Host? He intentado con Eliminar, reemplazar y hasta reparar el Internal.db, pero hasta ahora nada ha funcionado, el error sigue apareciendo .. ¿Alguna idea?
  12. Hello guys, I would like to know if anyone could help me with the spawn and respawn system on my roleplay mta server? *When I enter the server for the first time, I'm going to the city hall next to the police station in LS. *the problem comes up when I die and instead of going to a hospital, I go to the city hall in the standard spawn. * I die in any city, I return to the LS hospital and after 1 second I go back to the normal spawn in city hall. * Another problem is that I can not remove the car spawn on the map that comes standard with mta. (On spawn locations) *** I'm using GM Play What I wanted for the server is: - Remove Spawn Cars - When I entered the server, the player went to the city hall (next to the police station) in LS. - The player will be moved to the hospital in the city from which he died. (Example): I die in the city of LV, and I go to the hospital of LV Someone to help? I'm using gm play. I'm Very beginner in script Thanks!
  13. hello community members i created a team panel with moving camera function the moving camera and panel works fine and get team player to scoreboard also working only the player spawn not working , but when it comes to select (choose)team it must spawn me at the positions , but its not working the screen go black and i stuck in the black screen below r some pics see it , Team panel pic : Black screen when i click on select team : Scoreboard works fine shows team+player : client code : --[[------------------------------------------------- Notes: > This code is using a relative image filepath. This will only work as long as the location it is from always exists, and the resource it is part of is running. To ensure it does not break, it is highly encouraged to move images into your local resource and reference them there. --]]------------------------------------------------- GUIEditor = { staticimage = {}, label = {}, button = {}, window = {}, gridlist = {}, memo = {} } addEventHandler("onClientResourceStart", resourceRoot, function() setTimer(function() startCamera() end, 2000, 1) GUIEditor.window[2] = guiCreateWindow(-3, 315, 1156, 423, "Team spawn panel", false) guiWindowSetSizable(GUIEditor.window[2], false) guiSetAlpha(GUIEditor.window[2], 1.00) guiSetProperty(GUIEditor.window[2], "CaptionColour", "FF45EE1E") GUIEditor.memo[4] = guiCreateMemo(14, 268, 223, 145, "Ballas r pro In gangs theey can take\ndown any gangs ,police or any teamsmebers the main goal of ballas is to take down groove street memebrs and there belonging\n**take down Groove and bikers*", false, GUIEditor.window[2]) GUIEditor.memo[5] = guiCreateMemo(260, 273, 245, 130, "Groove memebrs are decent and very powerfull with awsome guns skills they \ndo attack with combine members all the work is to take down mother :Oers\nBallas and bikers noobs!!\n\n**Take down Ballas and Bikers******", false, GUIEditor.window[2]) GUIEditor.memo[6] = guiCreateMemo(549, 279, 232, 128, "Bikers are newbies they dont know much about killing ,teaming so if are pro think to take down all groove and ballas then claim down your memebrs and take down kids around your hood!\n**Take down noobs around hood**", false, GUIEditor.window[2]) GUIEditor.staticimage[4] = guiCreateStaticImage(14, 28, 218, 188, ":newteampanel/img/Ballas.png", false, GUIEditor.window[2]) GUIEditor.staticimage[5] = guiCreateStaticImage(259, 34, 240, 172, ":newteampanel/img/groove.png", false, GUIEditor.window[2]) GUIEditor.staticimage[6] = guiCreateStaticImage(565, 54, 200, 152, ":newteampanel/img/bikers.png", false, GUIEditor.window[2]) GUIEditor.button[4] = guiCreateButton(838, 340, 129, 41, "Select", false, GUIEditor.window[2]) guiSetProperty(GUIEditor.button[4], "NormalTextColour", "FF787B84") GUIEditor.memo[7] = guiCreateMemo(1340, 284, 0, 20, "", false, GUIEditor.window[2]) GUIEditor.button[5] = guiCreateButton(981, 338, 126, 43, "Close", false, GUIEditor.window[2]) teamsList = guiCreateGridList(825, 51, 282, 277, false, GUIEditor.window[2]) column = guiGridListAddColumn(teamsList, "Teams", 0.9) for id, team in ipairs(getElementsByType("team")) do local row = guiGridListAddRow ( teamsList ) guiGridListSetItemText ( teamsList, row, 1, getTeamName ( team ), false, false ) guiGridListSetItemColor ( teamsList, row, 1, getTeamColor ( team ) ) end for i = 1, 3 do guiGridListAddRow(teamsList) end guiGridListSetItemText(teamsList, 0, 1, "Ballas", false, false) guiGridListSetItemColor(teamsList, 0, 1, 249, 31, 2, 255) guiGridListSetItemText(teamsList, 1, 1, "Groovestreet", false, false) guiGridListSetItemColor(teamsList, 1, 1, 6, 244, 40, 255) guiGridListSetItemText(teamsList, 2, 1, "Bikers", false, false) guiGridListSetItemColor(teamsList, 2, 1, 224, 17, 232, 255) GUIEditor.label[1] = guiCreateLabel(830, 30, 277, 24, "Team selection panel", false, GUIEditor.window[2]) guiLabelSetColor(GUIEditor.label[1], 249, 31, 2) end ) addEventHandler( 'onClientGUIClick', root, function() if source == GUIEditor.button[5] then guiSetVisible(GUIEditor.window[2], false) showCursor(false) end end ) addEventHandler( 'onClientGUIClick', root, function ( button ) if source == GUIEditor.button[4] then if button == "left" then local row, col = guiGridListGetSelectedItem ( teamsList ) local teamName = guiGridListGetItemText ( teamsList, row, col ) triggerServerEvent ( "onPlayerChooseTeam", getLocalPlayer(), teamName ) removeEventHandler("onClientPreRender", root, moveItNow) if isElement(dumpy) then destroyElement(dumpy) end destroyElement(GUIEditor.window[2]) guiSetInputEnabled(false) fadeCamera(false, 1.0, 0, 0, 0) end end end) ---MOVING CAMERA cams = { --X, Y, Z, X2, Y2, TX, TY, TZ [1]={1859, -1516, 48, 1952, -1513, 1919, -1423, 22}, --LS Skatepark [2]={2077, -1245, 46, 2077, -1148, 1987, -1200, 24}, --Glen Park [3]={1526, -1004, 63, 1484, -950, 1478, -989, 61}, --Burger King AD LS [4]={1471, -1606, 44, 1470, -1697, 1552, -1675, 21} --LSPD } pos = nil function startCamera() pos = math.random(1, #cams) local x, y, z = cams[pos][1], cams[pos][2], cams[pos][3] local tx, ty = cams[pos][4], cams[pos][5] local cx, cy, cz = cams[pos][6], cams[pos][7], cams[pos][8] setCameraMatrix(x, y, z, cx, cy, cz, 1, 90) startCamAction(x, y, z, tx, ty, 12) end function startCamAction(x, y, z, tx, ty, time) fadeCamera(true, 1.0, 0, 0, 0) dumpy = createObject(1337, x, y, z) setElementAlpha(dumpy, 0) setElementCollisionsEnabled(dumpy, false) moveObject(dumpy, time*1000, tx, ty, z) end function moveItNow() if not isElement(dumpy) then return end local x, y, z = getElementPosition(dumpy) setCameraMatrix(x, y, z, cams[pos][6], cams[pos][7], cams[pos][8], 1, 90) if (getDistanceBetweenPoints3D(x, y, z, cams[pos][4], cams[pos][5], z) <= 1) then if isElement(dumpy) then destroyElement(dumpy) end fadeCamera(false, 1.0, 0, 0, 0) setTimer(function() startCamera() end, 1200, 1) end end addEventHandler("onClientPreRender", root, moveItNow)
  14. Buenas, recién estoy aprendiendo a scriptear y hay cosas que no entiendo (aparte de tener un inglés muy malo) y quisiera saber si me pueden ayudar a hacer que al spawnear o entrar al server el jugador adquiera un estilo de pelea y forma de caminar en específico. Esto lo he sacado de la wiki pero no le he entendido nada y he intentado con los addEventHandler pero no sé como poner un estilo en específico. style = {STYLE_KUNG_FU, 6} function joinFight ( thePlayer ) if thePlayer and style then -- If player and ID are specified setPedFightingStyle ( thePlayer, style ) -- set the fighting style end end addEventHandler ('onPlayerSpawn', joinFight) -------------------------------------------------------------------------------------------------------------------------------------------------- walkStyles = { {"Old Fat Man", 123 }, } function onClientResourceStart(localPlayer) setPedWalkingStyle(localPlayer, 0) end addEventHandler("onPlayerSpawn",resourceRoot, onClientResourceStart)
  15. The resource starts, but the bot does not spawn. function bot () team = createTeam ("AngryBots", 255,255,255) exports [ "slothBot" ]:spawnBot ( 2002.5241699219,1546.9384765625,13.5859375, 90, 124, 0, 0, 29, "waiting", true ) end addCommandHandler("bots",bot) <meta> <info author="Falke" version="2.0.0" type="misc" name="angrybots" description="This script will add Silent Hill to San Andreas" /> <script src="server.lua" type="server" /> <include resource="slothbot" /> </meta> Why does not the bot spawn?? Please, help me! Neither the "nemesi1" script is working now (it worked when i played MTA years ago...). I don't know what is happening ;-; *nemesi1:
  16. Bonjour je suis en train de crée un serveur mta dayz mais j'ai un soucis les voitures spawn l'une sur l'autre que faire
  17. Hello as set in this script to zombie spawn only at the military base?
  18. Hey, just scoped around the forum and I've seen that solidsnake14 has submitted a script that upon death it respawns you to the nearest hospital: hospitalsTable = { { 1177.7994384766, -1323.0667724609, 14.088536262512 }, { -2656.2421875, 635.99420166016, 14.453125 }, { 1607.1225585938, 1817.8732910156, 10.8203125 }, } function findNearestHostpital(thePlayer) local nearest = nil local min = 999999 for key,val in pairs(hospitalsTable) do local xx,yy,zz=getElementPosition(thePlayer) local x1=val[1] local y1=val[2] local z1=val[3] local dist = getDistanceBetweenPoints2D(xx,yy,x1,y1) if distthen nearest = val min = dist end end return nearest[1],nearest[2],nearest[3] end function spawn(player) local xx,yy,zz = findNearestHostpital(player) spawnPlayer( player, xx,yy,zz) fadeCamera(player,true,3.0) end addEventHandler("onPlayerWasted", root, function() fadeCamera(source,false,6.0,0,0,0) setTimer(spawn, 8000, 1, source) end ) I have tried to use it on my server and it doesn't work, all it does is just infinite loop of camera going left and right. No debug output messages at all.
  19. Hi i'm newbie on server création and i don't know how to disable maps when i'm join the server. Thank you for the help you bring me
  20. Hello guys, i recently setuped up my own dayz server, but i need to add like more vehicles i have some vehicles.lua and there are cars adn ther x,y,z i guess its spawn how can i add more? or can some1 just give me some pre-scripted vehicles.lua so i dont have to type it or something? i want more cars on my server basicaly , which players can find and get