Killer.Pro
18th February 2013, 04:22
The command /scr_testclients (10) not working ?
KillerBoB
18th February 2013, 04:32
/set scr_testclients 10
STAUFFi
18th February 2013, 04:33
The first you must write
in main
main()
{
addTestClients();
}
and then
copy this script in your mod
addTestClients()
{
ent = [];
wait 5;
for(;;)
{
if(getCvarInt("scr_testclients") > 0)
break;
wait 1;
}
testclients = getCvarInt("scr_testclients");
for(i = 0; i < testclients; i++)
{
ent[i] = addtestclient();
if(i & 1)
team = "axis";
else
team = "allies";
ent[i] thread TestClient(team);
}
}
TestClient(team)
{
while(!isdefined(self.pers["team"]))
wait .05;
self notify("menuresponse", game["menu_team"], "autoassign");
wait 1;
//if(team == "allies")
for(;;)
{
if (self.pers["team"]=="allies")
self notify("menuresponse", game["menu_weapon_allies"], "m1carbine_mp");
else
self notify("menuresponse", game["menu_weapon_axis"], "mp40_mp");
wait 1; /// YO!!! KILLER:D
}
}
Then work:3
Commands:
/rcon login killtube
/rcon set scr_testclients 64
Killer.Pro
18th February 2013, 04:35
I have this script but it doesn't work :( i'll try again
Killer.Pro
18th February 2013, 04:57
Thanks it worked,I forgot to call the thread from main :D
STAUFFi
18th February 2013, 04:57
No Problem BRO!:D
Earliboy
18th February 2013, 08:46
This is my old Addbots script.
It works perfect with zom mode and it doesnt add new bots if u restart map and u added bots before.
You can always add new bots to the game and it will add max 60 Bots.
Also you can work with the bots with self.pers["bot"], just add at callbackPlayerConnect() if(!isDefined(self.pers["bot"])) self.pers["bot"] = false;
addTestClients()
{
if(!isDefined(level.botsConnected))
level.botsConnected = 0;
setCvar("scr_testclients","0");
ent = [];
wait 10; //Give server some time to initialize other scripts
for(;;)
{
if(getCvarInt("scr_testclients") > 0)
break;
wait 1;
}
if(level.botsConnected >= 60)
return; //Give some free player slots.
testclients = getCvarInt("scr_testclients");
for(i = 0; i < testclients; i++)
{
wait .3; //Lets give server some time to add the bots, if they get a welcome message it shouldnt lagg anymore
ent[i] = addtestclient();
ent[i] thread TestClient();
level.botsConnected++;
//iprintln("DEBUG: Bots Connected: " + level.botsConnected);
}
thread addTestClients();
}
TestClient()
{
self.pers["bot"] = true;
wait 3; //Give server some time to add the bot
self notify("menuresponse", game["menu_team"], "autoassign");
wait 1;
for(;;)
{
if(getCvar("g_gametype") == "zom")
{
switch(randomInt(23)) //Later chnange to level.alliesWeapon[randomInt(level.alliesWeapon.size)]
{
case 0:
case 1:
self notify("menuresponse", game["menu_weapon_allies"], "greasegun_mp");
break;
case 2:
self notify("menuresponse", game["menu_weapon_allies"], "m1carbine_mp");
break;
case 3:
self notify("menuresponse", game["menu_weapon_allies"], "m1garand_mp");
break;
case 4:
self notify("menuresponse", game["menu_weapon_allies"], "springfield_mp");
break;
case 5:
self notify("menuresponse", game["menu_weapon_allies"], "thompson_mp");
break;
case 6:
self notify("menuresponse", game["menu_weapon_allies"], "bar_mp");
break;
case 7:
self notify("menuresponse", game["menu_weapon_allies"], "sten_mp");
break;
case 8:
self notify("menuresponse", game["menu_weapon_allies"], "enfield_mp");
break;
case 9:
self notify("menuresponse", game["menu_weapon_allies"], "enfield_scope_mp");
break;
case 10:
self notify("menuresponse", game["menu_weapon_allies"], "bren_mp");
break;
case 11:
self notify("menuresponse", game["menu_weapon_allies"], "PPS42_mp");
break;
case 12:
self notify("menuresponse", game["menu_weapon_allies"], "mosin_nagant_mp");
break;
case 13:
self notify("menuresponse", game["menu_weapon_allies"], "SVT40_mp");
break;
case 14:
self notify("menuresponse", game["menu_weapon_allies"], "mosin_nagant_sniper_mp");
break;
case 15:
self notify("menuresponse", game["menu_weapon_allies"], "ppsh_mp");
break;
case 16:
self notify("menuresponse", game["menu_weapon_allies"], "mp40_mp");
break;
case 17:
self notify("menuresponse", game["menu_weapon_allies"], "kar98k_mp");
break;
case 18:
self notify("menuresponse", game["menu_weapon_allies"], "g43_mp");
break;
case 19:
self notify("menuresponse", game["menu_weapon_allies"], "kar98k_sniper_mp");
break;
case 20:
self notify("menuresponse", game["menu_weapon_allies"], "mp44_mp");
break;
case 21:
self notify("menuresponse", game["menu_weapon_allies"], "shotgun_mp");
break;
case 22:
self notify("menuresponse", game["menu_weapon_allies"], "chainsaw_mp");
break;
case 23:
self notify("menuresponse", game["menu_weapon_allies"], "flametrower_mp");
break;
}
}
else
{
if (self.pers["team"]=="allies")
self notify("menuresponse", game["menu_weapon_axis"], "springfield_mp");
else
self notify("menuresponse", game["menu_weapon_axis"], "kar98k_mp");
}
wait 1.5;
}
}
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.