(10-03-2011, 06:05 PM)Your Computer Wrote: If you use the function i gave you, you could use the same function for multiple key-door combinations.
Guide me please. What shall I remove?
{
AddUseItemCallback("", "Bedroomkey", "Bedroom", "UsedKeyOnDoor", true);
}
void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("Bedroom", false, true);
PlaySoundAtEntity("", "unlock_door", "Bedroom", 0, false);
RemoveItem("Bedroomkey");
}
{
AddUseItemCallback("", "Thronedoorkey", "Thronedoor", "UsedKeyOnDoor", true);
}
void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("Thronedoor", false, true);
PlaySoundAtEntity("", "unlock_door", "Thronedoor", 0, false);
RemoveItem("Thronedoorkey");
}