Every time I use the key on the door, it doesn't open it, and says I cant use it this way. Is there anything wrong with my script?
void OnStart(){SetEntityConnectionStateChangeCallback("lever", "func_shelf"); AddUseItemCallback("", "key_1", "mansion_1", "UsedKeyOnDoor", true); AddUseItemCallback("", "key_2", "mansion_3", "UsedKeyOnDoor", true);}//----------------------------------------------------------------//void UsedKeyOnDoor(string &in asItem, string &in asEntity){ SetSwingDoorLocked("mansion_1", false, true); PlaySoundAtEntity("", "unlock_door", "mansion_1", 0, false); RemoveItem("key_1");}//----------------------------------------------------------------//void UsedKeyOnDoor2(string &in asItem, string &in asEntity){ SetSwingDoorLocked("mansion_3", false, true); PlaySoundAtEntity("", "unlock_door", "mansion_3", 0, false); RemoveItem("key_2");}//----------------------------------------------------------------//
There is more code, but it's not related to the door.
It's key_2 that isn't opening mansion_3.
EDIT: It's looks terrible in the code section, so i'll provide the file too. I'l rename it from .hps to .txt