The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
GiveItem Function Help
Kyle Offline
Posting Freak

Posts: 911
Threads: 36
Joined: Sep 2010
Reputation: 7
#1
GiveItem Function Help

I created a inventory.hps file and made it to where it gives you two different items after you combine the other items. So ceremony_knife_2 and ContainerChem01 combine, and what is left should be ceremony_knife and chemical_container that are both motified with my .lang file with "KnifeGoo" and "EmptyContainer" being used.

GiveItem(string& asName, string& asType, string& asSubTypeName, string& asImageName, float afAmount);

I don't understand what it means by "string& asType".

inventory.hps file:
void OnGameStart()
{
AddCombineCallback("", "ceremony_knife_2", "ContainerChem01", "KnifeContainerCombine", false);
}
void KnifeContainerCombine(string &in asItemA, string &in asItemB)
{
GiveItem("", "ceremony_knife", "KnifeGoo", "", 1);
GiveItem("", "chemical_container", "EmptyContainer", "", 1);
RemoveItem(asItemA);
RemoveItem(asItemB);
}

04-29-2011, 10:55 PM
Find


Messages In This Thread
GiveItem Function Help - by Kyle - 04-29-2011, 10:55 PM
RE: GiveItem Function Help - by palistov - 04-30-2011, 02:54 AM
RE: GiveItem Function Help - by Kyle - 04-30-2011, 02:58 AM
RE: GiveItem Function Help - by Anxt - 04-30-2011, 04:28 AM
RE: GiveItem Function Help - by Kyle - 04-30-2011, 04:38 AM
RE: GiveItem Function Help - by palistov - 04-30-2011, 05:13 AM



Users browsing this thread: 1 Guest(s)