i've done this before for fun, here is what i did and working,
local botslist =
{
[1] = {"Terminator"},
[2] = {"Pete"},
[3] = {"Doug"},
[4] = {"Sue"},
[5] = {"Claire"},
[6] = {"Lou"},
[7] = {"Francis"},
[8] = {"Nick",}
}
civi = createTeam ("civilians",255,12,15)
local teamsetup = {1,2,3}
function spawnhunt(source)
local pedchoice = teamsetup[1]
local x, y, z = getElementPosition ( source )
local rot = 90
local skin = math.random(28,165)
local interior = 0
local dimension = 0
local team = civi
local weapon = 31
local mode = "hunting"
ped = call(getResourceFromName("Slothbot"), "spawnBot", x, y+1, z, rot, skin, interior, dimension, team, weapon, mode, modesubject )
setElementData(ped,"name",botslist[pedchoice][1])
setElementData(ped,"squadleader",source)
setPedStat(ped,78,999)
end
addCommandHandler ( "spawnsloth", spawnhunt )