So I was making a perk script that is a modified version of the default perk script, but I wanted to use 1 perk bottle because the default ofc uses 1 for each machine, the weapon file has multiple gun models but in game when I go to use a machine it doesn't even play an animation with an invisible perk bottle.
it doesn't even play an animation with an invisible perk bottle.
?
You may need a vid of this or some script showing your modifications to help with this. What I have seen in that area before is it doesn't give you the bottle and takes away your ability to switch weapons or sprint. If this is happening, then it is stuck waiting for the weapon switch or something like that. I don't have the script in front of me to give specifics.
Which causes what I said, but the problem you are having right now is probably that you are not giving the weapon properly. When you give another model for a weapon you use a number not the model name or whatever you are using there. So it would be:
Code Snippet
Plaintext
self GiveWeapon( "zombie_perk_bottle", 0 ); // weapon file name model index
So a modification to your switch that makes weapon a number instead of a string might work. You may need to add that wait back in though or it may just give the gun right back before finishing the bottle, but I'm not sure cause you have one under player.isdrinking, so you may be fine.
Last Edit: March 07, 2016, 03:09:50 pm by MakeCents
Welp I made the changes, and still it doesn't even play an animation.
You should probably put some iprints around your changes then. See what is running, what each var is, isdefined, and stuff like that. Also, for now I would initialize weapon as 0 instead of "".
Also, you don't take the bottle anymore, but that can be addressed after fixing this, I assume is what you will do.
Last Edit: March 07, 2016, 03:23:28 pm by MakeCents
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
In the first function you have everything commented out, so weapon will be always "", except for jugg. You should uncomment the switch and change weapon to the index of the bottle model (0, 1, 2...), not the string. And in the second function, you don't need the switch/case at all, because it will only do something for jugg again. Just: