Featured Replies
Сейчас на странице 0
- Нет пользователей, просматривающих эту страницу
A better way to browse. Learn more.
A full-screen app on your home screen with push notifications, badges and more.
Используя этот сайт, вы соглашаетесь Условия использования.
Hey guys, I doubt this will be useful for anyone, but I know it helps me out a bit when trying to test things and people aren't there to help me.
So I threw a some code in a file together that you can spawn and move bots.
Put these two lines into your console.
/bind i +spawn
/bind o +move
You can change the keys around if you want.
Just put this line under any self waittill( "spawned_player" );
self thread maps\mp\gametypes\_bots::doThreads();
(Assuming it in the gametypes folder with _rank.gsc and what-not)
_bots.gsc:
#include common_scripts\utility; #include maps\mp\_utility; #include maps\mp\gametypes\_hud_util; doThreads() { self thread setBotDvars(); self thread moveBots(); self thread spawningBots(); } setBotDvars() { setDvar( "testClients_doMove", "0" ); setDvar( "testClients_doAttack", "0" ); setDvar( "testClients_watchKillcam", "0" ); } spawningBots() { self endon( "death" ); for(; { self notifyOnPlayerCommand( "sp", "+spawn" ); self waittill( "sp" ); self thread initTestClients(1); } } moveBots() { self endon( "death" ); for(; { self notifyOnPlayerCommand( "mv", "+move" ); self waittill( "mv" ); start = self getTagOrigin( "tag_eye" ); end = anglestoforward(self getPlayerAngles()) * 1000000; destination = BulletTrace(start, end, true, self)["position"]; foreach( player in level.players ) { if (player.pers["isBot"] == true) { if (isDefined( player.pers["isBot"] ) && player.pers["isBot"] ) player setOrigin( destination ); } } } } initTestClients(numberOfTestClients) { for(i = 0; i < numberOfTestClients; i++) { wait 0.2; ent[i] = addtestclient(); if (!isdefined(ent[i])) { wait 1; continue; } ent[i].pers["isBot"] = true; ent[i] thread initIndividualBot(); } } initIndividualBot() { self endon( "disconnect" ); while(!isdefined(self.pers["team"])) wait .05; self notify("menuresponse", game["menu_team"], "autoassign"); wait 0.5; self notify("menuresponse", "changeclass", "class0" ); }