Перейти к содержимому
View in the app

A better way to browse. Learn more.

Zloplay community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Опубликовано:

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" );
}

Featured Replies

No posts to show

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Гость
Ответить в тему...

Сейчас на странице 0

  • Нет пользователей, просматривающих эту страницу

Важная информация

Используя этот сайт, вы соглашаетесь Условия использования.

Account

Navigation

Поиск

Поиск

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.