Jump to content

DRW

Members
  • Posts

    364
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by DRW

  1. That usually means the file is not using UTF-8 encoding. Get something like Notepad++ and try this:
  2. That's because windows are an entirely different model, they are in no way bound to the building. You should search the object ID and use removeWorldObject.
  3. Are you planning to add translations to the debugscript mode? It would be a great idea, most of the people I've encountered in the "other languages" section were not able to understand what the debugscript meant.
  4. https://wiki.multitheftauto.com/wiki/DxDrawCircle This might do the trick.
  5. Hello, I'm having a little doubt. I have recently bought my own domain: http://znext.es, as you might already see, nginx shows up. That's because I'm using my MTA external download server at the same machine and I've pointed the domain's DNS to my dedi. I want to use Apache since it's the best option when using PHPBB3, but I don't have any idea if it would work alongside nginx and my external webserver and I don't want to risk the stability of my server if I start tweaking things without enough knowledge. There is no problem if I have to use nginx but as far as I know the wiki's external web server tutorial is meant only for servers that aren't using nginx for any other websites. Any recommendation or clue? Thank you for your time.
  6. MadnessReloaded's Objective Indicators Events have never been that easy to find. This resource lets you place on-screen markers that will describe the name or purpose of the indicator and the distance between you and the indicator. It's pretty customizable, lets you create markers with different positions (duh), names, colors, images and minimum and maximum display distances. It distinguishes between metres and kilometres (although I know distance is measured by units, it's just an extra) You can place multiple indicators: You can use these clientsided exported functions: createObjectiveIndicator (x,y,z,name[,maxdistance,mindistance,r,g,b,image]) --RETURNS THE INDICATOR'S ID destroyObjectiveIndicator (id) -- THE ID SHOULD BE RETURNED BY CREATEOBJECTIVEINDICATOR drawObjectiveIndicator (x,y,z,name[,maxdistance,mindistance,r,g,b,image]) -- DRAW IT ONCLIENTRENDER. Link: https://community.multitheftauto.com/index.php?p=resources&s=details&id=15069
  7. Estoy bastante seguro de que setCameraClip sólo funciona en objetos del mundo, es decir, el mapa original de GTA, todo objeto creado por createObject no es afectado por setCameraClip. Me temo que no puedes hacer nada.
  8. DRW

    Client Wasted

    if killer then killText = getPlayerName(killer) .. " killed you" else killText = killText .. " commit suicide " end Here, you're trying to get the player name of the killer, you can't get the player name of a ped, obviously. Try using this: if killer and isElement (killer) then if getElementType(killer)=="player" then killText = getPlayerName(killer) .. " killed you" elseif getElementType (killer)=="ped" and getElementData (killer,"zombie") then killText = "A zombie killed you" elseif killer == localPlayer then killText = "You've committed suicide." else killText = "You've died." end else killText = "You've died." end And by the way, that sure had given you a debugscript error, next time, try to analyze those errors and post something related to it so people shouldn't have to read your entire script just to get into context.
  9. ¡Buenas a todos! Soy MadnessReloaded, el actual creador de ZNEXT, y os voy a mostrar por qué nuestros usuarios lo consideran el mejor servidor de zombies hispano. ZNEXT: Zombies es un servidor RPG que, aunque empezó a principios de 2015, tuvo que cerrar sus puertas hace poco menos de un año, sólo para volver renovado y con una cantidad de características de una gran calidad incomparable. ¿QUÉ NOS HACE ESPECIALES? Somos competentes, el 90% de lo que tenemos está totalmente creado por nosotros, hemos dedicado muchas horas a hacerlo lo más especial posible, y todos nuestros usuarios lo notan. ZOMBIES: El sistema de IA de zombies que tenemos está desarrollado en su totalidad por el equipo de ZNEXT, con varios tipos de zombies, desde los normales, a los explosivos, corredores y el famoso "Mr. Motosierras" que tan nerviosos pone a nuestros jugadores. BANDIDOS: El buque insignia de ZNEXT, tenemos IA desarrollada por nosotros, con bases conquistables repletas de enemigos con rifles de asalto, francotirador, subfusiles, bosses, con una temática muy similar a Fallout. Si los pruebas, no dejarás de ir con gente a conquistarlas, es lo más divertido. Actualmente tenemos unas 9 bases de diferentes tamaños (¡llegan a 400m2!), cada una con sus dificultades y bandidos especiales (Centinela, Recluta, Gladiador...) y recompensas al conquistar diferentes. BOSSES: Y cuando nos referimos a Bosses, nos referimos a bosses de verdad, no a un Némesis facilito. Prueba tu valía contra bosses como el Rey de Los Bandidos (Aliado con los bandidos) y el Bio-Corruptor (Aliado con los zombies). CLANES Y GUERRAS: Tenemos emocionantes sistemas de clanes incluyendo toma de zonas y guerras de clanes que mantienen enganchado y junto a todo el servidor. Facciones diferentes luchan por el control de Las Venturas y muy frecuentemente usan diplomacia entre clanes para controlar sus zonas. Tenemos ya clanes con más de 80 jugadores y van creciendo. Éstos clanes pueden llegar a ser oficiales a los 55 miembros y 3.000.000$ de ingresos. CLASES: Cuando llegues a 1000EXP, podrás tener clases, las cuales puedes usar contra bandidos: El Recon es capaz de usar la cámara que hace tracking de los bandidos cercanos y revela su posición, el Ingeniero es capaz de crear barreras de una duración limitada para protegerte de disparos, el Médico es capaz de curar a otros jugadores y además curarse a sí mismo. ACTUALIZACIONES DIARIAS: Actualizamos cada día algo, siempre mejorando la estabilidad del servidor. Nunca te vas a quedar sin cosas que hacer. ¡...y mucho más! VÍDEOS DEL SERVIDOR CONTACTO FACEBOOK: https://www.facebook.com/znextservers IP: mtasa://192.99.71.81 E-MAIL: [email protected] ¡TE ESPERAMOS!
  10. En primer lugar deberías usar: addEventHandler ("onPlayerLogin",root,funciondelogin) Debido a que no sé si sólo quieres que le aparezca al usuario que se loguea o a todos, te pondré ambas y ya. Lo siguiente va por parte del servidor: -- PARA TODOS LOS JUGADORES function funciondelogin(cuentaanterior,cuentaactual) nombreCuenta = getAccountName (cuentaactual) --Coge el nombre de cuenta del que se ha logueado if isObjectInACLGroup ("user."..nombreCuenta,aclGetGroup ("Admin")) then --Miro a ver si su cuenta está incluída en la lista de admins. for indice,jugadores in ipairs (getElementsByType("player")) do --Cojo todos los jugadores y ejecuto la función para cada uno. triggerClientEvent (jugadores,"mostraraviso",source) --Envía al jugador un evento de cliente end end end -- PARA EL STAFF QUE SE LOGUEA SOLAMENTE function funciondelogin(cuentaanterior,cuentaactual) nombreCuenta = getAccountName (cuentaactual) --Coge el nombre de cuenta del que se ha logueado if isObjectInACLGroup ("user."..nombreCuenta,aclGetGroup ("Admin")) then --Miro a ver si su cuenta está incluída en la lista de admins. triggerClientEvent (source,"mostraraviso",source) --Envía al jugador un evento de cliente end end Esto por el cliente: local nombre function dibujarimagen () -- x,y son coordenadas, w,h es el tamaño. Usa GUIEditor para utilizar dxDrawImage si te parece algo dificil ponerlo en escala a la resolución del jugador. dxDrawImage ("imagen.png",x,y,w,h) dxDrawText (nombre.." se ha conectado etc etc etc",x,y,w,h) end addEvent ("mostraraviso",true) --Añadimos el evento y le damos el "true" para que se pueda ejecutar desde fuera addEventHandler ("mostraraviso",root,function() --Aqui juntamos el evento con la funcion nombre = getPlayerName (source) --Cogemos el nombre del jugador addEventHandler ("onClientRender",root,dibujarimagen) --onClientRender sirve para que la imagen, por ejemplo, se ponga a cada fps. Así funciona dxDraw. local musica = playSound ("sonido.wav") --Sonido setTimer (function() --Temporizador de 3000 milisegundos stopSound (musica) --paramos la musica removeEventHandler ("onClientRender",root,dibujarimagen) --Quitamos el evento que dibuja la imagen end,3000,1) end)
  11. DRW

    Speedometer

    Then use the code I've shown you above and: local logo = false bindKey ("l","down",function() logo = not logo end) -- this will go onClientRender: if logo then image = "image1.png" -- logo 1 filepath else image = "image2.png" -- logo 2 filepath end dxDrawImage (x,y,w,h,image,...)
  12. DRW

    Speedometer

    Let me get it straight. You want to check if your vehicle has its override lights on, but you only check it when you press "L", right? In that case just use: -- Everything here should be onClientRender local lights function () local vehicle = getPedOccupiedVehicle (localPlayer) if vehicle then --Is localPlayer in vehicle? lights = getVehicleOverrideLights (vehicle) --Here you get the state of the overridelights else lights = false --if there is no vehicle, false end end
  13. I have tried to decipher your english and I´m pretty sure you mean that every time you restart the server, everything you started before does not start. This happens because you haven't used mtaserver.conf to specify the startup resources. Go to the server directory: Server/mods/deathmatch and click on "mtaserver.conf". There should be some lines with something along these lines: <resource src="admin" startup="1" protected="0" /> <resource src="defaultstats" startup="1" protected="0" /> <resource src="helpmanager" startup="1" protected="0" /> <resource src="joinquit" startup="1" protected="0" /> <resource src="mapcycler" startup="1" protected="0" /> <resource src="mapmanager" startup="1" protected="0" /> <resource src="parachute" startup="1" protected="0" /> <resource src="resourcebrowser" startup="1" protected="1" default="true" /> <resource src="resourcemanager" startup="1" protected="1" /> <resource src="scoreboard" startup="1" protected="0" /> <resource src="spawnmanager" startup="1" protected="0" /> <resource src="voice" startup="1" protected="0" /> <resource src="votemanager" startup="1" protected="0" /> <resource src="webadmin" startup="1" protected="0" /> <resource src="play" startup="1" protected="0" /> Well, the thing after the "src" is the resource name, put the names of the resources you want to activate on startup there, then everything will work just fine.
  14. When he´s changing the position? You mean when he moves, when you use setElementPosition or when he falls? If you´re talking about movement, you could use bindKey (), if you´re talking about setElementPosition(), you need to trigger an event, if you're talking about falling, use isPedOnGround() and a timer. giveWeapon () to give him the parachute and setElementPosition (x,y,z+100) to get the player be 100 units above his actual position (x,y,z obviously being his position parameters using getElementPosition()). I think you should be more specific.
  15. Nah, I've only got my server running there. You've just saved me 10$ monthly which are going directly to supporting MTA. Thank you very much.
  16. Oh, I see, it sort of makes sense. In that case, 4x2.4Ghz would perform worse than 2x3.1Ghz, am I right?
  17. So, I've had my server hosted on a 1 core VPS, which obviously worked really bad, so we've updated to two cores (struggling to have 100 players in it), still bad, so yesterday I've directly moved to 4x2.4GHz, and the thing is... It's working all the same, still can't handle 100 players. I mean, the server performance stats show us that we're using like 10-25% CPU, but look at this: It goes up to 145%. This is really confusing me. Is it possible that the server is not using all of our cores? Because at least I did not notice any performance improvement at all and our RAM capacity is overkill.
  18. setPedWalkingStyle () para cambiar la forma de correr de un ped, sólo en caso de que se use setPedControlState para moverlos. En caso de Slothbot, si estoy en lo cierto, usa setPedAnimation, por tanto, tienes que mirar la animación que usa por ahí. Hay diferentes nombres por bloque y animación, en ese caso será similar a setPedAnimation (bot,"ped","run") o algo así, si quieres que anden lo más similar a un zombie, usar setPedAnimation (bot,"ped","run_old"). Eso creo que solo lo puedes cambiar entrando directamente en el script slothbot y editarlo. Te recomiendo mirar en la wiki tanto el setPedWalkingStyle como el setPedAnimation, y además, te recomiendo crear tus propios bots porque yo he estado usando tanto slothbot como los zombies de slothman y he acabado creándolos de nuevo porque se estaban comiendo el procesador del server.
  19. Vale, entonces necesitas: function funcion(jugador,comando,parametro1) end addCommandHandler ("modopasivo",funcion)--asigna la funcion al comando "modopasivo" Dentro de esta funcion mira si está activado y usa setElementData (jugador,"modoPasivo",true) --Define al jugador si está en modo pasivo, true si lo está, false si no. para poder identificar al jugador con el modo pasivo. Ahora, para desactivar la capacidad de disparar usa: addEventHandler ("onElementDataChange",root,function(nombre) --Ocurre cuando se le hace un setElementData a alguien local modopasivo = getElementData (source,"modoPasivo") --Mira a ver si el modoPasivo está activado if nombre == "modoPasivo" then --Si el elementData que se ha cambiado es modoPasivo... if modopasivo then -- y modopasivo está activado toggleControl (jugador,"fire",false) --desactiva la capacidad de disparar. else --si no está activado toggleControl (jugador,"fire",true) --activa la capacidad de disparar end end end) --Mirate la lista de control names en la wiki de MTA Y por último function invencibilidadPasivo (atacante) if getElementData (source,"modoPasivo") then --¿Está en modo pasivo? cancelEvent() --Sí, pues cancela el daño. end end addEventHandler ("onClientPlayerDamage",root,invencibilidadPasivo) --Asigna la funcion a solo cuando un jugador se daña --ESTA FUNCIÓN ES DE CLIENTE
  20. DRW

    Santa Hat

    Use bone_attach's exported functions. https://community.multitheftauto.com/index.php?p=resources&s=details&id=2540
  21. We're using an OVH VPS Cloud RAM 3: - 4x2.4Ghz CPU - 24GB RAM (Did not know MTA used so little RAM, I would have switched to the 3.1GHz CPU edition, so this is unnecesary, will switch soon) - 100Mbps bandwidth - 100GB My resources are as optimized as they can possibly be, or at least my most resource-intensive scripts are, before fixing them we could not reach 48 players with 2 cores, but I've done everything I could and now I can host up to 100 players. The rest of the scripts are at 0.2% or lower usage. Keep in mind we're spawning around 400 bots, but we were spawning the same amount just yesterday when we still had 2 cores, same usage stats, weird.
  22. Not really, there is no function such as setWorldSoundVolume, if that's what you mean.
  23. As far as I know, those zombies use "radar areas" to create safe zones so zombies die, that would mean there is an "isInsideRadarArea" function which kills the zombies using "killPed" and also cancels the spawn of the zombies. If you can find something like: if isInsideRadarArea (area,x,y) then killPed () end Use this: if not isInsideRadarArea (area,x,y) then killPed() end In that case, you should create a radar area using: local radar = createRadarArea (x,y,width,height,r,g,b,a) setElementData (radar,"zombieProof",true) This radar area will let zombies spawn and will kill or cancel the spawn of the zombies who are not inside it.
×
×
  • Create New...