i managed to get a bank working with this, weapon locker though is still nonworking. i'll keep trying though
this might be because you followed what Ray1235 told you to do, which was use level.zombie_weapons. level.zombie_weapons is not an array of integers, remember the array keys are all of the weapon names. That means if u use an integer to get something in that array like he told you to do, it will come up undefined. My best recommendation would be to list out all the weapons in an array of integers separately and use that. But if you want something easier, this *MIGHT work.
Last Edit: December 12, 2015, 06:39:13 pm by alaurenc9
this might be because you followed what Ray1235 told you to do, which was use level.zombie_weapons. level.zombie_weapons is not an array of integers, remember the array keys are all of the weapon names. That means if u use an integer to get something in that array like he told you to do, it will come up undefined. My best recommendation would be to list out all the weapons in an array of integers separately and use that. But if you want something easier, this *MIGHT work.
If you want scripts / features made for you, then contact me by PM or email / skype etc it will cost you tho so if you have no intention of reciprocating don't even waste my time
i got it to work using alaurenc9's method, im just gonna do a few tests, then i'll update the script
Nice the only thing I was worried about with that method was if GetArrayKeys would return the weapons in the same order every time. I'm pretty sure it does though so no worries there. I think it orders the keys from like last defined to first defined, meaning it isn't random, so yes the system I posted should work 100%, and I'm glad as you say, it did.
A question for Ray1235, how would I find unused stat slots? 3005, 3006, 3007, and 3008 are unused? And until I make any edits to these, they will return 0?
Last Edit: December 12, 2015, 07:21:31 pm by alaurenc9
I think if we start making things with setStat, we all should save the number of the stat in a global variable, like: So we can easily change them to avoid overwriting other things. Because if I wanted to add this and the bank to my map, I would have to find every line where setStat or getStat is written to change the number, but maybe someone with no idea in scripting wouldn't know that. Just my opinion.
I think if we start making things with setStat, we all should save the number of the stat in a global variable, like: So we can easily change them to avoid overwriting other things. Because if I wanted to add this and the bank to my map, I would have to find every line where setStat or getStat is written to change the number, but maybe someone with no idea in scripting wouldn't know that. Just my opinion.
Well, for now, atleast death_reaper0 could you just change the bank one to use a different stat slot? So people would not get confused?
I think if we start making things with setStat, we all should save the number of the stat in a global variable, like: So we can easily change them to avoid overwriting other things. Because if I wanted to add this and the bank to my map, I would have to find every line where setStat or getStat is written to change the number, but maybe someone with no idea in scripting wouldn't know that. Just my opinion.
dont worry, the bank uses 3005 and this uses 3006-3009. it should only need to be changed if your using one of those for something else
anyway, its been updated, thank you everyone who helped!
Last Edit: December 12, 2015, 07:31:36 pm by death_reaper0
dont worry, the bank uses 3005 and this uses 3006-3009. it should only need to be changed if your using one of those for something else
Oh. Ok. Thought you were using 3005 for both. And yeah, for now there's no problem, but maybe more people start using this method and it would be nice to have everything organized at the top of the script so we'll know in one second which stats are in use. As I said, it's just my opinion, you don't have to do it if you don't want.
You defined literally every variable on the user. Only the stored information needs to be defined on the user. Everything else are just temporary variables that do not need to be this way. Here is how I would put the script together.
I also made it where if you are under the weapon limit, and you have a stored weapon, you can simply take it out without trading your current weapon and have no stored weapon in the locker. Otherwise it will store your current weapon, and if you had a stored weapon, it will give you it. Of course if you feel that it is now more of my script than your script, you don't have to use it. But I don't mind you taking this script and calling it yours and using it etc. as long as credit is given.
Last Edit: December 12, 2015, 08:11:58 pm by alaurenc9
You defined literally every variable on the user. Only the stored information needs to be defined on the user. Everything else are just temporary variables that do not need to be this way. Here is how I would put the script together.
I also made it where if you are under the weapon limit, and you have a stored weapon, you can simply take it out without trading your current weapon and have no stored weapon in the locker. Otherwise it will store your current weapon, and if you had a stored weapon, it will give you it. Of course if you feel that it is now more of my script than your script, you don't have to use it. But I don't mind you taking this script and calling it yours and using it etc. as long as credit is given.
i used varriables cause i was just adapting my original script, its also a little chuncky, i'll probably make a better one later, and i didnt make it ake the weapon if you have a free slot since the bo2 one didnt (at least i dont think it did)
i used varriables cause i was just adapting my original script, its also a little chuncky, i'll probably make a better one later, and i didnt make it ake the weapon if you have a free slot since the bo2 one didnt (at least i dont think it did)
According to the bo2 script, yes you can take the weapon if you have a free slot and it clears the weapon locker data. So my script is accurate completely to bo2. Anyways let me know if you are going to use my script. If you aren't could you at least do me a favor and test it for me? Because if you don't use it, I want to release it in my own post, and I'll credit you for original script. Would you mind if I did that?
Last Edit: December 12, 2015, 08:24:26 pm by alaurenc9
According to the bo2 script, yes you can take the weapon if you have a free slot and it clears the weapon locker data. So my script is accurate completely to bo2. Anyways let me know if you are going to use my script. If you aren't could you at least do me a favor and test it for me? Because if you don't use it, I want to release it in my own post, and I'll credit you for original script. Would you mind if I did that?
i just looked it up yeah it does use free slots like you said. i'll probably make an update later, im kinda a little busy to test right now so maybe in a few hours from now, i'll pm if it works, or what didnt work