ID:1500104
 
(See the best response by LordAndrew.)
Ok I wasen't sure where to post this and I know I'm not on crack ('cause most of the time it seems like I'm on crack when I post stuff) anyway let's get back to the main subject and it's ok to call me a dumb ass for this, but how do you code admins in?
Best response
The simplest way would be to store a list of keys in, well, a global list. Then just check upon login if the person's key is in said list. From there you can apply administrative powers to them.
If you go to the developers menu at the top of this website and click resources, you can use the search bar there to find lots of examples on this subject. Just search for the term "admin" under resources and take a look at some of those libraries and demos.
In response to LordAndrew
Global list?
I hope this gives you the guidelines that will allow you to reproduce this.

NOTE: This is not an ideal boot system, fix it up because I just done it for demonstration purposes.
var/list/admins=list(\
"ssj4justdale",\
"miogenesis",\
);

mob
{
Login()
{
if(src.ckey in admins)
{
src.verbs+=new/mob/admin/verb/Boot;
}
}
admin
{
verb
{
Boot(mob/M in world)
{
world<<"[M] has been booted by [src]!";
del(M);
}
}
}
}
In response to Ssj4justdale
He doesn't even know what a global list is, so what is giving him that code going to do for him in the longrun?

MIOGenesis, you seriously need to have a look at the DM Guide.
In response to FKI
Best it'll do for him is like any other newbie on BYOND in programming.

Find a source code, edit admins and claim rights.

Ideally, you can just learn through trial and error to get the end result and until they experiment with code, even if it's by slight modifications, they will never learn.
In response to Ssj4justdale
Ssj4justdale wrote:
Best it'll do for him is like any other newbie on BYOND in programming.

Find a source code, edit admins and claim rights.

Ideally, you can just learn through trial and error to get the end result and until they experiment with code, even if it's by slight modifications, they will never learn.


providing code without explanations of what is happening is truly not ideal. It may be really simple, but to those that don't understand scope, or haven't used some of the items, it is not.

Also, it's bad not to boot at the client level. It allows booting of NPCs.
In response to Pirion
Pirion wrote:
Ssj4justdale wrote:
Best it'll do for him is like any other newbie on BYOND in programming.

Find a source code, edit admins and claim rights.

Ideally, you can just learn through trial and error to get the end result and until they experiment with code, even if it's by slight modifications, they will never learn.


providing code without explanations of what is happening is truly not ideal. It may be really simple, but to those that don't understand scope, or haven't used some of the items, it is not.

Also, it's bad not to boot at the client level. It allows booting of NPCs.

yes I agree about the booting but if you just taken the time to read what I posted rather than diss me about what I did, you would read this:

'NOTE: This is not an ideal boot system, fix it up because I just done it for demonstration purposes.'

Aside from that, I believe newbs need to put in an effort to learn but majority of them never will because they don't have the patience to learn it.

They asked for 'Developer Help' on how to do something and you guy's tried explaining it and it was obvious they did not know a thing at all, so I took the initiative and gave them an example, something you guy's practically done by sending them to the resources section of BYOND to install a demo.

So what is the issue with me providing a small easy line of code while you guy's are suggesting something that does more work for them?? With mine they have more room to experiment, so I truly don't see what the issue is.
If people are going to learn from it, then wouldn't it be best to give them a high quality example?

It is a backwards way of thinking to say "It's not that good, but take a look at it and learn it, so you can become not that good too". It's the same type of thing as providing code that improperly uses usr rather than src or typecasting the argument.

Instead of showing someone the way to just get it done, it best will help inspire them to become the best. When someone shows no work of trying to complete it a task, direct them on where to look, someone unwilling to take five minutes to figure out what they need to do won't benefit from an example and will be back the next day asking for more.

When someone shows that they are trying, and posts what they were doing (even if completely wrong - some judge, but most are nice & peer review is the best way to learn what is wrong) then posting a correct example in that case can really help them.
In response to Pirion
Well if somebody needs help and doesn't know what a global list is, what do you tell them? "RTFDMG?"

I think not, we both my have our own way of handling things and our own opinions on which is better and I shall respect that.

I shall approach and help my way and you can continue doing yours.