i was wondering wuts the easiest way to make a admin door.
i thought mabey using like if (usr.admin = 1) or somethign and put in my admin code usr.admin == 1 so it be
if (usr.admin ==1)
density = 0
else
density = 1
usr << "Only admins are allowed in here!" thx
ID:148261
![]() May 3 2003, 9:19 am
|
|
one problem here if(istype(usr,/mob/player) i cna change that so that people cna be allowd in but i have 4 classes id have to make 4 copies of that code unless theres a quicker way
|
Vegeta54367 wrote:
i was wondering wuts the easiest way to make a admin door. You're doing two things wrong here: First, you're using density changes instead of Enter(); if you use Enter(), you can return 0 to disallow entry or ..() (the default proc) to act normally for admins. The other thing you're doing wrong is that you're using usr somewhere that you clearly shouldn't be. Lummox JR |
and what would you suggest somehting like
turf admindoor if (usr.admin == 1)use what instead of this Enter() else Enter() return 0 ???? |
Actually, more around these terms:
turf |
Vegeta54367 wrote:
why cant i use usr.admin it works most times doing that http://www.byondscape.com/ascape.dmb/LummoxJR.2002-1104/ |
Goku72 wrote:
Actually, more around these terms: turf That's close, but there are three problems:
|
If you are having trouble, just change it to
mob/turf That might work. I dunno :-) ~STARWARSPOWER~ |
Stop answering this question! It's ALREADY BEEN ANSWERED. ([link]) Read before you post.
|
Two people so far have answered this thread, even though Lummox has already dealt with it. It's annoying. =P
Plus, the code both of those people have posted is WRONG. Neither will work, for different reasons. Starwarspowers', in particular, is utterly ridiculous. An if() outside a proc? And what the hell do you think "usr 1,1,2" will do? It'll cause a compiler error (or, more likely, several), that's all. It's dangerous to post that kind of code; newbies might see it and think that it's proper code, leading to more work for us Newbie-Central-answerer-people. |
Swp, kindly refrain from posting completely bogus code in response to a question. What you posted is wrong on so many levels there's no point in even debugging it with you. It helps no one when you do that, and can only hurt. I don't want to discourage you from helping, but be sure that you're actually helping when you do.
Lummox JR |
actually even if it did work youd never be able to get out lol seeing as how is 1,1,2 so youd just be sent to the same place over and over again.....i got the door done and it works now thank you to all who posted here it was a big help.One question cause i forget wut is the code to direct your game when you host it to the file on byond goes after name ="blahblah"
i had it but now i forget it thx |
check out my door demo, It shows you a couple different ways you can do doors.