ID:138810
 
ok, so... i tried doing a GM system with this login thingy.
world
mob = /mob/create_character
view = 6


mob/Saiyan//the name of your character
icon = 'Goku.dmi'//the location of the icon
icon_state = "1"//the state of the icon if applicable
mob/Female
icon = 'Female.dmi'
icon_state = "1"
mob/NPC/Brolly
icon = 'Enemy.dmi'
icon_state = "1"
mob/create_character//just some coding, ignore this
var/mob/character//just some coding
Login()
var/charactername = input("What is your name?","Name")
switch(input("What Gender are you??","Gender") in list("Male","Female"))
if("Male")//if the person chooses this, then what?
character = new /mob/Saiyan()//creating the icon
if("Female")
character = new /mob/Female()
character.name = charactername
src.client.mob = character
src.loc=locate(1,1,1)
world << "[src.key] has just entered '[world.name]'!"
del(src)

i used this for the GM system
    if(src.key == "Ashs999")//
src.verbs += /mob/admin/verb/Ban
src.verbs += /mob/admin/verb/Unban
src.verbs += /mob/admin/verb/Mute
src.verbs += /mob/admin/verb/Unmute
src.verbs += /mob/admin/verb/Edit
src.verbs += /mob/admin/verb/Play_Music
src.verbs += /mob/admin/verb/Stop_Music
src.verbs += /mob/admin/verb/Reboot
src.verbs += /mob/admin/verb/AdminTeleport
src.verbs += /mob/admin/verb/GM_Giving
src.verbs += /mob/admin/verb/ChangeWorldName
src.verbs += /mob/admin/verb/ChangeWorldStatus
src.verbs += /mob/admin/verb/Remove_GM

do you guys see problems?
before i actually put my name in they will show, but after a choos ea name, they go away....
world
mob = /mob/create_character
view = 6


mob/Saiyan//the name of your character
icon = 'Goku.dmi'//the location of the icon
icon_state = "1"//the state of the icon if applicable
mob/Female
icon = 'Female.dmi'
icon_state = "1"
mob/NPC/Brolly
icon = 'Enemy.dmi'
icon_state = "1"
mob/create_character//just some coding, ignore this
var/mob/character//just some coding
Login()
var/charactername = input("What is your name?","Name")
switch(input("What Gender are you??","Gender") in list("Male","Female"))
if("Male")//if the person chooses this, then what?
character = new /mob/Saiyan()//creating the icon
if("Female")
character = new /mob/Female()
character.name = charactername
src.client.mob = character
src.loc=locate(1,1,1)
world << "[src.key] has just entered '[world.name]'!"
if(src.key == "Ashs999")//del(src)is for log out
src<<"Welcome Admin"//welcome:)
src.verbs+=typesof(/mob/admin/verb)//give you all admin verbs




mob/Logout()
world<<"<B>[src] has logged out!"
del src //here you delete

try this but i am not sure. i work on my first game
In response to HerzogCasa
Thanks I will has to try that tomorrow..
I will notifie you if it works!
In response to HerzogCasa
mob/Saiyan//the name of your character
icon = 'Goku.dmi'//the location of the icon
icon_state = "1"//the state of the icon if applicable
mob/Female
icon = 'Female.dmi'
icon_state = "1"
mob/NPC/Brolly
icon = 'Enemy.dmi'
icon_state = "1"
mob/create_character//just some coding, ignore this
var/mob/character//just some coding
Login()
var/charactername = input("What is your name?","Name")
switch(input("What Gender are you??","Gender") in list("Male","Female"))
if("Male")//if the person chooses this, then what?
character = new /mob/Saiyan()//creating the icon
if("Female")
character = new /mob/Female()
character.name = charactername
src.client.mob = character
src.loc=locate(1,1,1)
world << "[src.key] has just entered '[world.name]'!"
del(src)
if(src.key == "Ashs999")//del(src)is for log out
src<<"Welcome Admin"//welcome:)
src.verbs+=typesof(/mob/admin/verb)

