leobi96 Posted November 30, 2012 Share Posted November 30, 2012 hola lo que pasa esque quiero crear un guarda de seguridad que cuide mi casa o lugar donde el se encuentre que no le haga daño alos del miembros del team si no alos que no lo son, Se puede hacer o solo quedara en mi mente Link to comment
Xperia Posted November 30, 2012 Share Posted November 30, 2012 Necesitas descargar estos 2 recursos: Slothbot: https://community.multitheftauto.com/index.php?p=resources&s=details&id=672 Extrahealth: https://community.multitheftauto.com/index.php?p=resources&s=details&id=1604 Y despues usa esto, siempre en server side: team = createTeam("Clan XGN",255,255,255) slothbot = exports [ "slothbot" ]:spawnBot ( 2723.291015625,-2622.9560546875,23.25625038147, 92.179473876953, 287, 0, 0,team, 38, "guarding", chasing ) exports.extrahealth:setElementInvulnerable ( slothbot, true ) addEventHandler("onBotSpawned",getRootElement(), function ( ) setBotTeam(slothbot,team) end ) Hay pones las coordenadas que quieras y el arma, y es invencible. Por si tienes dudas: https://wiki.multitheftauto.com/wiki/Slothman/Slothbot#spawnBot Link to comment
leobi96 Posted November 30, 2012 Author Share Posted November 30, 2012 woo genial XPERIA gracias lo provare Link to comment
leobi96 Posted December 1, 2012 Author Share Posted December 1, 2012 Amigo una pregunta hay 4 cordenadas o como lo edito esque no me funciono puse las tres cordenadas normales y pero no se cual es la cuarta Link to comment
leobi96 Posted December 1, 2012 Author Share Posted December 1, 2012 Vean este es mi scriphaci lopusepero me ataca y me pongo en el mismo team y tambienme ataca que hago team = createTeam("the_Mob",255,255,255) slothbot = exports [ "slothbot" ]:spawnBot ( 2087.47266, -1603.11841, 13.38061, 92.179473876953, 163, 0, 0,team, 30, "guarding", chasing ) exports.extrahealth:setElementInvulnerable ( slothbot, true ) addEventHandler("onBotSpawned",getRootElement(), function ( ) setBotTeam(slothbot,the_Mob) end ) Link to comment
Arsilex Posted December 1, 2012 Share Posted December 1, 2012 2087.47266 = X -1603.11841 = Y 13.38061 = Z 92.179473876953 = Rotacion 163 = Modelo del skin 0 = INterior 0 = DImesion 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 ] ) Link to comment
Xperia Posted December 1, 2012 Share Posted December 1, 2012 En vez de poner "the_mob", pon team, en la linea 8. team = createTeam("the_Mob",255,255,255) slothbot = exports [ "slothbot" ]:spawnBot ( 2087.47266, -1603.11841, 13.38061, 92.179473876953, 163, 0, 0,team, 30, "guarding", chasing ) exports.extrahealth:setElementInvulnerable ( slothbot, true ) addEventHandler("onBotSpawned",getRootElement(), function ( ) setBotTeam(slothbot,team) end ) La cuarta "coornada" es la rotacion. Link to comment
leobi96 Posted December 2, 2012 Author Share Posted December 2, 2012 men no me funciona siempre me sigue atacando el bot Link to comment
NodZen Posted December 2, 2012 Share Posted December 2, 2012 team = createTeam("the_Mob",255,255,255) function Boss () slothbot = exports [ "slothbot" ]:spawnBot ( 2087.47266, -1603.11841, 13.38061, 92.179473876953, 163, 0, 0,team, 30, "guarding", chasing ) exports.extrahealth:setElementInvulnerable ( slothbot, true ) end addEventHandler("onResourceStart", getRootElement(), Boss) addEventHandler("onBotSpawned",getRootElement(), function ( ) setBotTeam(slothbot,team) getBotTeam ( slothbot ) setBotAttackEnabled(slothbot, true)-- Si quieres ponlo en false end ) Link to comment
leobi96 Posted December 2, 2012 Author Share Posted December 2, 2012 amigos tengo otra duda, no quiero que me cree el team como hago para poner un team que ya este hecho en el sv en lugar de team = createTeam que pongo team = setplayerteam o que ?? Link to comment
Recommended Posts