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
Hit a wall with crafting two items together
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#6
RE: Hit a wall with crafting two items together

PHP Code: (Select All)
void OnStart()
{
    
AddUseItemCallback("INTERNAL_NAME""NAME_OF_ITEM""NAME_OF_ENTITY""NAME_OF_CALLBACK"true);
    
// Repeat for every item.
}

void NAME_OF_CALLBACK(string &in itemstring &in entity)
{
    if (
StringContains(item"medbox"))
        
AddLocalVarInt("Medbox"1);
    else if (
StringContains(item"medicine"))
        
AddLocalVarInt("Medicine"1);

    if (
GetLocalVarInt("Medbox") > 0
        
&& GetLocalVarInt("Medicine") > 2)
    {
        
AddLocalVarInt("Medbox", -1);
        
AddLocalVarInt("Medicine", -3);
        
// Give medkit...
    
}


Tutorials: From Noob to Pro
04-06-2012, 01:40 AM
Website Find


Messages In This Thread
RE: Hit a wall with crafting two items together - by Your Computer - 04-06-2012, 01:40 AM



Users browsing this thread: 1 Guest(s)