-
Posts
385 -
Joined
-
Last visited
Everything posted by Platin
-
Hola a todos, nuevamente requiero vuestra ayuda. Como algunos saben, estuve jugando con slothbot y tenía pensado hacerme unos "MataZombies", el tema es que estos "MataZombies" no matan Zombies si no les dan en la cabeza. ¿Alguna idea de como solucionarlo?
-
Hi all and welcome. I have a problem whit my slothbots, they can spawn and that is cool. They can shoot zombies and that si cool, but, they only kill them if they shoot in his heads and that isn't cool. How to change it? Thank you all. PD: And, how to use following? hehe
-
Buen intento, pero es un problema del resource Slothbot de seguro, no detecta los equipos, da igual lo que hagas. Antes lo hacía, de seguro fue por la actualización de player a ped y eso, pero no se. EDIT Progrese, ahora no se pelean, pero desearía que me sigan, ¿qué debería de hacer? EDIT2 Todo funciona, muchas gracias. teamStaff = getTeamFromName ("Staff") setTeamFriendlyFire ( teamStaff, false ) function bot1() bots1 = exports.Slothbot:spawnBot (2919, -2051, 4, 0, 285, 0, 0, teamStaff, 25, "following", true ) end addEventHandler ( "onResourceStart", getResourceRootElement(), bot1 ) function bot2() bots2 = exports.Slothbot:spawnBot (2919, -2053, 4, 0, 115, 0, 0, teamStaff, 25, "following", true ) end addEventHandler ( "onResourceStart", getResourceRootElement(), bot2 ) function bot1haveteam() exports.Slothbot:getBotTeam (bots1) if exports.Slothbot:getBotTeam(false) then outputChatBox ( "Bots no tener equipo" ) else outputChatBox ( "Bots tener equipo" ) end end addCommandHandler("team", bot1haveteam) function weaponParty() exports.Slothbot:setBotWeapon(bots1, 25) exports.Slothbot:setBotWeapon(bots2, 25) end addCommandHandler("arma", weaponParty)
-
https://wiki.multitheftauto.com/wiki/Slothman/Slothbot
-
Haciendo pruebas con Slothbot vi que el mismo tiene unos problemas, entre ellos el que no detecta los teams y que da un error al intentar usar el setBotWeapon. Como ustedes son los pro's acá, quisiera dejar mi archivo de pruebas aquí, a ver si es error mío o algo más. function bot() bots = exports.Slothbot:spawnBot (2919, -2051, 4, 0, 285, 0, 0) -- No lo complete porque la accion que quiero que cumplan igual no la hacen. exports.Slothbot:setBotTeam (bots, "Sobrevivientes") end addEventHandler ( "onResourceStart", getResourceRootElement(), bot ) function bot2() bots2 = exports.Slothbot:spawnBot (2919, -2053, 4, 0, 115, 0, 0) exports.Slothbot:setBotTeam (bots2, "Staff") end addEventHandler ( "onResourceStart", getResourceRootElement(), bot2 ) function botTeam() -- Este lo hice para ver si los teams estaban funcionando, como funcionar funcionan, pero no se detectan. exports.Slothbot:getBotTeam (bots) if exports.Slothbot:getBotTeam(false) then outputChatBox ( "Bots no tener equipo" ) else outputChatBox ( "Bots tener equipo" ) end end addCommandHandler("team",botTeam) function weaponParty() -- En este caso, probé el poner las armas mediante un comando a los bots, probe usando source y ni bola, lo mismo con estos dos. exports.Slothbot:setBotWeapon(bots, 25) exports.Slothbot:setBotWeapon(bots2, 25) end addCommandHandler("arma",weaponParty) Bueno, por si no quedo claro, quisiera saber que si es un error mío en el código, cosa que no dudo, o si es un error del Slothbot ya que no esta updateado. Desde ya, ¡muchas gracias!
-
Vale, lo que no entendia era la linea 3. ¡Muchas gracias a los dos, funciona! Por cierto, ¿les molestaría si los subo a la community? Principalmente porque no hay ni un resource así.
-
Es que no lo comprendo.
-
Lo edité para que sea cuando le doy en la cabeza, no sirvió. Lo intente dejar para la idea que tuviste tu, solo con matarlo, tampoco funciono. ¿Alguna idea? EDIT No comprendo tu idea.
-
Hola gente, desde hace una hora intento crear este resource pero mi cerebro no es capaz de comprender que pasa. La idea es la siguiente, crear un resource que cuando le hagas un Headshot a un zombie haga un efecto de sonido de Headshot, con 3 disponibles. client.lua function headshotsound () local sound = playSound("sounds/headshot1.mp3") or playSound("sounds/headshot2.mp3") or playSound("sounds/headshot3.mp3") setSoundVolume(sound, 0.5) end function callClientFunction(nombreFuncion, ...) local arg = { ... } if (arg[1]) then for key, value in next, arg do arg[key] = tonumber(value) or value end end loadstring("return "..nombreFuncion)()(unpack(arg)) end addEvent("onServerCallsClientFunction", true) addEventHandler("onServerCallsClientFunction", resourceRoot, callClientFunction) server.lua function headshotKill ( bodypart ) if bodypart == 9 then callClientFunction(source, "headshotsound") end end addEvent("onZombieWasted",true) addEventHandler ("OnZombieWasted", root, headshotKill) function callClientFunction(cliente, nombreFuncion, ...) local arg = { ... } if (arg[1]) then for key, value in next, arg do if (type(value) == "number") then arg[key] = tostring(value) end end end triggerClientEvent(cliente, "onServerCallsClientFunction", resourceRoot, nombreFuncion, unpack(arg or {})) end meta.xml <meta> <info author="Platin" type="script" name="Headshot Sounds" description="Simple Headshot Sound Producer" version="1.0.0" /> <script src="server.lua" type="server" /> <script src="client.lua" type="client" /> <file src="sounds/headshot1.mp3" /> <file src="sounds/headshot2.mp3" /> <file src="sounds/headshot3.mp3" /> </meta> Necesitaría algo de ayuda ya que, no me sale ningún error, pero el resource no hace absolutamente nada, desde ya, ¡gracias!
-
I did it and I make sure there isn't other resource playing whit spawns. I dont know what's the problem, really, but, Thank you guys, i gonna see it later.
-
I appear in the hospital and i dont know why.
-
The sound work, thank you, but the spawn no. I wanna create a spawn for players in Seville Beach, but I still respawning in the Freeroam Default Spawns.
-
This simple script dont work and i dont know why. function SpawnOnBeach() spawnPlayer (2938.6123046875, -2051.7548828125, 3.5480432510376, 90, math.random (7,288), 0, 0) end addEventHandler("OnPlayerJoin", getRootElement(), SpawnOnBeach) addEventHandler("OnPlayerWasted", getRootElement(), SpawnOnBeach) Anyone can help me? Thanks EDIT This dont work too function join () local sound = playSound("joinsound.mp3") end addEventHandler("onClientPlayerJoin", getRootElement(), join)
-
Venga, ahora lo pruebo y te contesto editanto el mensaje o poniendo otro.
-
Me vino la duda que si el SAMP Map Construction, los mapas creados, se pueden montar al MTA. Se que lo plantee mal, pero bueno. Espero una respuesta.
-
Perdón por no haber contestado antes, eh estado ocupado. Miren, el problema es que cumplen la función de no pelearse entre ellos y atacar a los zombies, pero también atacan a los humanos. El tema es que si los agrego al grupo de los bots lo tengo que hacer manualmente ya que siempre mis teams se bugean, no se porque. Un saludo.
-
Bueno, quería preguntar si alguien sabe si hay alguna forma de que los bot se peleen entre ellos sin grupos ya que quiero que los Sobrevivientes peleen contra los Zombies. Un saludo.
-
Me salta error con otro resource que nada que ver. Luego al rato el slothbot me dice: ERROR: slothbot/sbclient.lua:115: attempt to compare boolean whit number Eso, me salta creo que cuando me pega un zombie. (Resource: zombies) EDIT: No, justo salto de casualidad. EDITEDIT: Lo termine solucionando, igual gracias. La próxima vez si no podes ayudar, simplemente dilo, un saludo.
-
"Platin" description="Guardias Base" type="script" version="1.0" />
-
No. Si es posible usted poder explicar como hacerlo?
-
Muchas gracias, cualquier cosa, te aviso. :3 EDIT: Pusiste adEventHandler en vez de AddEventHandler, :3 EDITEDIT: No me funciona...
-
¿Dónde iría? Lo siento, soy nuevo en esto y apenas se crear alguna que otra cosa básica.
-
Hola, hay un problema que me tiene medio las pelotas por el piso, el tema, no aparece el SlothBot. Comando: Sobrevivientes = getTeamFromName ( "Sobrevivientes") function Crearbot () Guardia1 = exports [ "slothbot" ]:spawnBot ( 2174.55078125, -1764.2509765625, 19.367008209229, 285, 0, 0, 320.17120361328, Sobrevivientes, 34 ) end addEvent("onBotSpawned", true) addEventHandler("onBotSpawned",getRootElement(), function ( ) exports [ "slothbot" ]:SpawnBot(Guardia1,Sobrevivientes) end ) Si me preguntan lo saque de este post ya que no sabía como empezar: https://forum.multitheftauto.com/viewtopic.php?f=145&t=64536&p=611216&hilit=Slothbot#p611216