Author Topic: About Forceweapon  (Read 1431 times)

0 Members and 1 Guest are viewing this topic.

Offline poutch

  • Major(1)
  • Posts: 34
About Forceweapon
« on: September 16, 2007, 05:09:18 am »
Hi,

I noticed that when u do a forceweapon call, if player was using secondary weap he will be automatically switched to the "new" PRIMARY weapon. Is it possible to change the function so that the players keeps the primary or secondary state (which seems more logical) ?
Exemple :

Player had the weapons : (4,15) but was using his secondary (15) when a ForceWeapon (5,16) is called.
For now, after the call the player will be holding the weapon 5.
Is it possible to make it get the weapon 16 as it is his secondary ? or at least at a variable in the procedure which let us choose which weapon he ll be holding. For the moment it will always be the primary weap.
www.pleez.fr .... coming soon

Offline EnEsCe

  • Retired Soldat Developer
  • Flamebow Warrior
  • ******
  • Posts: 3101
  • http://enesce.com/
    • [eC] Official Website
Re: About Forceweapon
« Reply #1 on: September 16, 2007, 05:31:34 am »
As I said on IRC, existing functions will not be changed. The way to fix what you think is broken (which it isnt), would cause logical problems with existing scripts that use this function.

EDIT: The reason why I say it isn't broken, is because when you switch weapons, no matter what the weapon is, the one in your hands being fired, IS your primary weapon.

Offline poutch

  • Major(1)
  • Posts: 34
Re: About Forceweapon
« Reply #2 on: September 16, 2007, 06:26:21 am »
Ok, if server interpret it like that i can work on it inversing my numbers of primary and secondary in my forceweapon calls. ty
www.pleez.fr .... coming soon

Offline Kavukamari

  • Camper
  • ***
  • Posts: 435
  • 3.14159265358979, mmm... pi
Re: About Forceweapon
« Reply #3 on: September 17, 2007, 08:16:27 pm »
use this:


(if want to keep current weap as sec'd)
Code: [Select]
...(code)...
  ForceWeapon(ID,(wanted weap),GetPlayerStat(ID,'Primary'), (wanted ammo));
...(more code)...

if want to keep sec'd same:
Code: [Select]
...(even more code)...
  ForceWeapon(ID,(wanted weap),GetPlayerStat(ID,'Secondary'), (wanted ammo));
...(naninaninani)...

(nani nani pretty much means "blah blah blah" Nani means "what?" in japanese, so "what" is repeated for emphasis litterally meaning "whatwhatwhat")

Date Posted: September 17, 2007, 09:05:32 pm
you may have to code some translation scripts because ForceWeapon's weapon numbers are different than spawnobject's numbers I think... unless you is only working with 0 to 13... (socom to LAW)

Date Posted: September 17, 2007, 09:15:06 pm
@ enesce: does forceweapon work with Socom yet?
"Be mindful of fame, show a mighty courage, watch against foes. Nor shalt thou lack what thou desirest, if with thy life thou hast comest out from that heroic task."

Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Re: About Forceweapon
« Reply #4 on: September 18, 2007, 02:38:33 pm »
@ enesce: does forceweapon work with Socom yet?
it already does... try 0

Date Posted: September 18, 2007, 03:30:20 pm
Weapon # - Weapon
0 - USSOCOM
1-10 "Normal" ones, as listed in the weapon choosing list thingy
11 - Flamer
12 - Rambo Bow
13 - Flame Rambo Bow
14 - Knife
15 - Chainsaw
16 - LAW
255 - Fists

Offline Kavukamari

  • Camper
  • ***
  • Posts: 435
  • 3.14159265358979, mmm... pi
Re: About Forceweapon
« Reply #5 on: September 18, 2007, 08:10:20 pm »
from 17-244 reloads current weapon :P
"Be mindful of fame, show a mighty courage, watch against foes. Nor shalt thou lack what thou desirest, if with thy life thou hast comest out from that heroic task."