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
    • Open Source Contributors
    • Suggestions
    • Ban appeals
  • General MTA
    • News
    • Media
    • Site/Forum/Discord/Mantis/Wiki related
    • MTA Chat
    • Other languages
    • 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
  • Private Bugtracker

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start







Found 16 results

  1. queenshe

    [HELP] onPlayerJoin Spawn -.-'

    Hi, I can't put a new player on the server. I've deleted [gamemode]> [play]> play> but it still starts there. Plz help me function onWasted(totalAmmo, killer, killerWeapon, bodypart, stealth) local theWeapon = getPedWeapon (source) local theWeapon1 = getPedWeapon (source, 1) local theWeapon2 = getPedWeapon (source, 2) local theWeapon3 = getPedWeapon (source, 3) local theWeapon4 = getPedWeapon (source, 4) local theWeapon5 = getPedWeapon (source, 5) local theWeapon6 = getPedWeapon (source, 6) local theWeapon7 = getPedWeapon (source, 7) local theWeapon8 = getPedWeapon (source, 8) local theWeapon9 = getPedWeapon (source, 9) local theWeapon10 = getPedWeapon (source, 10) local theWeapon11 = getPedWeapon (source, 11) local theWeapon12 = getPedWeapon (source, 12) local weaponAmmo = getPedTotalAmmo (source) local weaponAmmo1 = getPedTotalAmmo (source, 1) local weaponAmmo2 = getPedTotalAmmo (source, 2) local weaponAmmo3 = getPedTotalAmmo (source, 3) local weaponAmmo4 = getPedTotalAmmo (source, 4) local weaponAmmo5 = getPedTotalAmmo (source, 5) local weaponAmmo6 = getPedTotalAmmo (source, 6) local weaponAmmo7 = getPedTotalAmmo (source, 7) local weaponAmmo8 = getPedTotalAmmo (source, 8) local weaponAmmo9 = getPedTotalAmmo (source, 9) local weaponAmmo10 = getPedTotalAmmo (source, 10) local weaponAmmo11 = getPedTotalAmmo (source, 11) local weaponAmmo12 = getPedTotalAmmo (source, 12) local Skiin = getPedSkin (source) fadeCamera (source, false) setTimer (setElementModel, 2000, 1, source, Skiin, true) setTimer (spawnPlayer, 1000, 1, source, 208.53065490723, -1865.7003173828, 12.215625762939, 354.97918701172, getPedSkin (source), 0, 0, getPlayerTeam(source)) setTimer (setCameraTarget, 1250, 1, source, source) setTimer (fadeCamera, 2000, 1, source, true) setTimer (giveWeapon, 2000, 1, source, theWeapon, weaponAmmo, true) setTimer (giveWeapon, 2000, 1, source, theWeapon1, weaponAmmo1, true) setTimer (giveWeapon, 2000, 1, source, theWeapon2, weaponAmmo2, true) setTimer (giveWeapon, 2000, 1, source, theWeapon3, weaponAmmo3, true) setTimer (giveWeapon, 2000, 1, source, theWeapon4, weaponAmmo4, true) setTimer (giveWeapon, 2000, 1, source, theWeapon5, weaponAmmo5, true) setTimer (giveWeapon, 2000, 1, source, theWeapon6, weaponAmmo6, true) setTimer (giveWeapon, 2000, 1, source, theWeapon7, weaponAmmo7, true) setTimer (giveWeapon, 2000, 1, source, theWeapon8, weaponAmmo8, true) setTimer (giveWeapon, 2000, 1, source, theWeapon9, weaponAmmo9, true) setTimer (giveWeapon, 2000, 1, source, theWeapon10, weaponAmmo10, true) setTimer (giveWeapon, 2000, 1, source, theWeapon11, weaponAmmo11, true) setTimer (giveWeapon, 2000, 1, source, theWeapon12, weaponAmmo12, true) end addEventHandler ("onPlayerWasted", getRootElement(), onWasted) function joinHandler() spawnPlayer(source, 208.53065490723, -1865.7003173828, 12.215625762939) fadeCamera(source, true) setCameraTarget(source, source) outputChatBox("Script Test [ON]", source) end addEventHandler("onPlayerJoin", getRootElement(), joinHandler)
  2. 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
  3. Angel Carvajal


    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)
  4. side


    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 )
  5. 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
  6. 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?
  7. 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?
  8. 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!

    [Help]Moving camera

    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)
  10. 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)
  11. 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:
  12. 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
  13. maciej123m

    Spawn zombie

    Hello as set in this script to zombie spawn only at the military base?
  14. delete.

    Respawn script not working

    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.
  15. 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
  16. 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