if( issubstr( weapon, "upgraded" ) ) help
-
Im working on something, I can be a bit of a dummy. Let's say I have a
mp5k_zm, I upgrade it and it comes back asmp5k_upgraded_zm, how can I use...if( issubstr( weapon, "upgraded" ) ) { return "upgraded"; }to return the original weapon name where the weapon is still upgraded but will still check as
mp5k_zmI have triedget_base_name( weapon )it's just a big headache just trying to cut some of the code in half, I was told you can do it withif( issubstr )and help will be amazing -
Please stop posting questions in the release section.
"How do I do X" is NOT a release that you share.You should be able to do it with
subStr(weapon, "upgraded")[0] -
Im working on something, I can be a bit of a dummy. Let's say I have a
mp5k_zm, I upgrade it and it comes back asmp5k_upgraded_zm, how can I use...if( issubstr( weapon, "upgraded" ) ) { return "upgraded"; }to return the original weapon name where the weapon is still upgraded but will still check as
mp5k_zmI have triedget_base_name( weapon )it's just a big headache just trying to cut some of the code in half, I was told you can do it withif( issubstr )and help will be amazingMeat Missile The pattern for defined weapons is pretty simple. It's <weaponname> + "_zm"(except for some special weapons, Treyarch is braindead) or if its upgraded <weaponname> + "upgraded" + "_zm.
I would do a strTok( weapon, "" ) and rebuild the string without the upgraded part. You can concatenate strings with "" to rebuild the string in a for loop.
-
Please stop posting questions in the release section.
"How do I do X" is NOT a release that you share.You should be able to do it with
subStr(weapon, "upgraded")[0]Resxt Sorry Im bad at reading forums like this
-
base = get_base_weapon_name( weapon, issubstr( weapon, "upgraded" ) ); -
has_weapon( weapon ) { if( self has_weapon_or_upgrade( weapon ) ) { if( is_weapon_upgraded( weapon ) ) { return true; } else { return true; } } return false; }``` This works better and I actually tested this
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