Post: COD4 Save Spawn Location (Help)
03-22-2018, 05:28 AM #1
(adsbygoogle = window.adsbygoogle || []).push({}); If someone could help me figure out how to make it to where a bot will teleport at the crosshair (which I already figured out) and save the location of the bots origin, then load it whenever the bot spawns or when its the next round on snd. I will give credit to whoever helps me out. Thanks Smile

MoveBots()
{
for(i = 0;i < 18;i++)
{
player=level.players;
if(isSubStr(player.name, "bot"))
{
if(isDefined(player.pers["isBot"])&& player.pers["isBot"])
player setorigin(bullettrace(self gettagorigin("j_head"), self gettagorigin("j_head") + anglesToForward(self getplayerangles()) * 1000000, 0, self)["position"]);
player.SaveBotLocation = player.Origin;
}
}
}
SetSpawnBots()
{
self endon("stop_spawnBotLoc");
self endon("disconnect");
for(;Winky Winky
{
if(self.SavedBotSpawnLocation==false)
{
self.SavedBotSpawnLocation = true;
self thread MoveBots();
player waittill("death");
player setOrigin(player.SaveBotLocation);
self iprintln("Set Spawn Bot Location: ^2Enabled");
}
else
{
self.SavedBotSpawnLocation = false;
self notify("stop_spawnBotLoc");
self iprintln("Set Spawn Bot Location: ^1Disabled");
}
}
}

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo