| 
		
	
		| jessehmusic   Senior Member
 
 Posts: 423
 Threads: 102
 Joined: Dec 2011
 Reputation: 
8
 | 
			| Level Doors Dosnt work when locked... 
 
				why does my level doors stop wokring when i have it on locked... cant get it to work   
 |  |  
	| 01-12-2012, 04:53 PM |  |  
	
		| Datguy5   Senior Member
 
 Posts: 629
 Threads: 25
 Joined: Dec 2011
 Reputation: 
12
 | 
			| RE: Level Doors Dosnt work when locked... 
 
				....Because they are locked like normal doors.You need a key,button or something else to unlock it..If thats what you mean.
			 
				
(This post was last modified: 01-12-2012, 04:56 PM by Datguy5.)
 |  |  
	| 01-12-2012, 04:55 PM |  |  
	
		| jessehmusic   Senior Member
 
 Posts: 423
 Threads: 102
 Joined: Dec 2011
 Reputation: 
8
 | 
			| RE: Level Doors Dosnt work when locked... 
 
				I have made keys scripted them and that sh**
			 
 |  |  
	| 01-12-2012, 05:02 PM |  |  
	
		| Datguy5   Senior Member
 
 Posts: 629
 Threads: 25
 Joined: Dec 2011
 Reputation: 
12
 | 
			| RE: Level Doors Dosnt work when locked... 
 
				Show us the script.
 |  |  
	| 01-12-2012, 05:09 PM |  |  
	
		| jessehmusic   Senior Member
 
 Posts: 423
 Threads: 102
 Joined: Dec 2011
 Reputation: 
8
 | 
			| RE: Level Doors Dosnt work when locked... 
 
				void OnStart(){AddUseItemCallback("", "Cell Door Key", "Lockeddoor_2", "KeyOnDoor2", true); 
 }
 
 void KeyOnDoor2(string &in asItem, string &in asEntity)
 
 {
 
 SetSwingDoorLocked("Lockeddoor_2", false, true);
 
 PlaySoundAtEntity("", "unlock_door", "Lockeddoor_2", 0, false);
 
 RemoveItem("Cell Door Key");
 
 SetPropHealth("Lockeddoor_2", 0);
 
 }
 
 
 
				
(This post was last modified: 01-12-2012, 05:17 PM by jessehmusic.)
 |  |  
	| 01-12-2012, 05:16 PM |  |  
	
		| Datguy5   Senior Member
 
 Posts: 629
 Threads: 25
 Joined: Dec 2011
 Reputation: 
12
 | 
			| RE: Level Doors Dosnt work when locked... 
 
				I think it should be like thisAddUseItemCallback("", "Cell Door Key", "Lockeddoor_2", "KeyOnDoor2", true);
 }
 void KeyOnDoor2(string &in asItem, string &in asEntity)
 {
 SetSwingDoorLocked("Lockeddoor_2", false, true);
 PlaySoundAtEntity("", "unlock_door", "Lockeddoor_2", 0, false);
 RemoveItem("Cell Door Key");
 SetPropHealth("Lockeddoor_2", 0);
 }
 
 
 
 
				
(This post was last modified: 01-12-2012, 05:23 PM by Datguy5.)
 |  |  
	| 01-12-2012, 05:18 PM |  |  
	
		| Tripication   Member
 
 Posts: 172
 Threads: 19
 Joined: Dec 2011
 Reputation: 
6
 | 
			| RE: Level Doors Dosnt work when locked... 
 
				 (01-12-2012, 05:18 PM)Datguy5 Wrote:  I think it should be like thisAddUseItemCallback("", "Cell Door Key", "Lockeddoor_2", "KeyOnDoor2", true);
 }
 void KeyOnDoor2(string &in asItem, string &in asEntity)
 {
 SetSwingDoorLocked("Lockeddoor_2", false, true);
 PlaySoundAtEntity("", "unlock_door", "Lockeddoor_2", 0, false);
 RemoveItem("Cell Door Key");
 SetPropHealth("Lockeddoor_2", 0);
 }
 
 Why do you have setprophealth, you shouldn't need it at all, nt for unlocking a door. 
 
_______________________________ 
Oh right, and the solve,You used the wrong callback. Hang on 
 
void OnStart() 
{ 
	AddUseItemCallback("", "Cell Door Key", "Lockeddoor_2", "KeyOnDoor2", true); 
}
 
void KeyOnDoor2(string &in asItem, string &in asEntity) 
{
SetLevelDoorLocked ("Lockeddoor_2", false); 
	PlaySoundAtEntity("", "unlock_door", "Lockeddoor_2", 0, false); 
	RemoveItem("Cell Door Key"); 
}
 
_____________________________________ 
P.S, Clean up a bit   
_______________________________ 
Ok, i think i have it this time. 
			 
  ![[Image: speedart__2___yoshimitsu_by_kamofudge-d4yo6kk.png]](http://fc06.deviantart.net/fs70/f/2012/125/c/d/speedart__2___yoshimitsu_by_kamofudge-d4yo6kk.png)  
				
(This post was last modified: 01-13-2012, 02:28 AM by Tripication.)
 |  |  
	| 01-13-2012, 02:18 AM |  |  
	
		| rallelol   Member
 
 Posts: 53
 Threads: 11
 Joined: Dec 2011
 Reputation: 
1
 | 
			| RE: Level Doors Dosnt work when locked... 
 
				It's "SetLevelDoorLocked" And not SetSwingDoorLocked!
 |  |  
	| 01-13-2012, 01:17 PM |  |  
	
		| Tripication   Member
 
 Posts: 172
 Threads: 19
 Joined: Dec 2011
 Reputation: 
6
 | 
			| RE: Level Doors Dosnt work when locked... 
 
				 (01-13-2012, 01:17 PM)rallelol Wrote:  It's "SetLevelDoorLocked" And not SetSwingDoorLocked! I think he fixed it, and didn't bother to reply. or ask just before he went on holiday so hes probably gonna be afk for ages...one of the two i reckon 
			 
 |  |  
	| 01-14-2012, 03:18 AM |  |  |