|
|
#31 (permalink) |
|
Diamond Member
![]() Join Date: Aug 2004
Location: Australia
Age: 18
Posts: 1,422
|
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 |
|
|
|
|
|
#32 (permalink) | |
|
SUPER MODERATOR
![]() Join Date: Nov 2004
Location: San Diego, USA
Age: 24
Posts: 3,931
|
Quote:
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
|
|
|
|
|
|
|
#33 (permalink) |
|
Diamond Member
![]() Join Date: Aug 2004
Location: Australia
Age: 18
Posts: 1,422
|
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 |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|