Kazakarumariou
An angry man.
Posts: 283
Threads: 8
Joined: Jul 2012
Reputation:
14
|
RE: Closet script!!! Help!.?!!?!?
First put an entity over the closet. (this entity is invisible and it won't let you open the door. You find it Technical > Block box)
Okay name the block box "ClosetLock"
void OnStart()
{
AddUseItemCallback("", "KeyCloset", "ClosetLock", "UnlockCloset", true);
}
void UnlockCloset(string &in asItem, string &in asEntity)
{
SetEntityActive("ClosetLock", false);
GiveSanityBoost();
PlaySoundAtEntity("", "unlock_door", "Player", 0, false);
RemoveItem("KeyCloset");
}
|
|
08-01-2012, 05:24 PM |
|