Cruzore
Senior Member
Posts: 301
Threads: 2
Joined: Jun 2012
Reputation:
37
|
RE: [HELP] Script Enabling/Variables
Looking at the names of your script gives me headaches, so i'll just explain it like this:
So, you want to only put down a jar if you used the knife first.
void OnStart()
{
AddUseItemCallback("randomname1", "knife", "keg", "KnifeTheKeg", false);
AddUseItemCallback("randomname2", "jar", "keg", "JarTheKeg", false);
AddLocalVarInt("SomeVariable", 0);
}
void KnifeTheKeg(string &in asItem, string &in asEntity)
{
RemoveItem(asItem);
//fancy stuff like sounds etc here
AddLocalVarInt("SomeVariable", 1);
}
JarTheKeg(string &in asItem, string &in asEntity)
{
if(GetLocalVarInt("SomeVariable")==1)
{
RemoveItem(asItem);
//Your other stuff here, like fancy stuff and what should happen
}
}
This is just an example
Think, before you speak Google, before you post
|
|
07-04-2012, 09:49 PM |
|