GSphoenix
Junior Member
Posts: 2
Threads: 0
Joined: Sep 2012
Reputation:
0
|
RE: How to unlock door with key?
////////////////////////
//Run when Starting map
void OnStart()
{
AddUseItemCallback("", "OfficeKey", "mansion_1", "UsedKeyOnDoor", true);
}
void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_1", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "mansion_1", 0.0f, false);
RemoveItem("OfficeKey");
AddDebugMessage("KeyOnDoor", false);
}
////////////////////////
//Run when Entering map
void OnEnter()
{
}
///////////////////////
//Run when Leaving map
void OnLeave()
{
}
Help plz what is wrong?
|
|
09-26-2012, 04:18 PM |
|