(01-12-2011, 03:24 PM)Cakefirst Wrote: a little bump. I have tried different combinations but i only get unexpected errors
please post the errors.
void OnStart()
{
AddUseItemCallback("", "machine", "castle_4", "KeyOnDoor", true);
AddUseItemCallback("", "hall", "castle_2", "KeyOnDoor1", true);
}
void onEnter()
{
}
void OnLeave()
{
}
void KeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("castle_4", false, true);
PlaySoundAtEntity("", "unlock_door", "castle_4", 0, false);
RemoveItem("machine");
}
void KeyOnDoor1(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("castle_2", false, true);
PlaySoundAtEntity("", "unlock_door", "castle_2", 0, false);
RemoveItem("hall");
}
Try this, I have not tested it myself but it could work.