How would I make it so I can glue the dogs onto cars by command
function Spawndoggy (source)
local x,y,z = getElementPosition (source)
local rot= 90
local skin=79
local interior=0
local dimension=0
local team = getPlayerTeam ( source )
local weapon=0
local mode= "following"
local modesubject=source
setElementData(source, "isDogSpawned", true)
dog = call (getResourceFromName("slothbot"), "spawnBot", x, y+5, z, rot, skin, interior, dimension, team, weapon, mode, modesubject)
setTimer ( call, 5000, 1, getResourceFromName("slothbot"), "setBotAttackEnabled",dog,false )
end
addCommandHandler("spawndog", Spawndoggy)
function dogA(source)
if not getElementData(source, "isDogSpawned") then
outputChatBox("Spawn one dog first! Use /spawndog", source)
else
outputChatBox("Your dog will start attacking now!", source)
setTimer ( call, 5000, 1, getResourceFromName("slothbot"), "setBotAttackEnabled",dog, true )
end
end
addCommandHandler("Dogattack", dogA)
I have that sceript And glue2