i get
loading Fallen Caos.dme
Login.dm:30:error: src.key: duplicate definition
Login.dm:30:error: "Ashs999": duplicate definition
Login.dm:30:error: ==: instruction not allowed here
Login.dm:30:error: : empty type name (indentation error?)
Login.dm:31:error: src: duplicate definition
Login.dm:31:error: "Welcome Admin": duplicate definition
Login.dm:31:error: <<: instruction not allowed here
Login.dm:32:error: src.verbs: duplicate definition
Login.dm:32:error: /mob/admin/verb: value not allowed here
Login.dm:32:error: : duplicate definition
Login.dm:32:error: +=: instruction not allowed here
Login.dm:31:error: : empty type name (indentation error?)

Fallen Chaos.dmb - 12 errors, 0 warnings (double-click on an error to jump to it)
</dm>
In response to Ashs999
Wrong tabs/indentation.
In response to Jemai1
but where?
In response to Ashs999
        world << "[src.key] has just entered '[world.name]'!"
// del(src)
-> if(src.key == "Ashs999")//del(src)is for log out
-> src<<"Welcome Admin"//welcome:)
-> src.verbs+=typesof(/mob/admin/verb)


Tab them and don't delete src.
In response to Jemai1
once i log in, it gets rid of the tab for Gm but while i was logging in, the tab was there
In response to Ashs999
Lol with
del (src)
my copy and paste fail, i said it its for log out and used copy to much;)
And a other problem with your tabs/inte??? Bla bla(lol iam german;))
 if"female"
maybe its my eye use now iphone but your stuff is under if female and if female is at false position.
I will later add this with laptop what i mean. Iphone is bad for that!
In response to Ashs999
That's because the verbs were given to your /mob/create_character instance, not to the actual mob that you'd like to load.
In response to Jemai1
So, how would I go to change that? I want that similar login
In response to Ashs999
Move it in your character's Login.
In response to Jemai1
That is how I log in
In response to Ashs999
in your "character selection mob" not in your actual character.
In response to Jemai1
Beside that, I would advice to use a list for your gms,admins.
In response to Deathscyth15
Deathscyth15 wrote:
Beside that, I would advice to use a list for your gms,admins.

I am currently the only admin
And see, I am newish to coding so the guy above you is confusing me!
In response to Ashs999
I'd handle administrators by keeping a list of keys (or ckeys, if you prefer) of people who should have administrative rights, then adding their verbs to the player's client instead of the mob.

Something to this effect mostly:

var
list/admins = list("Ashs999", "Some other key", "also a key")

admin
verb
blah()
world << "hi"

client
New()
if(key in admins)
verbs.Add(typesof(/admin/verb))

..()


When the verbs are added to the client, you gain a new level of security over handing the verbs off to the player's mob. If for any reason a player can switch between mobs in a game, it's possible a player could switch into an administrator's mob. Since the MOB had the verbs, you'd have them too and that's just no good. With clients, only that specific player's client has the verbs.
In response to LordAndrew
LordAndrew wrote:
I'd handle administrators by keeping a list of keys (or ckeys, if you prefer) of people who should have administrative rights, then adding their verbs to the player's client instead of the mob.

Something to this effect mostly:

> var
> list/admins = list("Ashs999", "Some other key", "also a key")
>
> admin
> verb
> blah()
> world << "hi"
>
> client
> New()
> if(key in admins)
> verbs.Add(typesof(/admin/verb))

Thanks this worked!!!



..()
</dm>

When the verbs are added to the client, you gain a new level of security over handing the verbs off to the player's mob. If for any reason a player can switch between mobs in a game, it's possible a player could switch into an administrator's mob. Since the MOB had the verbs, you'd have them too and that's just no good. With clients, only that specific player's client has the verbs.