Jump to content

Ayuda sobre este scrip


leobi96

Recommended Posts

Posted

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

Posted

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

Posted

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

Posted

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 
    ) 

Posted
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 ] ) 

Posted

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.

Posted
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 
    ) 

Posted

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 ??

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...