Jump to content

Slothbot set team


bosslorenz

Recommended Posts

teamLV = getTeamFromName ("Las Venturas Mafia") 
function bot1() 
    bots1 = exports.slothbot:spawnBot (2494.6000976563, 1587, 10.7, 0, 108, 0, 0, teamLV, 31,  
  
"guarding", true ) 
end 
addEventHandler ( "onResourceStart", getResourceRootElement(), bot1 ) 

Even when im on team Las Venturas Mafia , the bot still shoots me? any error sighted?

Ive got no error on debugscript

Link to comment

Have you tried changing teamLV from 'team data' to team name string? Maybe that slothbot checks team "Name" but not team "Data"?

To do so, either change line#1 with this:

teamLV = "Las Venturas Mafia" 

or change line#3 with this:

bots1 = exports.slothbot:spawnBot (2494.6000976563, 1587, 10.7, 0, 108, 0, 0, "Las Venturas Team", 31, 

Link to comment
function boss ( ) 
    local Team = createTeam ( "Las Venturas Mafia", 0, 0, 255 ) 
    local nemesi = exports [ "slothbot" ]:spawnBot ( 2494.6000976563, 1587, 10.7, 0, 108, 0, 0, Team, 38, "guarding", true ) 
    local nemesi1 = exports [ "slothbot" ]:spawnBot ( 2494.6000976563, 1587, 10.7, 0, 108, 0, 0, Team, 38, "guarding", true ) 
    local nemesi2 = exports [ "slothbot" ]:spawnBot ( 2494.6000976563, 1587, 10.7, 0, 108, 0, 0, Team, 38, "guarding", true ) 
    local nemesi3 = exports [ "slothbot" ]:spawnBot ( 2494.6000976563, 1587, 10.7, 0, 108, 0, 0, Team, 38, "guarding", true ) 
    setTimer ( 
        function ( b, b1, b2, b3 ) 
            local Team = getTeamFromName ( "Nemsis" ) 
            exports [ "slothbot" ]:setBotTeam ( b, Team ) 
            exports [ "slothbot" ]:setBotTeam ( b1, Team ) 
            exports [ "slothbot" ]:setBotTeam ( b2, Team ) 
            exports [ "slothbot" ]:setBotTeam ( b3, Team ) 
            local botTeam = exports [ "slothbot" ]:getBotTeam ( b ) 
            if ( botTeam ) then 
                outputChatBox ( "nemesi bot is on the team Nemsis" ) 
            else 
                outputChatBox ( "nemesi bot is not in a team." ) 
            end 
        end 
        ,1000, 1, nemesi, nemesi1, nemesi2, nemesi3 
    ) 
end 
addEventHandler ( "onResourceStart", getResourceRootElement(getThisResource()), boss ) 
  
     

They still kill each other, I got this script from solidsnake

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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