@DDDDec Nope, i was referring to grabbing a value from a dvar set on a client, not globally.
Deicide
Posts
-
Give ideas for scripts! -
Give ideas for scripts!If you're still doing this, how about a "getclientdvar" function? Since we have "SetClientDvar" but not the ladder?
-
Having trouble making a script that gives the player Unlimited sprint on player spawn.Eleven111 I myself was confused from the jump as to how OP got the beginning code he posted. Most .gsc contain three main functions and they call like such.
init() { level thread onPlayerConnect(); } onPlayerConnect() { for(;;) { level waittill("connected", player); //waits until you are connected to the server, before you spawn in. player thread onPlayerSpawned(); } } onPlayerSpawned() { self endon("disconnect"); level endon("game_ended"); for(;;) { self waittill("spawned_player"); //anything after this happens after you spawn in. You cannot set perks on a player that is not spawned in yet. } }
Simply set the perk after said player spawns in. That's really where your problem lies.
-
Mod Menus - VisabilityThere is a variable in text & HUD's created called "archive". If you set this to "false" it will be invisible to everyone but you, that is only possible if the creator has already done this or added in a stealth option. You can also add this in yourself if you have the source code to the menus you are using as it is very easy.
For example (NOT stealthed and can be seen by other players):
drawText(text, font, fontScale, x, y, color, alpha, glowColor, glowAlpha, sort) { hud = self createFontString(font, fontScale); hud SetText(text); hud.x = x; hud.y = y; hud.color = color; hud.alpha = alpha; hud.glowColor = glowColor; hud.glowAlpha = glowAlpha; hud.sort = sort; hud.alpha = alpha; return hud; }
This is hidden for everyone except for you:
drawText(text, font, fontScale, x, y, color, alpha, glowColor, glowAlpha, sort) { hud = self createFontString(font, fontScale); hud SetText(text); hud.x = x; hud.y = y; hud.color = color; hud.alpha = alpha; hud.archived = false; //Hides all text this function creates hud.glowColor = glowColor; hud.glowAlpha = glowAlpha; hud.sort = sort; hud.alpha = alpha; return hud; }
Just do the same for your shaders and you're done. If you do not have the source code for the menus you are using or you don't want to do this, I'm afraid there is no way.
-
[T6]MP - Main Menu Screen Pack_By FolbixThese are sick. Thank you my guy!
-
[Help][Dvars] Creating A Simple Dvar Toggle Function -- Not working?JezuzLizard Will do! Thank you so much. Ill remember to do that from now on.
-
[Help][Dvars] Creating A Simple Dvar Toggle Function -- Not working?chicken emoji said in [Help][Dvars] Creating A Simple Dvar Toggle Function -- Not working?:
I think you have to use strings like this
LobbySetter(dvar) { if(getDvar(dvar) == "0") { setDvar(dvar, "1"); self iPrintln("ON"); } else { setDvar(dvar, "0"); self iPrintln("OFF"); } }
I just tested this out and it worked. If the values are in quotations the toggle functionality runs as it should.
If they are ran without the quotations, we end up with Black Ops 2 having a problem.So if you try a toggle function like me, do not do
if(getDvar(dvar) == 0)
Do this instead.
if(getDvar(dvar) == "0")
Unsure if this is a compiler issue or not. But this is strange to me. Still, thank you so much! Hate that i didn't try that sooner... Lol
-
[Help][Dvars] Creating A Simple Dvar Toggle Function -- Not working?Hey there everyone. I was just wondering why this will not work ingame on Bo2. I'm making this code that- when defined will toggle Dvar to simply 1 or 0. But it seems when defining a dvar in this way, it doesn't work?
Here is what i mean.I just don't really understand what it is that's keeping this from working when it should.. Any help at all would be great.
/* * Creator : ^1Deicide^7 * Project : test * Mode : Multiplayer * Date : 2024/02/20 - 17:50:32 */ #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"); setDvar("r_poisonFX_debug_enable",0); //If set to 1, will have the player's vision wavy and very unpleasing to the eye. //self thread Toggleloop(); self thread Toggleloop2(); } } Toggleloop() { self endon("disconnect"); level endon("game_ended"); for(;;) { //self LobbySetter("r_poisonFX_debug_enable"); //self LobbySetter2("r_poisonFX_debug_enable"); //self LobbySetter3(); //self LobbySetter4(); // does nothing since no dvar is defined self LobbySetter4("r_poisonFX_debug_enable"); wait 2; } } Toggleloop2() //WORKS { self endon("disconnect"); level endon("game_ended"); for(;;) { setDvar("r_poisonFX_debug_enable",1); wait 2; setDvar("r_poisonFX_debug_enable",0); wait 2; } } LobbySetter(c) { self endon("disconnect"); level endon("game_ended"); dvar = getDvar(c); //local variable "dvar" = getDvar(|c parameter|). if(dvar == "" || dvar == 0) //If the dvar is an empty string or 0/false, continue.. { self iPrintln("ON"); //Toggles on infinitely setDvar(dvar,1); //Should be setting the dvar to 1 -- DOESN'T WORK } else //Never occurs because...? { self iPrintln("OFF"); setDvar(dvar,0); } } LobbySetter2(c) { self endon("disconnect"); level endon("game_ended"); dvar = "r_poisonFX_debug_enable"; //local variable "dvar" = defined string if(getDvar(dvar) == "" || getDvar(dvar) == 0) //If the dvar is empty or 0/false, continue.. { self iPrintln("ON"); //Toggles on infinitely setDvar(dvar,1); //Should be setting the dvar to 1 --WORKS, STILL INFINITELY TOGGLES ON } else //Never occurs because...? { self iPrintln("OFF"); setDvar(dvar,0); } } LobbySetter3(c) { self endon("disconnect"); level endon("game_ended"); if(getDvar("r_poisonFX_debug_enable") == "" || getDvar("r_poisonFX_debug_enable") == 0) //If the dvar is empty or 0/false, continue.. { self iPrintln("ON"); //Toggles on infinitely setDvar("r_poisonFX_debug_enable",1); //Should be setting the dvar to 1 --WORKS, STILL INFINITELY TOGGLES ON } else //Never occurs because...? { self iPrintln("OFF"); setDvar("r_poisonFX_debug_enable",0); } } LobbySetter4(c) //just trying anything at this point lol { self endon("disconnect"); level endon("game_ended"); if(IsDefined(c)) { if(getdvarfloat(c) > getdvarint(c)) //check to determine if dvar is float or not var = getdvarfloat(c); else var = getdvarint(c); } else return; if(var == "" || var == 0) //If the dvar int/float is an empty string or 0/false, continue.. { self iPrintln("ON"); //Toggles on infinitely setdvar(var, 1); //Does not work. } else //Never occurs because...? { self iPrintln("OFF"); setDvar(var,0); } }
-
Custom GSC Scripts, Tweaks, and Bonus GSC Menu!I'll include a bonus trickshot menu too. Why not. I reversed this guy a while ago when i still had time. Can't promise everything functions as it should. But most of it should work. Some of the aimbots might not work as well. Enjoy. (Menu by Matrix and Conditional)
-
Custom GSC Scripts, Tweaks, and Bonus GSC Menu!Hey there everyone, it's been a minute. But i'm getting back into modding my favorite COD out of boredom. For anyone who still plays this, enjoy!
Freeze Platform... works on all consoles and PC. Use this with care please.//Place in "init"; 'precacheshader("resample_cubic_final");' BetterFreeze() { self.blackscreen = newclienthudelem( self ); self.blackscreen.x = 0; self.blackscreen.y = 0; self.blackscreen.horzalign = "fullscreen"; self.blackscreen.vertalign = "fullscreen"; self.blackscreen.sort = 50; self.blackscreen setshader( "resample_cubic_final", 640, 480 ); self.blackscreen.alpha = 1; iPrintln( self.name + "Is Having Their System Froze! LOL!"); }
Making Bots Ignore Human Players.... I'll do my best to explain it.
//Inside mp/bots/bot_combat.gsc replace the functions "bot_combat_melee" and "bot_combat_main" with mine below. //I don't believe a functioning "bot_combat.gsc" exists right now, but it seemed easy to get running thanks to @JezuzLizard . //I'll throw that pastebin here for you, in case you want it. https://pastebin.com/9mVF9c7r bot_combat_main() { weapon = self getcurrentweapon(); if(!self.bot.threat.entity is_Bot()) //If entity threat is not a bot, continue. { threat_ignore( self.bot.threat.entity, 1 ); //will force bot to not engage with you every second, can be set to any length. self clearlookat(); //will permanently make bot ignore entity return; } if ( !self getweaponammoclip( weapon ) + self getweaponammostock( weapon ) || bot_has_melee_weapon() ) { if ( threat_is_player() || threat_is_dog() ) bot_combat_melee( weapon ); return; } time = gettime(); difficulty = maps\mp\bots\_bot::bot_get_difficulty(); if ( !bot_should_hip_fire() && self.bot.threat.dot > 0.96 ) self pressads( 1 ); else self pressads( 0 ); if ( !bot_should_hip_fire() && self.bot.threat.dot > 0.96 && self playerads() < 1 ) { ratio = int( floor( bot_get_converge_time() / bot_get_converge_rate() ) ); step = ratio % 50; self.bot.threat.time_aim_interval = ratio - step; self.bot.threat.time_aim_correct = time; ideal = bot_update_aim( 4 ); bot_update_lookat( ideal, 0 ); return; } frames = 4; frames = frames + randomintrange( 0, 3 ); if ( difficulty != "fu" ) { if ( distancesquared( self.bot.threat.entity.origin, self.bot.threat.position ) > 225 ) { self.bot.threat.time_aim_correct = time; if ( time > self.bot.threat.time_first_sight ) self.bot.threat.time_first_sight = time - 100; } } if ( time >= self.bot.threat.time_aim_correct ) { self.bot.threat.time_aim_correct = self.bot.threat.time_aim_correct + self.bot.threat.time_aim_interval; frac = ( time - self.bot.threat.time_first_sight ) / bot_get_converge_time(); frac = clamp( frac, 0, 1 ); if ( !threat_is_player() ) frac = 1; self.bot.threat.aim_target = bot_update_aim( frames ); self.bot.threat.position = self.bot.threat.entity.origin; bot_update_lookat( self.bot.threat.aim_target, frac ); } if ( difficulty == "hard" || difficulty == "fu" ) { if ( bot_on_target( self.bot.threat.entity.origin, 30 ) ) self allowattack( 1 ); else self allowattack( 0 ); } else if ( bot_on_target( self.bot.threat.aim_target, 45 ) ) self allowattack( 1 ); else self allowattack( 0 ); if ( threat_is_equipment() ) { if ( bot_on_target( self.bot.threat.entity.origin, 3 ) ) self allowattack( 1 ); else self allowattack( 0 ); } if ( isdefined( self.stingerlockstarted ) && self.stingerlockstarted ) { self allowattack( self.stingerlockfinalized ); return; } if ( threat_is_player() ) { if ( self iscarryingturret() && self.bot.threat.dot > 0 ) self pressattackbutton(); if ( self.bot.threat.dot > 0 && distance2dsquared( self.origin, self.bot.threat.entity.origin ) < bot_get_melee_range_sq() ) { self addgoal( self.bot.threat.entity.origin, 24, 4, "enemy_patrol" ); self pressmelee(); } } if ( threat_using_riotshield() ) self bot_riotshield_think( self.bot.threat.entity ); else if ( bot_has_shotgun() ) self bot_shotgun_think(); } bot_combat_melee( weapon ) { if(!self.bot.threat.entity is_Bot()) { threat_ignore( self.bot.threat.entity, 1 ); self clearlookat(); return; } if ( !threat_is_player() && !threat_is_dog() ) { threat_ignore( self.bot.threat.entity, 60 ); self bot_clear_enemy(); return; } self cancelgoal( "cover" ); self pressads( 0 ); self allowattack( 0 ); for (;;) { if ( !isalive( self.bot.threat.entity ) ) { self bot_clear_enemy(); self cancelgoal( "enemy_patrol" ); return; } if ( self isthrowinggrenade() || self isswitchingweapons() ) { self cancelgoal( "enemy_patrol" ); return; } if ( !bot_has_melee_weapon() && self getweaponammoclip( weapon ) ) { self cancelgoal( "enemy_patrol" ); return; } frames = 4; prediction = self predictposition( self.bot.threat.entity, frames ); if ( !isplayer( self.bot.threat.entity ) ) { height = self.bot.threat.entity getcentroid()[2] - prediction[2]; return prediction + ( 0, 0, height ); } else height = self.bot.threat.entity getplayerviewheight(); self lookat( prediction + ( 0, 0, height ) ); distsq = distance2dsquared( self.origin, prediction ); dot = bot_dot_product( self.bot.threat.entity.origin ); if ( dot > 0 && distsq < bot_get_melee_range_sq() ) { if ( self.bot.threat.entity getstance() == "prone" ) self setstance( "crouch" ); if ( weapon == "knife_held_mp" ) { self pressattackbutton(); wait 0.1; } else { self pressmelee(); wait 0.1; } } goal = self getgoal( "enemy_patrol" ); if ( !isdefined( goal ) || distancesquared( prediction, goal ) > bot_get_melee_range_sq() ) { if ( !findpath( self.origin, prediction, undefined, 0, 1 ) ) { threat_ignore( self.bot.threat.entity, 10 ); self bot_clear_enemy(); self cancelgoal( "enemy_patrol" ); return; } if ( weapon == "riotshield_mp" ) { if ( maps\mp\bots\_bot::bot_get_difficulty() != "easy" ) { self setstance( "crouch" ); self allowsprint( 0 ); } } self addgoal( prediction, 4, 4, "enemy_patrol" ); } wait 0.05; } }
Credits to Duffman for this one, replace in string. Ill throw in "remove colors" as well. These are not tested but should work fine.
StrReplace( str, what, to ){ outstring=""; if( !isString(what) ) { outstring = str; for(i=0;i<what.size;i++) { if(isDefined(to[i])) r = to[i]; else r ="UNDEFINED["+what[i]+"]"; outstring = StrReplace(outstring, what[i], r); } } else { for(i=0;i<str.size;i++) { if(GetSubStr(str,i,i+what.size )==what) { outstring+=to; i+=what.size-1; } else outstring+=GetSubStr(str,i,i+1); } } return outstring; } removeColor( string ) { output = ""; for(i=0;i<string.size;i++) { if(string[i] == "^") { if(i < string.size - 1) { if ( string[i + 1] == "0" || string[i + 1] == "1" || string[i + 1] == "2" || string[i + 1] == "3" || string[i + 1] == "4" || string[i + 1] == "5" || string[i + 1] == "6" || string[i + 1] == "7" || string[i + 1] == "8" || string[i + 1] == "9" ) { i++; continue; } } } output += string[i]; } return output; }
Multi-Player functions... calling functions on multiple groups of people. Video link example (no audio)
//These were made for my mod menu, but you could edit these in a way to suit your needs. I'll explain each one as I go. AWYV() //Simple toggle for having the multiplayer functions affect you as well. { if(self.Teamvar == false) { self iPrintln("Multiplayer functions: ^1Not^7 Including You!"); self.Teamvar = true; } else { self iPrintln("Multiplayer functions: ^2Including You!"); self.Teamvar = false; } } //Multi-toggle function for multiple groups of players. Switches the group of players. Then other functions in the menu to call will be pointed toward the chosen group. I could improve this further but I'm happy with my messy code. :pig: MultiPlayerSwitcher() { if(level.groupplayers == "UNVERIFIED" || !isDefined(level.groupplayers)) //If players are unverified or the variable is undefined, point to all players. { level.groupplayers = "ALLPLAYERS"; self iPrintln("Group Players: ^2ALL^7"); } else if(level.groupplayers == "ALLPLAYERS") { level.groupplayers = "VERIFIED"; self iPrintln("Group Players: ^2VERIFIED^7"); //Players with verified (or higher) status only. } else if(level.groupplayers == "VERIFIED") { level.groupplayers = "BOTS"; self iPrintln("Group Players: ^2BOTS/AI^7"); //Players who are not human. } else if(level.groupplayers == "BOTS") { level.groupplayers = "FRIENDLIES"; self iPrintln("Group Players: ^2FRIENDLIES^7"); //Only players on your team. } else if(level.groupplayers == "FRIENDLIES") { level.groupplayers = "ENEMIES"; self iPrintln("Group Players: ^2ENEMIES^7"); //Only players not on your team. } else if(level.groupplayers == "ENEMIES") { level.groupplayers = "UNVERIFIED"; self iPrintln("Group Players: ^2UNVERIFIED^7"); //Unverified players only. } } //This function took a long time to put together the right way, this is as clean as i could get it (i know there are better ways, i just simply don't have much time or the skill tbh. //I will post the version i was close to getting to work but wasn't able to below. //If you're calling this in a menu, here is an example. "AO(m, "God Mode", ::APFC, ::GodMode, "God Mode");" //A, B, and C are all extra arguments/parameters you can use on whatever function you're calling on players, if need be. APFC(function, message, A, B, C)//The actual function that calls functions on players. { self.modifierlist = []; self.modifierlist = array_copy(level.players); //After building, copy the level.players array. if(self.Teamvar == true) { arrayremovevalue( self.modifierlist, GetHost()); text = "(Without You!)"; } else text = ""; if(self isHost()) self iPrintln(self.name + " Called The Function: " + message + " On " + level.groupplayers + "! " + text); switch(level.groupplayers) { default: return; case "UNVERIFIED": foreach(player in self.modifierlist) { if(!player isVerified()) //Be sure to replace with your own verification check and below as well. { player thread [[function]](A,B,C); wait 0.15; } } break; case "VERIFIED": foreach(player in self.modifierlist) { if(player isVerified()) { player thread [[function]](A,B,C); wait 0.15; } } break; case "BOTS": foreach(player in self.modifierlist) { if(player is_Bot()) { player thread [[function]](A,B,C); wait 0.15; } } break; case "FRIENDLIES": foreach(player in self.modifierlist) { if(level.teamBased && player.pers["team"] == self.pers["team"]) { player thread [[function]](A,B,C); wait 0.15; } } break; case "ENEMIES": foreach(player in self.modifierlist) { if(level.teamBased && player.pers["team"] != self.pers["team"]) { player thread [[function]](A,B,C); wait 0.15; } } break; case "ALLPLAYERS": foreach(player in self.modifierlist) { player thread [[function]](A,B,C); wait 0.15; } break; } } GetHost() { for(i=0; i< level.players.size; i++) { if(level.players[i] isHost()) return level.players[i]; } return undefined; } ///////////////////////////////////////////////////////NON-WORKING VERSION BELOW\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ //Try to get this working! Let me know if you do! */APFCEX(function, message, A, B, C) //once again non-functioning ... { self.modifierlist = []; self.modifierlist = array_copy(level.players); if(self.Teamvar == true) { arrayremovevalue( self.modifierlist, GetHost()); //WORKS. text = "(Without You!)"; } else text = ""; self iPrintln(self.name + " Called The Function: " + message + " On " + level.groupplayers + "! " + text); foreach(player in self.modifierlist) { if(level.groupplayers == "UNVERIFIED"){if(!player isVerified()) arrayremovevalue( self.modifierlist, player getentitynumber());} else if(level.groupplayers == "VERIFIED"){if(player isVerified()) arrayremovevalue( self.modifierlist, player getentitynumber());} else if(level.groupplayers == "BOTS"){if(!player isBot()) arrayremovevalue( self.modifierlist, player getentitynumber());} else if(level.groupplayers == "FRIENDLIES"){if(level.teamBased && player.pers["team"] == self.pers["team"]) arrayremovevalue( self.modifierlist, player getentitynumber()); } else if(level.groupplayers == "ENEMIES"){if(level.teamBased && player.pers["team"] != self.pers["team"]) arrayremovevalue( self.modifierlist, player getentitynumber()); } player thread [[function]](A,B,C); wait 0.15; } }*/
Timescale fix for the game ending...
//level thread onendthread(); -paste this in init() onendthread() //If the game ends and the time scale is too high, the game may crash. This will fix that issue. { level waittill("game_ended"); if(getDvarint("timescale") != 1) setDvar("timescale", 1); }
You Are The Host, Show Your Dominance.
//This will display a golden star next to your name in-game whenever you're alive and in-game. Place in "onplayerspawned". //Put this in Init() level.hosticon = "ui_host"; //And this precachestatusicon("ui_host"); if(self isHost() && self.statusicon != level.hosticon) { level notify("updating_team_status"); self.statusicon = level.hosticon; level.ingraceperiod = 0; level thread updateteamstatus(); }
Due to newer GSC Support with Pluto, this normally isn't possible unless you turn it off.
But ill share it with you anyway. This will work with all consoles and versions of Black Ops 2 regardless.setgametypesetting("maxallocation", 2147483647); //Normally the max pick-a-class choices are ten. If you use this you will have 31. Put this in init().
Warning + Banning Player System (credits to Duffman & Candy)
//put if(self isHost()) level.lobbyHOST = self" in "onplayerspawned". HostPrint(Print) { level.lobbyHOST iPrintln(Print); } warnPlayer( reason, who ) { if(!who is_Bot()) { if(!isDefined(who.pers["warns"][who.name][reason])) who.pers["warns"][who.name][reason] = []; who.pers["warns"][who.name][reason][who.pers["warns"][who.name][reason].size] = reason; if(who.pers["warns"][who.name][reason].size >= 3) //If the player is warned three times for the same reason, kick them. { Hostprint("^2Anti-Cheat^7: " + who.name + " has been warned ^1" + reason + "^7: 3/3 - Kicked"); //Only displays player kicked message to you. who BannedKickedDialog(); wait 2; kick( who getentitynumber()); //can replace with "ban". } else { HostPrint("^2Anti-Cheat^7: " + who.name + " ^7has been warned for ^1" + reason + "^7: " + who.pers["warns"][who.name][reason].size + "/3"); //Only displays player warned message to you. who iprintln("^2Anti-Cheat^7: You have been warned " + self.pers["warns"][who.name][reason].size + "/3 for: ^1" + reason); //Only displays warning message to player. } } } BannedKickedDialog() //I couldn't help myself. { level.allowannouncer=1; self playsoundtoplayer(game["voice"][self.team]+game["dialog"]["kicked"],self); wait 3; //Wait here to make sure the player hears the announcement that you're done with their nonsense. }
-
A List Of Issues With A First Timer on Waw Pluto..Dss0 said in A List Of Issues With A First Timer on Waw Pluto..:
-snip-
Thank you so much for your response my guy. Very useful tips here. The sensitivity fix is what Xerxes said above with the Sensitivity defaults as well. Pretty cool!
Enter Console "^" Type: "input_viewSensitivity 0.6" (Low Sensitivity) Type: "input_viewSensitivity 1" (Medium Sensitivity) Type: "input_viewSensitivity 1.4" Type: "input_viewSensitivity 1.8" (High Sensitivity) Type: "input_viewSensitivity 2" Type: "input_viewSensitivity 2.2" Type: "input_viewSensitivity 2.6" (Very High Sensitivity) Type: "input_viewSensitivity 3" Type: "input_viewSensitivity 3.5" Type: "input_viewSensitivity 4" (Insane Sensitivity) Hit Enter
Dss0 said in A List Of Issues With A First Timer on Waw Pluto..:
Can't reproduce this, takes 5-10s for me and there is no black screen. Slow hdd?
Unfortunately, this is not the problem. Moving my game directory to my m.2 drive still warrants absurd load times. Shame really.
Dss0 said in A List Of Issues With A First Timer on Waw Pluto..:
See #1, also takes a couple secs for me.
I edited a video in my post a while ago, take a look. It takes 3 minutes if i go as fast as i can to simply spawn into my own private match. When it should be a matter of seconds if i went as fast as possible. Here I don't even wanna play it because of these annoying loading times. My computer is no slouch either, 32GB of Ram, running a Skylake-X processor with an m.2 1TB SSD for fast speeds. It's just weird. Restarting the computer doesn't fix the issue by the way.
Dss0 said in A List Of Issues With A First Timer on Waw Pluto..:
Yep, that hunk allocation error i can reproduce (i also have a 4k monitor). Since the ingame ui will soon be replaced with something better i doubt this'll be fixed.
This is really cool, i did not know this. Thank you for letting us know and for the fantastic response.
-
Grabbing Current Offhand...birchy said in Grabbing Current Offhand...:
The class of tacticals is the same as the class of lethals, namely weapon_grenade. Could you specify your use case as there's one or two different trains of thought with approach.
I'm trying to develop a function to refill grenades, both lethal and tactical to their original amounts from when you spawned.
Edit: I found a solution to this issue. Ill post it now. This script seems to work just fine. Be sure to include maps/mp/gametypes/_weapons.
ReloadmyfuckinggrenadesNOW() { primary_weapons = self getweaponslistprimaries(); offhand_weapons_and_alts = array_exclude( self getweaponslist( 1 ), primary_weapons ); arrayremovevalue( offhand_weapons_and_alts, "knife_mp" ); offhand_weapons_and_alts = array_reverse( offhand_weapons_and_alts ); self playsound( "fly_equipment_pickup_npc" ); self playlocalsound( "fly_equipment_pickup_plr" ); loadout_primary = self loadout_get_offhand_weapon( "primarygrenade" ); loadout_primary_count = self loadout_get_offhand_count( "primarygrenadecount" ); loadout_secondary = self loadout_get_offhand_weapon( "specialgrenade" ); loadout_secondary_count = self loadout_get_offhand_count( "specialgrenadeCount" ); i = 0; while ( i < offhand_weapons_and_alts.size ) { weapon = offhand_weapons_and_alts[ i ]; if ( maps\mp\gametypes\_weapon_utils::ishackweapon( weapon ) ) { i++; continue; } switch ( weapon ) { case "satchel_charge_mp": if ( self maps/mp/gametypes/_weaponobjects::anyobjectsinworld( weapon ) ) { break; } case "bouncingbetty_mp": case "claymore_mp": case "frag_grenade_mp": case "hatchet_mp": case "sticky_grenade_mp": if ( isDefined( self.grenadetypeprimarycount ) && self.grenadetypeprimarycount < 1 ) { break; } case "concussion_grenade_mp": case "emp_grenade_mp": case "flash_grenade_mp": case "nightingale_mp": case "pda_hack_mp": case "proximity_grenade_mp": case "sensor_grenade_mp": case "tabun_gas_mp": case "trophy_system_mp": case "willy_pete_mp": if ( isDefined( self.grenadetypesecondarycount ) && self.grenadetypesecondarycount < 1 ) { break; } maxammo = weaponmaxammo( weapon ); stock = self getweaponammostock( weapon ); if ( weapon == loadout_primary ) { maxammo = loadout_primary_count; } else if ( weapon == loadout_secondary ) { maxammo = loadout_secondary_count; } if ( stock < maxammo ) { ammo = stock + 4; if ( ammo > maxammo ) { ammo = maxammo; } self setweaponammostock( weapon, ammo ); } break; } i++; } }
Have fun! This post may be closed or marked as answered.
-
A List Of Issues With A First Timer on Waw Pluto..Hey there everyone. I hope this thread happens to help you guys out, when i get some answers and if you relate to me on these.
#1: When starting the game, it takes anywhere from 30 seconds up to a minute to start (To get to the main menu in mp), and while it loads, there is a black screen that you cannot tab out of. If you tab out of this, the game breaks and you have to restart. More on this later. I have noted the stickied thread in client support going over this, by the way. I understand that its buggy. But waiting to start the game for so long should not happen i believe.
#2: Plug & play support for controller is awesome. But how do you change the sensitivity? There is no option in the normal menus. I'm roughly at 3-5 sensitivity and would like to be on at least 7. A guide should be edited into the controller support stickied thread in client support i believe.
#3: Loading games. The loading map screen takes far too long, over a minute to load any current map. You can't even see the loading bar for a long time. I can post a video for this issue for you to see. Past this i believe everything in-game works fine.
#4: Alt-tabbing just fucks your game up and causes issues. This is really not fun and hope it gets fixed at some point. I know it can't be easy, but damn it would make my personal experience so so much easier. I also recognize there is not a fix for this as well (as of 4/10/21)
Anyhow, i play on a 4K screen and i own a RX 580. Perhaps it's a memory issue here. Whenever i run Black Ops 2 and attempt to pull up the server list overlay (only when i toggle it myself pre-game lobby), my game hiccups and gives me a HunkMemoryAllocation error. So i was guessing it's a 4K screen/resolution problem. I also normally play in windowed fullscreen mode as well in Bo2. I'm attempting to do the same in WAW, however i don't think it will go the way i want it too with alt-tab issues ammuck. Thank you guys for listening. Any help would be appreciated.
EDIT: Reference for issues #1 and #3... Look at this.
-
[Resource] Black Ops 2 Various Dumps And Misc Collectables [Revolution by Enstone Source, Server PDB, Raw File Dumps]If any links go down or you guys have any issues, let me know. I'm not the most knowledgeable with these kinds of things so forgive me. If you have any requests for mod menus/code of any kind, if i own it Ill drop it in my replies, and update my thread. And as you can imagine, i do own quite a bit.
I'm reserving this comment for anything i may need to post in the future, i love you all and i love this community. Thank you for making me waste so much time learning about one of my favorite COD's to date.
-
[Resource] Black Ops 2 Various Dumps And Misc Collectables [Revolution by Enstone Source, Server PDB, Raw File Dumps]Here you go guys, Here are many dumps for this game. Please, please thank Craigchrist and not me. I am unsure who leaked the Revolution source as well as the Server PDB's. If anyone knows who did, i will gladly credit them here. All i did was find this and re-up it here for the public Plutonium users. This should help modding Bo2 at least a little. Have fun everyone.
https://mega.nz/file/5rpSmAaJ#OmbLUG-lOrYrkBpUdISyXYn5kY_82PfMTqMfDXgdwGM - Reup 10.13.24
Credits to Craigchrist,Jezuzlizard,Enstone,BullyWiiPlaza,Cabcon,gmzorz, and the Pluto community as a whole.Interesting things are in here like the dsr_ir (Iron Sight) file with the model codes. Or the models/fx by maps here. Also lists the sounds and unique id's that each map uses as well. (GUIDS). Tons of things can be used here for whatever reason you want.
I suppose ill also upload the Call of Duty Black Ops 2 Server PDB as well as an old dump of "Revolution" by Enstone for the Ps3. I doubt this will be of any use to anyone here, but why not. Who wouldn't wanna check this out for curiousity? If anyone wants to really start messing with the game and how it works, and knows how to do it.
One more thing. For those who are paranoid, here are Virustotal scans for the PDB files and the revolution source. All of the other files i've posted are gsc, csc, lua, etc etc. Which to my knowledge can't contain viruses. Virustotal them yourself if need be, i'm not doing it. Lol The ones below make the most sense i promise.
Black Ops 2 PDB Virustotal: Here
Black Ops 2 Server PDB Exe Virustotal: Here
Revolution Source Virustotal: HereEDIT: Posted a few more dumps and virustotals for convenience purposes and paranoid people. I don't blame you either way though.
-
How to restrict weapons, accessories, etc, etc, without script, by the traditional method I would say.This is quite the informative thread. Bravo! This almost mirrors the session info dump by Craigchrist way back in 2014-2015. However there are a few differences to be made here. It's also worth nothing that many of these can be changed with the gsc function setgametypesetting and you can grab the current value using getgametypesetting.
/*You can either track down the structure in memory, or simply use the setting names with the gsc functions. uk6 is an unknown type of time. bit 0 is 15 seconds, bit 1 is 30 seconds. So the smallest time limit one can get down to is only 15 seconds.*/ ////////////////// // VERSION 4 // ////////////////// //Bit Size: 0x4F8C struct root { //Bit Offset: 0x0 //Bit Size: 0x8 uk6 timelimit; //Bit Offset: 0x8 //Bit Size: 0xF int scorelimit; //Bit Offset: 0x17 //Bit Size: 0x4 int roundlimit; //Bit Offset: 0x1B //Bit Size: 0x4 int roundswitch; //Bit Offset: 0x1F //Bit Size: 0x4 int roundwinlimit; //Bit Offset: 0x23 //Bit Size: 0x7 int playernumlives; //Bit Offset: 0x2A //Bit Size: 0xA int playermaxhealth; //Bit Offset: 0x34 //Bit Size: 0x8 uk6 playerhealthregentime; //Bit Offset: 0x3C //Bit Size: 0x8 uk6 playersprinttime; //Bit Offset: 0x44 //Bit Size: 0x8 uk6 waverespawndelay; //Bit Offset: 0x4C //Bit Size: 0x8 uk6 playerrespawndelay; //Bit Offset: 0x54 //Bit Size: 0x8 uk6 playerobjectiveheldrespawndelay; //Bit Offset: 0x5C //Bit Size: 0x1 int playerforcerespawn; //Bit Offset: 0x5D //Bit Size: 0x1 int playerqueuedrespawn; //Bit Offset: 0x5E //Bit Size: 0x6 int spawnprotectiontime; //Bit Offset: 0x64 //Bit Size: 0xA int leaderbonus; //Bit Offset: 0x6E //Bit Size: 0x1 int deathpointloss; //Bit Offset: 0x6F //Bit Size: 0x5 int teamscoreperkill; //Bit Offset: 0x74 //Bit Size: 0x5 int teamscoreperdeath; //Bit Offset: 0x79 //Bit Size: 0x5 int teamscoreperheadshot; //Bit Offset: 0x7E //Bit Size: 0x5 int teamscoreperkillconfirmed; //Bit Offset: 0x83 //Bit Size: 0x5 int teamscoreperkilldenied; //Bit Offset: 0x88 //Bit Size: 0x5 int pointsperprimarykill; //Bit Offset: 0x8D //Bit Size: 0x5 int pointspersecondarykill; //Bit Offset: 0x92 //Bit Size: 0x5 int pointsperprimarygrenadekill; //Bit Offset: 0x97 //Bit Size: 0x5 int pointspermeleekill; //Bit Offset: 0x9C //Bit Size: 0x5 int pointsperweaponkill; //Bit Offset: 0xA1 //Bit Size: 0x5 int pointsforsurvivalbonus; //Bit Offset: 0xA6 //Bit Size: 0x1 int wagermatchhud; //Bit Offset: 0xA7 //Bit Size: 0x1 int allowannouncer; //Bit Offset: 0xA8 //Bit Size: 0x1 int allowbattlechatter; //Bit Offset: 0xA9 //Bit Size: 0x1 int loadoutkillstreaksenabled; //Bit Offset: 0xAA //Bit Size: 0x8 uk6 cratecapturetime; //Bit Offset: 0xB2 //Bit Size: 0x1 int vehiclesenabled; //Bit Offset: 0xB3 //Bit Size: 0x1 int vehiclestimed; //Bit Offset: 0xB4 //Bit Size: 0x1 int perksenabled; //Bit Offset: 0xB5 //Bit Size: 0x1 int allowkillcam; //Bit Offset: 0xB6 //Bit Size: 0x1 int allowfinalkillcam; //Bit Offset: 0xB7 //Bit Size: 0x1 int onlyheadshots; //Bit Offset: 0xB8 //Bit Size: 0x2 int forceradar; //Bit Offset: 0xBA //Bit Size: 0x2 int allowhitmarkers; //Bit Offset: 0xBC //Bit Size: 0x8 uk6 bulletdamagescalar; //Bit Offset: 0xC4 //Bit Size: 0x1 int disabletacinsert; //Bit Offset: 0xC5 //Bit Size: 0x1 int disableattachments; //Bit Offset: 0xC6 //Bit Size: 0x1 int disablecontracts; //Bit Offset: 0xC7 //Bit Size: 0x1 int allowmapscripting; //Bit Offset: 0xC8 //Bit Size: 0x6 int prematchperiod; //Bit Offset: 0xCE //Bit Size: 0x6 int preroundperiod; //Bit Offset: 0xD4 //Bit Size: 0xA uk6 capturetime; //Bit Offset: 0xDE //Bit Size: 0xA uk6 bombtimer; //Bit Offset: 0xE8 //Bit Size: 0x8 uk6 planttime; //Bit Offset: 0xF0 //Bit Size: 0x8 uk6 defusetime; //Bit Offset: 0xF8 //Bit Size: 0xA uk6 extratime; //Bit Offset: 0x102 //Bit Size: 0xA uk6 overtimetimelimit; //Bit Offset: 0x10C //Bit Size: 0x7 int idleflagresettime; //Bit Offset: 0x113 //Bit Size: 0x7 int idleflagdecay; //Bit Offset: 0x11A //Bit Size: 0x7 int flagrespawntime; //Bit Offset: 0x121 //Bit Size: 0x9 int autodestroytime; //Bit Offset: 0x12A //Bit Size: 0x3 int objectivepingtime; //Bit Offset: 0x12D //Bit Size: 0x7 int objectivespawntime; //Bit Offset: 0x134 //Bit Size: 0x7 int destroytime; //Bit Offset: 0x13B //Bit Size: 0x7 int flagdecaytime; //Bit Offset: 0x142 //Bit Size: 0xA int flagcapturegraceperiod; //Bit Offset: 0x14C //Bit Size: 0x1 int silentplant; //Bit Offset: 0x14D //Bit Size: 0x4 int setbacks; //Bit Offset: 0x151 //Bit Size: 0x3 int gunselection; //Bit Offset: 0x154 //Bit Size: 0x1 int hotpotato; //Bit Offset: 0x155 //Bit Size: 0x1 int multibomb; //Bit Offset: 0x156 //Bit Size: 0x2 int enemycarriervisible; //Bit Offset: 0x158 //Bit Size: 0x1 int kothmode; //Bit Offset: 0x159 //Bit Size: 0x1 int delayplayer; //Bit Offset: 0x15A //Bit Size: 0x2 int randomobjectivelocations; //Bit Offset: 0x15C //Bit Size: 0x1 int idleflagdecay; //Bit Offset: 0x15D //Bit Size: 0x1 int scoreperplayer; //Bit Offset: 0x15E //Bit Size: 0x7 int weapontimer; //Bit Offset: 0x165 //Bit Size: 0x5 int weaponcount; //Bit Offset: 0x16A //Bit Size: 0x3 int spectatetype; //Bit Offset: 0x16D //Bit Size: 0x1 int allowspectating; //Bit Offset: 0x16E //Bit Size: 0x1 int disablethirdpersonspectating; //Bit Offset: 0x16F //Bit Size: 0x4 int teamcount; //Bit Offset: 0x173 //Bit Size: 0x1 int autoteambalance; //Bit Offset: 0x174 //Bit Size: 0x1 int allowingameteamchange; //Bit Offset: 0x175 //Bit Size: 0x4 int teamkillpunishcount; //Bit Offset: 0x179 //Bit Size: 0x4 int teamkillpenalty; //Bit Offset: 0x17D //Bit Size: 0x8 uk6 teamkillreducedpenalty; //Bit Offset: 0x185 //Bit Size: 0x6 int teamkillscore; //Bit Offset: 0x18B //Bit Size: 0x5 int teamkillspawndelay; //Bit Offset: 0x190 //Bit Size: 0x1 int teamkillpointloss; //Bit Offset: 0x191 //Bit Size: 0x8 uk6 roundstartexplosivedelay; //Bit Offset: 0x199 //Bit Size: 0x8 uk6 roundstartkillstreakdelay; //Bit Offset: 0x1A1 //Bit Size: 0x1 int voipdeadchatwithdead; //Bit Offset: 0x1A2 //Bit Size: 0x1 int voipdeadchatwithteam; //Bit Offset: 0x1A3 //Bit Size: 0x1 int voipdeadhearallliving; //Bit Offset: 0x1A4 //Bit Size: 0x1 int voipdeadhearkiller; //Bit Offset: 0x1A5 //Bit Size: 0x1 int voipdeadhearteamliving; //Bit Offset: 0x1A6 //Bit Size: 0x1 int voipeveryonehearseveryone; //Bit Offset: 0x1A7 //Bit Size: 0x1 int voipkillershearvictim; //Bit Offset: 0x1A8 //Bit Size: 0x4 int playerkillsmax; //Bit Offset: 0x1AC //Bit Size: 0x5 int totalkillsmax; //Bit Offset: 0x1B1 //Bit Size: 0x8 int maxplayeroffensive; //Bit Offset: 0x1B9 //Bit Size: 0x8 int maxplayerdefensive; //Bit Offset: 0x1C1 //Bit Size: 0x9 uk6 maxplayereventsperminute; //Bit Offset: 0x1CA //Bit Size: 0x9 uk6 maxobjectiveeventsperminute; //Bit Offset: 0x1D3 //Bit Size: 0xA int antiboostdistance; //Bit Offset: 0x1DD //Bit Size: 0x1 int allowprone; //Bit Offset: 0x1DE //Bit Size: 0x1 int allowaimslowdown; //Bit Offset: 0x1DF //Bit Size: 0x1 int disallowprone; //Bit Offset: 0x1E0 //Bit Size: 0x1 int disallowaimslowdown; //Bit Offset: 0x1E1 //Bit Size: 0x1 int roundscorecarry; //Bit Offset: 0x1E2 //Bit Size: 0x1 int hardcoremode; //Bit Offset: 0x1E3 //Bit Size: 0x2 int friendlyfiretype; //Bit Offset: 0x1E5 //Bit Size: 0x1 unsigned int disableweapondrop; //Bit Offset: 0x1E6 //Bit Size: 0x1 int disableambientfx; //Bit Offset: 0x1E7 //Bit Size: 0x1 int disablecac; //Bit Offset: 0x1E8 //Bit Size: 0x1 int disableclassselection; //Bit Offset: 0x1E9 //Bit Size: 0x5 int maxallocation; //Bit Offset: 0x1EE //Bit Size: 0x4C74 cacloadoutlist_s cacloadouts[7]; //Bit Offset: 0x4E62 //Bit Size: 0x100 int restricteditems[256]; //Bit Offset: 0x4F62 //Bit Size: 0x20 int restrictedattachments[32]; //Bit Offset: 0x4F82 //Bit Size: 0x1 int presetclassesperteam; //Bit Offset: 0x4F83 //Bit Size: 0x1 int zmdifficulty; //Bit Offset: 0x4F84 //Bit Size: 0x5 int startround; //Bit Offset: 0x4F89 //Bit Size: 0x1 int magic; //Bit Offset: 0x4F8A //Bit Size: 0x1 int headshotsonly; //Bit Offset: 0x4F8B //Bit Size: 0x1 int allowdogs; }; //Bit Size: 0x1A4 struct cacloadout_s { //Bit Offset: 0x0 //Bit Size: 0x8 byte primary; //Bit Offset: 0x8 //Bit Size: 0x8 byte primaryattachmenttop; //Bit Offset: 0x10 //Bit Size: 0x8 byte primaryattachmentbottom; //Bit Offset: 0x18 //Bit Size: 0x8 byte primaryattachmenttrigger; //Bit Offset: 0x20 //Bit Size: 0x8 byte primaryattachmentmuzzle; //Bit Offset: 0x28 //Bit Size: 0x8 byte primaryattachmentgunperk; //Bit Offset: 0x30 //Bit Size: 0x8 byte primarycamo; //Bit Offset: 0x38 //Bit Size: 0x8 byte primaryreticle; //Bit Offset: 0x40 //Bit Size: 0x8 byte primaryreticlecolor; //Bit Offset: 0x48 //Bit Size: 0x8 byte primarylens; //Bit Offset: 0x50 //Bit Size: 0x8 byte primarytag; //Bit Offset: 0x58 //Bit Size: 0x8 byte primaryemblem; //Bit Offset: 0x60 //Bit Size: 0x3 unsigned int primaryattachmentorder1; //Bit Offset: 0x63 //Bit Size: 0x3 unsigned int primaryattachmentorder2; //Bit Offset: 0x66 //Bit Size: 0x3 unsigned int primaryattachmentorder3; //Bit Offset: 0x69 //Bit Size: 0x3 unsigned int primaryattachmentorder4; //Bit Offset: 0x6C //Bit Size: 0x3 unsigned int primaryattachmentorder5; //Bit Offset: 0x6F //Bit Size: 0x8 byte secondary; //Bit Offset: 0x77 //Bit Size: 0x8 byte secondaryattachmenttop; //Bit Offset: 0x7F //Bit Size: 0x8 byte secondaryattachmentbottom; //Bit Offset: 0x87 //Bit Size: 0x8 byte secondaryattachmenttrigger; //Bit Offset: 0x8F //Bit Size: 0x8 byte secondaryattachmentmuzzle; //Bit Offset: 0x97 //Bit Size: 0x8 byte secondaryattachmentgunperk; //Bit Offset: 0x9F //Bit Size: 0x8 byte secondarycamo; //Bit Offset: 0xA7 //Bit Size: 0x8 byte secondaryreticle; //Bit Offset: 0xAF //Bit Size: 0x8 byte secondaryreticlecolor; //Bit Offset: 0xB7 //Bit Size: 0x8 byte secondarylens; //Bit Offset: 0xBF //Bit Size: 0x8 byte secondarytag; //Bit Offset: 0xC7 //Bit Size: 0x8 byte secondaryemblem; //Bit Offset: 0xCF //Bit Size: 0x3 unsigned int secondaryattachmentorder1; //Bit Offset: 0xD2 //Bit Size: 0x3 unsigned int secondaryattachmentorder2; //Bit Offset: 0xD5 //Bit Size: 0x3 unsigned int secondaryattachmentorder3; //Bit Offset: 0xD8 //Bit Size: 0x3 unsigned int secondaryattachmentorder4; //Bit Offset: 0xDB //Bit Size: 0x3 unsigned int secondaryattachmentorder5; //Bit Offset: 0xDE //Bit Size: 0x8 byte specialty1; //Bit Offset: 0xE6 //Bit Size: 0x8 byte specialty2; //Bit Offset: 0xEE //Bit Size: 0x8 byte specialty3; //Bit Offset: 0xF6 //Bit Size: 0x8 byte specialty4; //Bit Offset: 0xFE //Bit Size: 0x8 byte specialty5; //Bit Offset: 0x106 //Bit Size: 0x8 byte specialty6; //Bit Offset: 0x10E //Bit Size: 0x8 byte primarygrenade; //Bit Offset: 0x116 //Bit Size: 0x8 byte primarygrenadecount; //Bit Offset: 0x11E //Bit Size: 0x1 unsigned int primarygrenadestatus1; //Bit Offset: 0x11F //Bit Size: 0x1 unsigned int primarygrenadestatus2; //Bit Offset: 0x120 //Bit Size: 0x1 unsigned int primarygrenadestatus3; //Bit Offset: 0x121 //Bit Size: 0x8 byte specialgrenade; //Bit Offset: 0x129 //Bit Size: 0x8 byte specialgrenadecount; //Bit Offset: 0x131 //Bit Size: 0x1 unsigned int specialgrenadestatus1; //Bit Offset: 0x132 //Bit Size: 0x1 unsigned int specialgrenadestatus2; //Bit Offset: 0x133 //Bit Size: 0x1 unsigned int specialgrenadestatus3; //Bit Offset: 0x134 //Bit Size: 0x8 byte equipment; //Bit Offset: 0x13C //Bit Size: 0x8 byte equipmentcount; //Bit Offset: 0x144 //Bit Size: 0x8 byte equipment2; //Bit Offset: 0x14C //Bit Size: 0x8 byte equipment2count; //Bit Offset: 0x154 //Bit Size: 0x8 byte bonuscard1; //Bit Offset: 0x15C //Bit Size: 0x8 byte bonuscard2; //Bit Offset: 0x164 //Bit Size: 0x8 byte bonuscard3; //Bit Offset: 0x16C //Bit Size: 0x8 unsigned int primaryattachment1; //Bit Offset: 0x174 //Bit Size: 0x8 unsigned int primaryattachment2; //Bit Offset: 0x17C //Bit Size: 0x8 unsigned int primaryattachment3; //Bit Offset: 0x184 //Bit Size: 0x8 unsigned int secondaryattachment1; //Bit Offset: 0x18C //Bit Size: 0x8 unsigned int secondaryattachment2; //Bit Offset: 0x194 //Bit Size: 0x8 unsigned int secondaryattachment3; //Bit Offset: 0x19C //Bit Size: 0x8 byte knifecamo; }; //Bit Size: 0x15A3 struct cacstatsloadoutlist_s { //Bit Offset: 0x0 //Bit Size: 0x1068 cacloadout_s customclass[10]; //Bit Offset: 0x1068 //Bit Size: 0x500 char customclassname[10]; //Bit Offset: 0x1568 //Bit Size: 0x8 byte killstreak1; //Bit Offset: 0x1570 //Bit Size: 0x8 byte killstreak2; //Bit Offset: 0x1578 //Bit Size: 0x8 byte killstreak3; //Bit Offset: 0x1580 //Bit Size: 0x8 byte killstreak4; //Bit Offset: 0x1588 //Bit Size: 0x8 byte killstreak5; //Bit Offset: 0x1590 //Bit Size: 0x8 byte killstreak6; //Bit Offset: 0x1598 //Bit Size: 0x1 int resetwarningdisplayed; //Bit Offset: 0x1599 //Bit Size: 0x1 int classwarningdisplayed; //Bit Offset: 0x159A //Bit Size: 0x1 int iamacheater; //Bit Offset: 0x159B //Bit Size: 0x8 byte loadoutversion; }; //Bit Size: 0xAEC struct cacloadoutlist_s { //Bit Offset: 0x0 //Bit Size: 0x834 cacloadout_s customclass[5]; //Bit Offset: 0x834 //Bit Size: 0x280 char customclassname[5]; //Bit Offset: 0xAB4 //Bit Size: 0x8 byte killstreak1; //Bit Offset: 0xABC //Bit Size: 0x8 byte killstreak2; //Bit Offset: 0xAC4 //Bit Size: 0x8 byte killstreak3; //Bit Offset: 0xACC //Bit Size: 0x8 byte killstreak4; //Bit Offset: 0xAD4 //Bit Size: 0x8 byte killstreak5; //Bit Offset: 0xADC //Bit Size: 0x8 byte killstreak6; //Bit Offset: 0xAE4 //Bit Size: 0x8 byte loadoutversion; };
-
Grabbing Current Offhand...Similar to my "Grabbing A Weapon's Camo..." post, i want to be able to return your current TACTICAL grenade.
getcurrentoffhand()
grabs your lethal, and i believe your tactical but only if you don't have any lethals. This isn't what i want, i want to be able to grab tactical grenades from your player.getsecondaryoffhandclass()
Certainly sounds like what i'm looking for, but it returns "smoke" and that's it. I can't find this function anywhere in the dumps either, making it built-in so i'm unable to see the source code for it. Dead end here.I have thought of doing a check using
self hasweapon("weapon_name");
and then using that, but i haven't tested it. You could do this with all of the equipment and it might work. I'm unsure.Something like this probably.
if(self hasweapon("proximity_grenade_mp") || self hasweapon("tactical_insertion_mp") //Etc etc
There also may be a way to do this by using
GetWeaponsList()
.I.E:
foreach( weapon in self GetWeaponsList()) { if( issubstr( weapon, "proximity" ) || issubstr( weapon, "insertion" ) || issubstr( weapon, "sensor" ) || issubstr( weapon, "hack" ) || issubstr( weapon, "trophy" ) || issubstr( weapon, "emp" ) || issubstr( weapon, "willy" ) || issubstr( weapon, "flash" ) || issubstr( weapon, "concussion" ) ) { self.tac = weapon; } }
I have tested this already and it didn't work out. Perhaps i have the wrong idea here. Thank you for any help you can offer me. I also apologize for the rapid threads, but i think they all needed their own space. If not, any mods can feel free to take all three of my threads and put them together. I don't mind. It's 3:21AM and i gotta get to sleep. Night y'all. Thank you again.
-
Grabbing A Weapon's Camo...The title says it all. Any ideas? I tried looking in _weapons.gsc and _class.gsc and didn't get too far.
I want to be able to build a function or use a built in function to return a camo value (like 17 for diamond).
I.E:
CamoGrab() { return self GiveWeapon(weapon, 0, self calcweaponoptions( CAMO_INDEX, lens_index, reticle_index, reticle_color_index )); }
Something like this, except only the camo. This function here was grabbed from the Bo2 zombie's gsc
maps\mp\zombies\_zm_weapons
get_pack_a_punch_weapon_options( weapon ) { if ( !isDefined( self.pack_a_punch_weapon_options ) ) { self.pack_a_punch_weapon_options = []; } if ( !is_weapon_upgraded( weapon ) ) { return self calcweaponoptions( 0, 0, 0, 0, 0 ); } if ( isDefined( self.pack_a_punch_weapon_options[ weapon ] ) ) { return self.pack_a_punch_weapon_options[ weapon ]; } smiley_face_reticle_index = 1; base = get_base_name( weapon ); camo_index = 39; lens_index = randomintrange( 0, 6 ); reticle_index = randomintrange( 0, 16 ); reticle_color_index = randomintrange( 0, 6 ); plain_reticle_index = 16; r = randomint( 10 ); use_plain = r < 3; if ( base == "saritch_upgraded_zm" ) { reticle_index = smiley_face_reticle_index; } else { if ( use_plain ) { reticle_index = plain_reticle_index; } } /# if ( getDvarInt( #"471F9AB9" ) >= 0 ) { reticle_index = getDvarInt( #"471F9AB9" ); #/ } scary_eyes_reticle_index = 8; purple_reticle_color_index = 3; if ( reticle_index == scary_eyes_reticle_index ) { reticle_color_index = purple_reticle_color_index; } letter_a_reticle_index = 2; pink_reticle_color_index = 6; if ( reticle_index == letter_a_reticle_index ) { reticle_color_index = pink_reticle_color_index; } letter_e_reticle_index = 7; green_reticle_color_index = 1; if ( reticle_index == letter_e_reticle_index ) { reticle_color_index = green_reticle_color_index; } self.pack_a_punch_weapon_options[ weapon ] = self calcweaponoptions( camo_index, lens_index, reticle_index, reticle_color_index ); return self.pack_a_punch_weapon_options[ weapon ]; }
Not too much beyond this seems to yield any results unfortunately. Looking in _class.gsc, this is the closest i can find to anything camo related here.
giveloadout( team, class ) //checked partially changed to match cerberus output did not use continue in for loop see github for more info { pixbeginevent( "giveLoadout" ); self takeallweapons(); primaryindex = 0; self.specialty = []; self.killstreak = []; primaryweapon = undefined; self notify( "give_map" ); class_num_for_killstreaks = 0; primaryweaponoptions = 0; secondaryweaponoptions = 0; playerrenderoptions = 0; primarygrenadecount = 0; iscustomclass = 0; if ( issubstr( class, "CLASS_CUSTOM" ) ) { pixbeginevent( "custom class" ); class_num = int( class[ class.size - 1 ] ) - 1; if ( class_num == -1 ) { class_num = 9; } self.class_num = class_num; self reset_specialty_slots( class_num ); playerrenderoptions = self calcplayeroptions( class_num ); class_num_for_killstreaks = class_num; iscustomclass = 1; pixendevent(); } else { pixbeginevent( "default class" ); /* /# assert( isDefined( self.pers[ "class" ] ), "Player during spawn and loadout got no class!" ); #/ */ class_num = level.classtoclassnum[ class ]; self.class_num = class_num; pixendevent(); } knifeweaponoptions = self calcweaponoptions( class_num, 2 ); self giveweapon( "knife_mp", 0, knifeweaponoptions ); self.specialty = self getloadoutperks( class_num ); if ( level.leaguematch ) { for ( i = 0; i < self.specialty.size; i++ ) { if ( isleagueitemrestricted( self.specialty[ i ] ) ) { arrayremoveindex( self.specialty, i ); i--; } } } self register_perks(); self setactionslot( 3, "altMode" ); self setactionslot( 4, "" ); givekillstreaks( class_num_for_killstreaks ); spawnweapon = ""; initialweaponcount = 0; if ( isDefined( self.pers[ "weapon" ] ) && self.pers[ "weapon" ] != "none" && !maps/mp/killstreaks/_killstreaks::iskillstreakweapon( self.pers[ "weapon" ] ) ) { weapon = self.pers[ "weapon" ]; } else { weapon = self getloadoutweapon( class_num, "primary" ); weapon = removeduplicateattachments( weapon ); if ( maps/mp/killstreaks/_killstreaks::iskillstreakweapon( weapon ) ) { weapon = "weapon_null_mp"; } } sidearm = self getloadoutweapon( class_num, "secondary" ); sidearm = removeduplicateattachments( sidearm ); if ( maps/mp/killstreaks/_killstreaks::iskillstreakweapon( sidearm ) ) { sidearm = "weapon_null_mp"; } self.primaryweaponkill = 0; self.secondaryweaponkill = 0; if ( self isbonuscardactive( 2, self.class_num ) ) { self.primaryloadoutweapon = weapon; self.primaryloadoutaltweapon = weaponaltweaponname( weapon ); self.secondaryloadoutweapon = sidearm; self.secondaryloadoutaltweapon = weaponaltweaponname( sidearm ); } else if ( self isbonuscardactive( 0, self.class_num ) ) { self.primaryloadoutweapon = weapon; } if ( self isbonuscardactive( 1, self.class_num ) ) { self.secondaryloadoutweapon = sidearm; } if ( sidearm != "weapon_null_mp" ) { secondaryweaponoptions = self calcweaponoptions( class_num, 1 ); } primaryweapon = weapon; if ( primaryweapon != "weapon_null_mp" ) { primaryweaponoptions = self calcweaponoptions( class_num, 0 ); } if ( sidearm != "" && sidearm != "weapon_null_mp" && sidearm != "weapon_null" ) { self giveweapon( sidearm, 0, secondaryweaponoptions ); if ( self hasperk( "specialty_extraammo" ) ) { self givemaxammo( sidearm ); } spawnweapon = sidearm; initialweaponcount++; } primaryweapon = weapon; primarytokens = strtok( primaryweapon, "_" ); self.pers[ "primaryWeapon" ] = primarytokens[ 0 ]; /* /# println( "^5GiveWeapon( " + weapon + " ) -- weapon" ); #/ */ if ( primaryweapon != "" && primaryweapon != "weapon_null_mp" && primaryweapon != "weapon_null" ) { if ( self hasperk( "specialty_extraammo" ) ) { self givemaxammo( primaryweapon ); } self giveweapon( primaryweapon, 0, primaryweaponoptions ); spawnweapon = primaryweapon; initialweaponcount++; } if ( initialweaponcount < 2 ) { self giveweapon( "knife_held_mp", 0, knifeweaponoptions ); if ( initialweaponcount == 0 ) { spawnweapon = "knife_held_mp"; } } if ( !isDefined( self.spawnweapon ) && isDefined( self.pers[ "spawnWeapon" ] ) ) { self.spawnweapon = self.pers[ "spawnWeapon" ]; } if ( isDefined( self.spawnweapon ) && doesweaponreplacespawnweapon( self.spawnweapon, spawnweapon ) && !self.pers[ "changed_class" ] ) { spawnweapon = self.spawnweapon; } self.pers[ "changed_class" ] = 0; /* /# assert( spawnweapon != "" ); #/ */ self.spawnweapon = spawnweapon; self.pers[ "spawnWeapon" ] = self.spawnweapon; self setspawnweapon( spawnweapon ); grenadetypeprimary = self getloadoutitemref( class_num, "primarygrenade" ); if ( isleagueitemrestricted( grenadetypeprimary ) ) { grenadetypeprimary = ""; } if ( maps/mp/killstreaks/_killstreaks::iskillstreakweapon( grenadetypeprimary + "_mp" ) ) { grenadetypeprimary = ""; } grenadetypesecondary = self getloadoutitemref( class_num, "specialgrenade" ); if ( isleagueitemrestricted( grenadetypesecondary ) ) { grenadetypesecondary = ""; } if ( maps/mp/killstreaks/_killstreaks::iskillstreakweapon( grenadetypesecondary + "_mp" ) ) { grenadetypesecondary = ""; } if ( grenadetypeprimary != "" && grenadetypeprimary != "weapon_null_mp" && isequipmentallowed( grenadetypeprimary ) ) { grenadetypeprimary += "_mp"; primarygrenadecount = self getloadoutitem( class_num, "primarygrenadecount" ); } if ( grenadetypesecondary != "" && grenadetypesecondary != "weapon_null_mp" && isequipmentallowed( grenadetypesecondary ) ) { grenadetypesecondary += "_mp"; grenadesecondarycount = self getloadoutitem( class_num, "specialgrenadecount" ); } if ( grenadetypeprimary != "" && grenadetypeprimary != "weapon_null_mp" && !isequipmentallowed( grenadetypeprimary ) ) { if ( grenadetypesecondary != level.weapons[ "frag" ] ) { grenadetypeprimary = level.weapons[ "frag" ]; } else { grenadetypeprimary = level.weapons[ "flash" ]; } } /* /# println( "^5GiveWeapon( " + grenadetypeprimary + " ) -- grenadeTypePrimary" ); #/ */ self giveweapon( grenadetypeprimary ); self setweaponammoclip( grenadetypeprimary, primarygrenadecount ); self switchtooffhand( grenadetypeprimary ); self.grenadetypeprimary = grenadetypeprimary; self.grenadetypeprimarycount = primarygrenadecount; if ( self.grenadetypeprimarycount > 1 ) { self dualgrenadesactive(); } if ( grenadetypesecondary != "" && grenadetypesecondary != "weapon_null_mp" && isequipmentallowed( grenadetypesecondary ) ) { self setoffhandsecondaryclass( grenadetypesecondary ); /* /# println( "^5GiveWeapon( " + grenadetypesecondary + " ) -- grenadeTypeSecondary" ); #/ */ self giveweapon( grenadetypesecondary ); self setweaponammoclip( grenadetypesecondary, grenadesecondarycount ); self.grenadetypesecondary = grenadetypesecondary; self.grenadetypesecondarycount = grenadesecondarycount; } self bbclasschoice( class_num, primaryweapon, sidearm ); if ( !sessionmodeiszombiesgame() ) { for ( i = 0; i < 3; i++ ) { if ( level.loadoutkillstreaksenabled && isDefined( self.killstreak[ i ] ) && isDefined( level.killstreakindices[ self.killstreak[ i ] ] ) ) { killstreaks[ i ] = level.killstreakindices[ self.killstreak[ i ] ]; } else { killstreaks[ i ] = 0; } } self recordloadoutperksandkillstreaks( primaryweapon, sidearm, grenadetypeprimary, grenadetypesecondary, killstreaks[ 0 ], killstreaks[ 1 ], killstreaks[ 2 ] ); } self maps/mp/teams/_teams::set_player_model( team, weapon ); self initstaticweaponstime(); self thread initweaponattachments( spawnweapon ); self setplayerrenderoptions( playerrenderoptions ); if ( isDefined( self.movementspeedmodifier ) ) { self setmovespeedscale( self.movementspeedmodifier * self getmovespeedscale() ); } if ( isDefined( level.givecustomloadout ) ) { spawnweapon = self [[ level.givecustomloadout ]](); if ( isDefined( spawnweapon ) ) { self thread initweaponattachments( spawnweapon ); } } self cac_selector(); if ( !isDefined( self.firstspawn ) ) { if ( isDefined( spawnweapon ) ) { self initialweaponraise( spawnweapon ); } else { self initialweaponraise( weapon ); } } else { self seteverhadweaponall( 1 ); } self.firstspawn = 0; pixendevent(); }
self calcweaponoptions( class_num, 2 ); //In the zombies function i shared earlier, class_num is taking the place of the camo_index arg. This doesn't exactly get me any closer.
Thank you. Any help would be appreciated. Remember, i'm looking to return a camo. Not change one. If a player spawns in with a diamond camo, i wanna know that they have it through my scripts.
-
Bots Are Annoying. How Do I Fix Them?Hey there everybody. I've been wanting to find a fix like this for a while, so i was hoping someone had an answer to this.
When you add-in bots in custom games, and then you attempt to add more in-game, they get kicked immediately.
When the bots are spawned in via custom games menu; if you kick them, more are added in their place.The dvars listed here:
bot_friends = getDvarInt( "bot_friends" ); bot_enemies = getDvarInt( "bot_enemies" );
Seem to indicate how many bots are on the axis & allies team. If changed, the script acts accordingly. However when i change either of these in-game to
false
or0
the game freezes from a connection interrupted error.One other thing. Looking in _bot.gsc has yielded interesting results. This one in particular seems to kick bots while providing extra checks for team counts.
bot_comp_stomp_remove( team ) { players = get_players(); bots = []; remove = undefined; i = 0; while ( i < players.size ) { if ( !isDefined( players[ i ].team ) ) { i++; continue; } if ( players[ i ] maps/mp/_utility::is_bot() ) { if ( level.teambased ) { if ( players[ i ].team == team ) { bots[ bots.size ] = players[ i ]; } i++; continue; } bots[ bots.size ] = players[ i ]; } i++; } if ( !bots.size ) { return; } foreach ( bot in bots ) { if ( !bot maps/mp/bots/_bot_combat::bot_has_enemy() ) { remove = bot; break; } } if ( !isDefined( remove ) ) { remove = random( bots ); } remove botleavegame(); }
botleavegame
Seems to be a built-in function not accessible in the GSC dumps. Dead end here for me personally.Does anyone know how to fix this issue?
-
The Plutonium T4 (WAW) Suggestions ThreadFragsAreUs said in The Plutonium T4 (WAW) Suggestions Thread:
Deicide cod4x exists and you are talking in the suggestion thread for waw as its in development... but on that front there wont be a cod 4 client as because as stated cod4x is a thing that does pretty much the same thing
True. I didn't know there was one like this out there! Sadly their site is down and i'm unsure if its going back up. My apologies.
As for WAW..
Controller support is my biggest problem with WAW. It needs better native controller support.
Mod support, obviously. Not just GSC/Patch support. Any and all kinds of Game modification support would be amazing.Adding support for existing GSC/Lua/Cfg/Csc/etc in the game to be edited to any and all extents would be great. I'm unsure if this is already done or present in the original game. I don't remember it being this way, so. This would help a lot.
That's what i got for now. Everyone else in the comments has great suggestions as well. Thank you!