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 / Weapon selection difficulties

Author
Message
Kerithion
18
Years of Service
User Offline
Joined: 17th Jun 2006
Location: Scotland
Posted: 4th Nov 2006 15:27
I am having some difficulties controlling the selection of weapons using the 1-9 keys. What is happening is this:

As weapons are picked up by a player, they fill the weapon slots through 1-9, in the order they are picked up.

If a tenth weapon is then picked up, it does not appear in the weapon inventory. Nor does it replace an existing weapon in a weapon slot.

From searches on the forum, I've encountered references to "plrdropweapon", but those threads that mention it suggest the command does not work particularly well.

What I was hoping to do was write a script that would allow me to allocate a given weapon to a certain weapon slot. For example, have weapon slot "1" reserved for melee weapons. Thus, if a player is carrying a knife, activated by pressing "1", then picks up an axe, the player would drop the knife, and would now activate the axe by pressing "1".

However, before I attempt to work on something like this, I was wondering if anyone could share their experiences concerning weapon-switching, particularly regarding "plrdropweapon".

Also, I'd love to know if anyone thinks that this would involve an alteration of the FPSC source rather than a script. It's just the searches I've done on these forums on the subject don't exactly leave me feeling optimistic about the possibility of achieving this with scripting alone.
Butter fingers
18
Years of Service
User Offline
Joined: 20th Mar 2006
Location: Mecca
Posted: 6th Nov 2006 23:02
empty's mod gives you the commands to alter the player's weapon variables. you could use this in conjunction with the plrdropweapon command , to create a weapon switching system. It would not be intelligent enough to switch from a specific weapon slot, but you could use it in connjunction with a HUD to create Halo style

"press use to switch the glock for the desert eagle"

Kind of interface.

butters

Kerithion
18
Years of Service
User Offline
Joined: 17th Jun 2006
Location: Scotland
Posted: 6th Nov 2006 23:50
Thanks for the response Butters. I must admit, I haven't tried empty's mod yet, though I've been tempted - running RC3 at the moment, and it seems a case of having the one or the other. But I think you might have upped the ante in favour of empty's mod for me.

Working towards a Halo-stle interface of weapon-switching sounds appealing: I hadn't considered that as an option. I think I'll away and read up on empty's mod.

Thanks again for the response and the suggestion, much appreciated.

Login to post a reply

Server time is: 2024-11-23 04:24:04
Your offset time is: 2024-11-23 04:24:04