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
If player has tinderboxes
JPiiONEFOURONE Offline
Junior Member

Posts: 13
Threads: 4
Joined: Sep 2012
Reputation: 0
#1
If player has tinderboxes

Hey guys,

When interacting with an entity, I only want the function to work if the player has 1 or more tinderboxes in his/her inventory.

I have tried the following, but it doesn't work.


void MyFunc(string &in asEntity)
{
    if(HasItem("tinderbox"))
    {
        Do something;
    }
}

I understand why it doesn't work, it's because the tinderboxes aren't internally named "tinderbox", so, is there another way I can check if the player has tinderboxes?

Thanks,

JPiiONEFOURONE
09-06-2012, 05:36 PM
Find


Messages In This Thread
If player has tinderboxes - by JPiiONEFOURONE - 09-06-2012, 05:36 PM
RE: If player has tinderboxes - by Kiwi2703 - 09-06-2012, 05:40 PM
RE: If player has tinderboxes - by JPiiONEFOURONE - 09-06-2012, 05:41 PM
RE: If player has tinderboxes - by SilentStriker - 09-06-2012, 05:49 PM
RE: If player has tinderboxes - by Your Computer - 09-06-2012, 05:55 PM
RE: If player has tinderboxes - by JPiiONEFOURONE - 09-06-2012, 06:07 PM
RE: If player has tinderboxes - by Robby - 09-06-2012, 06:33 PM
RE: If player has tinderboxes - by JPiiONEFOURONE - 09-06-2012, 07:17 PM
RE: If player has tinderboxes - by Robby - 09-06-2012, 07:20 PM
RE: If player has tinderboxes - by Theforgot3n1 - 09-08-2012, 12:35 AM



Users browsing this thread: 3 Guest(s)