Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

FPSC Classic Scripts / Buy Weapon Script including Weapon Slot Variable Help!

Author
Message
The Master D
15
Years of Service
User Offline
Joined: 20th Feb 2009
Location:
Posted: 4th Apr 2013 23:32
Okay, as the name of this thread suggests, I'm working on my own system for buying weapons using a money variable, and that has worked no problem. My current problem arose when I added in the code that would put the weapon slot system into work. I will bold the lines that were added reight before my failed test of the script.

Basically, I walk up to the weapon on the wall and it displays the HUD to buy it, but pressing the buy key no longer works. I have no idea what I'm doing wrong, but I'm certain it is with the addition of the weapon slot variable commands into this script that the problem was created. Below I'll also include the script that I'm using to create and initialize the weapon slot variable with a starting value of one for the starting weapon that is included in the start marker.


As always, any help is massively appreciated, and I intend to release the completed weapon slot script as soon as I can polish it.

AMD FX-6300 Vishera 3.5GHz, Radeon HD 7850 2GB, 8 GB RAM, Win 7 Pro 64 Bit
Corno_1
14
Years of Service
User Offline
Joined: 3rd Nov 2010
Location:
Posted: 5th Apr 2013 13:58

Go to state 1 otherwise it loops the hole script again and again.

Also wich version you use? This is very important than if you use 1.2
then you can use plrweaponsgreater and so on:




The Master D
15
Years of Service
User Offline
Joined: 20th Feb 2009
Location:
Posted: 5th Apr 2013 17:36
Oh jeez, I figured it was something stupid in the initializing script.

Yes, I am running v1.20, and if I use the plrweaponsgreater and stuff, would that mean that the weapons counter variable is useless? Because that was what I was using to determine the amount of weapons the player had.

AMD FX-6300 Vishera 3.5GHz, Radeon HD 7850 2GB, 8 GB RAM, Win 7 Pro 64 Bit
The Master D
15
Years of Service
User Offline
Joined: 20th Feb 2009
Location:
Posted: 5th Apr 2013 23:27
Okay, so I have it running fine now, except that when I pick up the gun, I have no weapon showing until I switch weapon slots, then it works. I'll post the script so you can make any further edits.

And sorry for the double post!

AMD FX-6300 Vishera 3.5GHz, Radeon HD 7850 2GB, 8 GB RAM, Win 7 Pro 64 Bit

Login to post a reply

Server time is: 2024-11-23 17:10:57
Your offset time is: 2024-11-23 17:10:57