04-10-2011, 10:50 AM
I have a question.
I made a key and a door unlock it using this script
void OnStart()
{
AddUseItemCallback("", "key_tomb_2", "prison_2, "KeyOnDoor", true);
}
void KeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("prison_2", false, true);
RemoveItem(asItem);
PlaySoundAtEntity("", "unlock_door.snt", "prison_3", 0.0f, true);
}
And I want to do another key and another door
But I have an error. What I did wrong???
AddUseItemCallback("", "key_tomb_3", "prison_3", "KeyOnDoor", true);
}
void KeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("prison_3", false, true);
RemoveItem(asItem);
PlaySoundAtEntity("", "unlock_door.snt", "prison_3", 0.0f, true);
}
I made a key and a door unlock it using this script
void OnStart()
{
AddUseItemCallback("", "key_tomb_2", "prison_2, "KeyOnDoor", true);
}
void KeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("prison_2", false, true);
RemoveItem(asItem);
PlaySoundAtEntity("", "unlock_door.snt", "prison_3", 0.0f, true);
}
And I want to do another key and another door
But I have an error. What I did wrong???
AddUseItemCallback("", "key_tomb_3", "prison_3", "KeyOnDoor", true);
}
void KeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("prison_3", false, true);
RemoveItem(asItem);
PlaySoundAtEntity("", "unlock_door.snt", "prison_3", 0.0f, true);
}