The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
A problem with a key
vansd Offline
Junior Member

Posts: 8
Threads: 4
Joined: Apr 2011
Reputation: 0
#1
A problem with a key

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);
}
(This post was last modified: 04-10-2011, 03:05 PM by vansd.)
04-10-2011, 10:50 AM
Find


Messages In This Thread
A problem with a key - by vansd - 04-10-2011, 10:50 AM
RE: A problem with a key - by MrBigzy - 04-10-2011, 12:13 PM
RE: A problem with a key - by vansd - 04-10-2011, 03:09 PM
RE: A problem with a key - by MrBigzy - 04-10-2011, 03:24 PM
RE: A problem with a key - by vansd - 04-10-2011, 03:26 PM
RE: A problem with a key - by MrBigzy - 04-10-2011, 03:27 PM
RE: A problem with a key - by vansd - 04-10-2011, 03:36 PM
RE: A problem with a key - by iNs - 04-10-2011, 03:41 PM



Users browsing this thread: 1 Guest(s)