MaZiCUT
Senior Member
Posts: 536
Threads: 31
Joined: Jun 2012
Reputation:
17
|
RE: Crowbar unlocks a closet, doesen't work.
(06-18-2012, 12:03 PM)andyrockin123 Wrote: (06-18-2012, 11:58 AM)CrazyArts Wrote: (06-18-2012, 11:54 AM)Rownbear Wrote: (06-18-2012, 11:48 AM)CrazyArts Wrote: (06-18-2012, 11:44 AM)Rownbear Wrote:
(06-18-2012, 11:48 AM)CrazyArts Wrote:
(06-18-2012, 11:58 AM)andyrockin123 Wrote: void OnStart()
{
AddUseItemCallback("", "CrowbarForCabinet", "cabinet", "OpenCabinetDoor", true);
}
void OpenCabinetDoor(string &in asItem, string &in asEntity) // changed (string &in door) to (string &in asEntity)
{
SetSwingDoorLocked("cabinet", false, true); ///missing quotes on cabinet
PlaySoundAtEntity("", "unlock_door", "cabinet", 0, false); ///missing quotes on cabinet
RemoveItem("CrowbarForCabinet"); //missing quotes on CrowbarForCabinet
}
void CeilingDoorLocked(string &in entity)
{
if(GetSwingDoorLocked("CeilingDoor") == true)
{
SetMessage("Messages", "PopupCeilingDoor", 0);
}
} I fixed that, but read all the other posts, rownbear has a good idea. Not quite; please check again. The function "
OpenCabinetDoor " has inproper syntax which is why its not working. It shouldn't be:
(string &in asItem, string &in door)
I revised it to
(string &in asItem, string &in asEntity) I did that too but the crowbar doesen't unclock the closet
Hi.
|
|
06-18-2012, 12:04 PM |
|