Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bot = nil
- comd = nil
- local plyr = player.GetHumans()[math.random(1,#player.GetHumans())]
- function mainbotfunc(ply,cmd)
- if ply:IsBot() then
- while true do
- comd = cmd
- bot = ply
- local botpos = ply:GetPos()
- bot:SetModel("models/player/phoenix.mdl")
- ply:SelectWeapon("none")
- ply:Give("none")
- local plypos = plyr:GetPos()
- local yaxis = plypos.y - botpos.y
- local xaxis = plypos.x - botpos.x
- yaw = math.deg(math.atan2(yaxis,xaxis))
- comd:SetViewAngles(Angle(0,yaw,0))
- if plypos:Distance(botpos) > 9999 then
- comd:SetForwardMove(1000)
- comd:ClearMovement()
- end
- if plypos:Distance(botpos) < 80 then
- comd:SetForwardMove(-1000)
- comd:ClearMovement()
- end
- end
- local plyr = player.GetHumans()[math.random(1,#player.GetHumans())]
- end
- end
- hook.Add("StartCommand","mainbotfunc",mainbotfunc)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement