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 Product Chat / Weapon Trade System.

Author
Message
Dark Frager
16
Years of Service
User Offline
Joined: 16th Mar 2010
Location: The Void.
Posted: 14th Feb 2011 20:38
Hi,

Does anyone know where I can find a script (or anything) that will make sure you can only have two weapons maximum at one time, and you have to trade out weapons for new ones? I think I saw it somewhere once on this forum but I can't find it again.

Thanks,
- Dark.

If you can see the enemy, they can see you.
Windows 7 Home Premium 64-Bit, Intel Core i5 2.27ghz, nVIDIA GTX 260M 1GB, 4GB DDR3 RAM, DirectX 11
Darkline - Coming 2011
Gencheff
16
Years of Service
User Offline
Joined: 12th Jun 2010
Location: UK by way of USSR
Posted: 14th Feb 2011 21:03
This is fairly easy...

If you don't use mods,you can set a variable holding the amount of weapons

Since weapon pickups use 1 script (weapon.fpi) , you just need to edit that script and add a condition where the weapon count variable is less or equal to 2 , then the weapon can be picked up.

Also you need to keep in mind that after a weapon is picked up,the variable has to be incremented (+1).


PC Specs:Windows 7 Ultimate 64-bit,Intel Core i7 960 @ 3.20GHz,NVIDIA GeForce GTX 480,12GB RAM,2x Western Digital 997GB HDD
Dark Frager
16
Years of Service
User Offline
Joined: 16th Mar 2010
Location: The Void.
Posted: 14th Feb 2011 22:05
Thanks Gencheff.

If you can see the enemy, they can see you.
Windows 7 Home Premium 64-Bit, Intel Core i5 2.27ghz, nVIDIA GTX 260M 1GB, 4GB DDR3 RAM, DirectX 11
Darkline - Coming 2011
Dark Frager
16
Years of Service
User Offline
Joined: 16th Mar 2010
Location: The Void.
Posted: 15th Feb 2011 20:25
Sorry for the double post, but can I add a condition where the weapon count variable is less or equal to 2 in a previous line of the code or would I need to create a new line and add the commands in? Also what commands would I use cause I really suck at FPI and I don't know what to do.
Any help?
Thanks.

If you can see the enemy, they can see you.
Windows 7 Home Premium 64-Bit, Intel Core i5 2.27ghz, nVIDIA GTX 260M 1GB, 4GB DDR3 RAM, DirectX 11
Darkline - Coming 2011

Login to post a reply

Server time is: 2026-07-01 22:12:54
Your offset time is: 2026-07-01 22:12:54