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
2 keys script
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#2
RE: 2 keys script

Im assuming that you want 2 keys to make a door unlocked? If so:

PHP Code: (Select All)
void OnStart()
{
    
SetLocalVarInt("Var1"0);
    
AddUseItemCallback("""bedroomkey_1""mansion_1""UsedKeyOnDoor1"true);
    
AddUseItemCallback("""bedroomkey_2""mansion_1""UsedKeyOnDoor2"true);
}

void UsedKeyOnDoor1(string &in asItemstring &in asEntity)
{
RemoveItem("bedroomkey_1");
AddLocalVarInt("Var1"1);void func_on();}
[
align=-webkit-auto]void UsedKeyOnDoor2(string &in asItemstring &in asEntity)
{
RemoveItem("bedroomkey_1");

AddLocalVarInt("Var1"1);
void func_on();
}


void func_on()
{
if(
GetLocalVarInt("Var1") == 2)
{
SetSwingDoorLocked("mansion_1"falsetrue);
PlaySoundAtEntity("""unlock_door""mansion_1"0false);

}



If you need me to explain what that script is and why it works just ask ^^

(This post was last modified: 12-06-2011, 04:06 PM by flamez3.)
12-06-2011, 04:04 PM
Find


Messages In This Thread
2 keys script - by Kainzor - 12-06-2011, 03:56 PM
RE: 2 keys script - by flamez3 - 12-06-2011, 04:04 PM
RE: 2 keys script - by Kainzor - 12-06-2011, 04:33 PM
RE: 2 keys script - by flamez3 - 12-06-2011, 04:39 PM
RE: 2 keys script - by Kainzor - 12-06-2011, 05:04 PM
RE: 2 keys script - by Your Computer - 12-06-2011, 05:24 PM
RE: 2 keys script - by flamez3 - 12-06-2011, 05:32 PM
RE: 2 keys script - by Dobbydoo - 12-07-2011, 03:23 PM
RE: 2 keys script - by flamez3 - 12-07-2011, 03:25 PM
RE: 2 keys script - by Dobbydoo - 12-07-2011, 03:32 PM



Users browsing this thread: 5 Guest(s)