Jump to content

How to use - GetItemCount - if Amount = > 1?


Recommended Posts

I have a quest script that checks if the player has grenades equipped, and i need to be able to tell how many grenades are in the invintory and do stuff if grenades = > 1 and if grenades = < 1, but i cant get the script to compile, i keep getting an error saying "No variable alternative at imput '=' "...

 

This is what i have so far...

Scriptname Weapon_SM_Equip_Grenades extends Quest


Armor Property GrenadeBelt Auto
Weapon Property FragGrenade Auto

var amount


Event OnQuestInit()
    RegisterForRemoteEvent(Game.GetPlayer(), "OnItemEquipped")
EndEvent


Event Actor.OnItemEquipped(Actor akActor, Form akBaseObject, ObjectReference akReference)
If akActor == Game.GetPlayer()
    If (akActor.GetEquippedItemType(2) == 10)
	Debug.notification("frag grenades equipped")

	UnregisterForRemoteEvent(akActor, "OnItemEquipped")
	
	Amount = (Game.GetPlayer().GetItemCount(FragGrenade))
	    If Amount = > 1
	        Debug.Notification("grenades = >1")
	    elseif Amount = < 1
                Debug.Notification("grenades = <1")
	    EndIf
		RegisterForRemoteEvent(akActor, "OnItemEquipped")
    EndIf
EndIf
EndEvent


Can anyone help with this one? ^.^

Link to comment
Share on other sites

  • Recently Browsing   0 members

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