ex = createTeam("OMP",255,0,0)
local ex = getTeamFromName ( "OMP" )
function boss (player,comando,weaponid,skinid)
local x,y,z = getElementPosition(player)
slothbot1 = exports [ "slothbot" ]:spawnBot ( 2457.171875,-1644.5861816406,13.457942962646 , 90, 15, 0, 0, ex, 30, "waiting", true )
end
addCommandHandler("spawnbot",boss)
function rewardOnWasted ( ammo, killer, killerweapon, bodypart )
if ( killer ) and ( killer ~= source ) then
givePlayerMoney ( killer, 5 )
end
end
addEventHandler ( "onPedWasted", getRootElement(), rewardOnWasted )
Now i used this script and it works, but i still don't know why this:
createTeam ( "OMP", 0, 0, 0 )
local OMP = getTeamFromName ( "OMP" )
function bot ()
OMP = getTeamFromName ( "OMP" )
exports [ "slothbot" ]:spawnBot ( 2493.3659667969,-1667.4803466797,13.34375, 0, 15, 0, OMP, 22, "waiting", true )
end
addCommandHandler("spawnbot",bot)
didn't work.
The script load and it didn't give me an error, but the bot does not appear.
I used this:
createTeam ( "OMP", 0, 0, 0 )
local OMP = getTeamFromName ( "OMP" )
function bot ()
OMP = getTeamFromName ( "OMP" )
exports [ "slothbot" ]:spawnBot ( 2493.3659667969,-1667.4803466797,13.34375, 0, 15, 0, OMP, 22, "waiting", true )
end
addCommandHandler("spawnbot",bot)
but the bot still doesn't appear.