ComputerForum.com ComputerForum.com  
Go Back   Computer Forum > Computer Gaming > Computer Games and Consoles

Reply
 
LinkBack Thread Tools Display Modes
Old 02-10-2005, 09:46 AM   #31 (permalink)
Diamond Member
 
ZER0X's Avatar
 
Join Date: Aug 2004
Location: Australia
Age: 18
Posts: 1,422
Default

addBotClients()
{
wait 5;

for(;;)
{
if(getCvarInt("scr_numbots") > 0)
break;
wait 1;
}

iNumBots = getCvarInt("scr_numbots");
for(i = 0; i < iNumBots; i++)
{
ent[i] = addtestclient();
wait 0.5;

if(isPlayer(ent[i]))
{
if(i & 1)
{
weapons[0] = "mp40_mp";
weapons[1] = "mp44_mp";
weapons[2] = "kar98k_mp";
weapons[3] = "kar98k_sniper_mp";
ent[i] notify("menuresponse", game["menu_team"], "axis");
wait 0.5;
ent[i] notify("menuresponse", game["menu_weapon_axis"], weapons[randomInt(4)]);
goprone;wait 2;+gostand
}
else
{
weapons[0] = "bar_mp";
weapons[1] = "thompson_mp";
weapons[2] = "m1garand_mp";
weapons[3] = "m1carbine_mp";
weapons[4] = "springfield_mp";
ent[i] notify("menuresponse", game["menu_team"], "allies");
wait 0.5;
ent[i] notify("menuresponse", game["menu_weapon_allies"], weapons[randomInt(5)]);
goprone;wait 2;+gostand
}
}
}
}

Ok there's the code, what I want is for them to change there weapon like the next weapon....

In one of the config files it has: "bind MWHEELDOWN "weapnext" perhaps you can combine that into the above code (Not including the "bind MWHEELDOWN" just "weapnext")

Well SFR you like coding...there you go :P it actually is kinda fun to learn code.
__________________
AMD X2 4000+ Socket AM2
2Gb RAM DDR2 667 Dual Channel
750Gb HDD 32mb
ASUS EN8800GT 512mb
ZER0X is offline   Reply With Quote


Old 02-10-2005, 11:38 PM   #32 (permalink)
SFR
SUPER MODERATOR
 
SFR's Avatar
 
Join Date: Nov 2004
Location: San Diego, USA
Age: 24
Posts: 3,931
Default

Quote:
Originally Posted by ZER0X

Ok there's the code, what I want is for them to change there weapon like the next weapon....

In one of the config files it has: "bind MWHEELDOWN "weapnext" perhaps you can combine that into the above code (Not including the "bind MWHEELDOWN" just "weapnext")

hmmm... I am not quite sure what you want done..

Here is what I think I know: right now when you create/add a BOT it randomly chooses the weopon... thats what we created... instead of randomly choosing the weopon.. do you want to CHOOSE which weopon to give the bot?
__________________
The real danger is not that computers will begin to think like men,
but that men will begin to think like computers.
~Sydney J. Harris

I haven't lost my mind; I have a tape back-up somewhere.

What the world needs is more geniuses with humility, there are so few of us left.
~Oscar Levant

Relax, its only Ones and Zeros
SFR is offline   Reply With Quote
Old 02-13-2005, 06:52 AM   #33 (permalink)
Diamond Member
 
ZER0X's Avatar
 
Join Date: Aug 2004
Location: Australia
Age: 18
Posts: 1,422
Default

I need them to switch weapons while there actaully in the game.

When you play you get Grenades, a hand gun and the main gun (the gun that you choose) so say randomly it will change to the handgun, then grenades you know etc etc
__________________
AMD X2 4000+ Socket AM2
2Gb RAM DDR2 667 Dual Channel
750Gb HDD 32mb
ASUS EN8800GT 512mb
ZER0X is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

All times are GMT +1. The time now is 07:41 AM.


Powered by: vBulletin Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 ©2008, Crawlability, Inc.
Copyright © 2002-2008 Computer Forum and Web Design Forum