12-25-2011, 10:25 PM
Hello i got a problem with my key and door script :S
when i have it like this it wont let door be locked
If i take that away the doors works to be locked what should i do....
NVM fixed
when i have it like this it wont let door be locked
PHP Code:
void OnStart()
{
AddUseItemCallback("", "Door key", "mansion_1", "KeyOnDoor", true);
AddUseItemCallback("", "Old Door key", "mansion_5", "KeyOnDoor", true);
}
void KeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_1", false, true);
RemoveItem("Door key");
PlaySoundAtEntity("", "unlock_door.snt", "mansion_1", 0.0f, true);
SetSwingDoorLocked("mansion_5", false, true);
RemoveItem("Old Door key");
PlaySoundAtEntity("", "unlock_door.snt", "mansion_5", 0.0f, true);
}
If i take that away the doors works to be locked what should i do....
NVM fixed