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:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
GiveItem
Cyphermur9t Offline
Junior Member

Posts: 38
Threads: 17
Joined: Jan 2013
Reputation: 2
#1
GiveItem

I'm getting pretty ticked here since this should be a basic frickin' command and I'm probably missing something simple. All I want to do is have the player fill a bucket with oil, and have the empty bucket be replaced with a full bucket in the inventory.......

PHP Code: (Select All)
void FUNCTION1(string &in itemstring &in door)
{
    
RemoveItem("wooden_bucket_1");
    
PlaySoundAtEntity("""ui_use_oil.snt""Player"0false);
    
GiveItem("wooden_bucket_filled.ent");
}

//////////

void FUNCTION2(string &in itemstring &in door)
{
    
RemoveItem("wooden_bucket_filled_1");
    
PlaySoundAtEntity("""ui_use_oil.snt""lever_simple01_1"0false);
    
AddPlayerSanity(10);
    
SetPropStaticPhysics("lever_simple01_1"false);


I have also tried:
PHP Code: (Select All)
GiveItem("wooden_bucket_filled");
GiveItem("wooden_bucket_filled_1"); 

But the game never loads and comes up with an error and is getting me frustrated. I've already looked at scripts wiki and frankly looks like a glob of colored text.

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

doesn't help.

-----------------------------------

EDIT:
FIXED IT. -.-

Just had to write
PHP Code: (Select All)
GiveItemFromFile("wooden_bucket_filled_1""wooden_bucket_filled.ent"); 
to give me a filled bucket of water.
(This post was last modified: 03-24-2013, 11:01 PM by Cyphermur9t.)
03-24-2013, 10:53 PM
Find


Messages In This Thread
GiveItem - by Cyphermur9t - 03-24-2013, 10:53 PM
RE: GiveItem - by plutomaniac - 03-25-2013, 02:09 AM
RE: GiveItem - by NaxEla - 03-25-2013, 05:46 AM
RE: GiveItem - by plutomaniac - 03-25-2013, 02:17 PM



Users browsing this thread: 1 Guest(s)