10-14-2011, 04:45 PM
Hey Guys, i've got a problem, i watched tutorials about scripting etc
i copied the script in the tutorials and just renamed the item and the door.
void OnStart()
{
AddUseItemCallback("", "doorkey2", "door2","UsedKeyOnDoor", true);
}
void UsedKeyOnDoor(string &in asItem, string &in esEnity)
{
SetSwingDoorLocked("door2", false, true);
PlaySoundAtEnity("", "unlock_door", "door2", 0, false);
RemoveItem("doorkey2");
}
i copied the script in the tutorials and just renamed the item and the door.
void OnStart()
{
AddUseItemCallback("", "doorkey2", "door2","UsedKeyOnDoor", true);
}
void UsedKeyOnDoor(string &in asItem, string &in esEnity)
{
SetSwingDoorLocked("door2", false, true);
PlaySoundAtEnity("", "unlock_door", "door2", 0, false);
RemoveItem("doorkey2");
}