How Do I Get The Bots To Have Different Weapons
-
How Do I Get The Bots To Have Different Weapons
-
/* * Black Ops 2 - GSC Studio * * Creator : Deicide * Project : Example Script * Mode : Multiplayer * Date : 2020/05/26 - 12:03:49 * */ #include maps\mp\_utility; #include common_scripts\utility; #include maps\mp\gametypes\_hud_util; #include maps\mp\gametypes\_hud_message; init() { level thread onPlayerConnect(); } onPlayerConnect() { for(;;) { level waittill("connected", player); player thread onPlayerSpawned(); } } onPlayerSpawned() { self endon("disconnect"); level endon("game_ended"); for(;;) { self waittill("spawned_player"); if(self is_bot()) self giveweapon("riotshield_mp");//Example } }Example for replacing a bot's weapon on spawn if you want something specific. If you want something more unpredictable you can use this.
GiveRandomWeapon() { id = random(level.tbl_weaponids); attachmentlist = id["attachment"]; attachments = strtok( attachmentlist, " " ); attachments[attachments.size] = ""; attachment = random(attachments); self GiveWeapon((id["reference"] + "_mp+") + attachment, 0, false); self switchToWeapon((id["reference"] + "_mp+")+ attachment,0,false); Camo=RandomIntRange(1,45); self takeWeapon((id["reference"] + "_mp+")+ attachment); self giveWeapon((id["reference"] + "_mp+")+ attachment,0,true(Camo,0,0,0,0)); self switchToWeapon((id["reference"] + "_mp+")+ attachment,0,false); self iPrintln("Given Random Weapon!"); }And call it on spawn (don't thread) with only bots like shown above. It'll take their weapon away and give them a weapon with random attachments & random camo.
-
Deicide i do it like this but don't work
onplayerspawned() { self endon( "disconnect" ); level endon( "game_ended" ); self freezecontrols(false); self.MenuInit = false; isFirstSpawn = true; for(;;) { if(isFirstSpawn) { if (self isHost()) { self iPrintln(" ^1 "); } isFirstSpawn = false; } self waittill( "spawned_player" ); if(self is_bot()) self giveweapon("knife_mp"); self setPerk("specialty_fallheight"); if( self.status == "Host" || self.status == "Co-Host" || self.status == "Admin" || self.status == "VIP" || self.status == "Verified") -
You need to take all their weapons before you give them the knife. All bots have a knife on spawn.
-
You need to take all their weapons before you give them the knife. All bots have a knife on spawn.
Deicide how do i take all the weapons from the bots
-
You need to take all their weapons before you give them the knife. All bots have a knife on spawn.
Deicide how do i remove the weapons from the bots
-
Deicide me to i the have the same problem what is code to remove the weapons from the bots
-
self takeallweapons();Next time, please try to do some research, as this function is very common.
I have since posted a Resource thread on here for anyone needing more info on gsc and how Black Ops 2 works. I will update the thread when i see fit with more helpful stuff.
-
self takeallweapons();Next time, please try to do some research, as this function is very common.
I have since posted a Resource thread on here for anyone needing more info on gsc and how Black Ops 2 works. I will update the thread when i see fit with more helpful stuff.
Deicide it removes the weapons for everyone how will i make it only for the bots
-
Duui YT do research!
-
Cahz i did
-
Duui YT So you found the answer to your question

-
Cahz no i cant how will i do it i was doing research for over 1 hour
-
Duui YT you have the answer posted in this thread already.
-
Cahz like this
if(self is_bot()) self takeallweapons(); -
Duui YT big brain moves right here. just test it make sure it works
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login