Jump to content

FWE 5.04 - Can't fill dart guns


Recommended Posts

I made a dart gun, but can't fill it with different chems as per the integrated Better Living Through Chems mod. I can fill syringes just fine, but not dart guns, despite me having enough chems in my inventory to do this (I.E 3).

 

When I activate the dropped Dart Gun in the game world, instead of bringing up the menu it just picks it up right away. I don't really know what's wrong with the script (or if there IS anything wrong, so I'll post it here and let you guys figure it out 'cause I'm lazy and incompetent ;) Sorry for the MASSIVE wall of code, for some reason the BBCode won't work. Looking forward to your replies!

 

scn BLTCFillDartGunScript

 

short HasDartChems

short dchButton

 

float DartGunCondition

;float DartGunID

; wishfully float can cover formIDs or strings, but likely not, let us pray

 

Begin OnActivate

if IsActionRef player == 1

; display message box of possible weapons

 

set HasDartChems to 0

 

if player.GetItemCount 2CI > 2

set HasDartChems to 1

endif

if player.GetItemCount MDMA > 2

set HasDartChems to 1

endif

if player.GetItemCount Heroin > 2

set HasDartChems to 1

endif

if player.GetItemCount Phencyclidine > 2

set HasDartChems to 1

endif

if player.GetItemCount Methamphetamine > 2

set HasDartChems to 1

endif

if player.GetItemCount Alprazolam > 2

set HasDartChems to 1

endif

if player.GetItemCount Thorazine > 2

set HasDartChems to 1

endif

if player.GetItemCount RadscorpionPoisonGland > 2

set HasDartChems to 1

endif

 

if HasDartChems == 1

ShowMessage BLTCDartGunMsg

else

Activate

endif

endif

 

End

 

Begin GameMode

 

set dchButton to GetButtonPressed

 

if ( dchButton >0 )

set DartGunCondition to ((player.getav Repair) + (player.getav Medicine)) / 400

; set DartGunID to GetIsID

if dchbutton == 1

player.RemoveItem 2CI 3 1

player.AddItemHealthPercent BLTCWeapMDMADart 1 DartGunCondition

disable

MarkForDelete

PlaySound NPCHumanUsingMorphine

elseif dchbutton == 2

player.RemoveItem MDMA 3 1

player.AddItemHealthPercent BLTCWeap2CBDart 1 DartGunCondition

disable

MarkForDelete

PlaySound NPCHumanUsingMorphine

elseif dchbutton == 3

player.RemoveItem Heroin 3 1

player.AddItemHealthPercent BLTCWeapHeroinDart 1 DartGunCondition

disable

MarkForDelete

PlaySound NPCHumanUsingMorphine

elseif dchbutton == 4

player.RemoveItem Phencyclidine 3 1

player.AddItemHealthPercent bltcWeapPCPDart 1 DartGunCondition

disable

MarkForDelete

PlaySound NPCHumanUsingMorphine

elseif dchbutton == 5

player.RemoveItem Methamphetamine 3 1

player.AddItemHealthPercent BLTCWeapMethDart 1 DartGunCondition

disable

MarkForDelete

PlaySound NPCHumanUsingMorphine

elseif dchbutton == 6

player.RemoveItem Alprazolam 3 1

player.AddItemHealthPercent BLTCWeapXanaxDart 1 DartGunCondition

disable

MarkForDelete

PlaySound NPCHumanUsingMorphine

elseif dchbutton == 7

player.RemoveItem Thorazine 3 1

player.AddItemHealthPercent BLTCWeapThorDart 1 DartGunCondition

disable

MarkForDelete

PlaySound NPCHumanUsingMorphine

elseif dchbutton == 8

player.RemoveItem RadscorpionPoisonGland 1 1

player.AddItemHealthPercent WeapDartGun 1 DartGunCondition

disable

MarkForDelete

PlaySound NPCHumanUsingMorphine

elseif dchbutton == 9

Activate player

endif

endif

End

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...