ID:142925
 
Code:


Problem description:The problem is whenever anyone joins the server they get gm verbs and i dont understand how is this happening.
can anybody tell me how to take these gm verbs from the usr when they join server.
i tried usr.verbs -= typesof(/mob/...)
but even this isnt working



First, let me start by saying that the client (player) should get the verbs not the mob (character). I just had to do this myself.

When making your verbs instead of mob/user/verb they should be client/user/verb or client/GM/verb. Then the easy way to only allow certain GMs is to code in their key.
if(src.key == yourkey || src.key == someoneskey)
src.verbs+=typesof(/client/GM/verb)

With that code you can guarantee that only the keys you code in will get GM verbs.
In response to Jholder84
yea i noticerd that i forgot yo type
if(src.key == yourkey || src.key == someoneskey)

i rather typed this
if(src.key == yourkey || someoneskey)
so here where was the problem arosed.
i noticed that b4 read this app.
thnx anyways.
You have to perform a check, to make sure the user isn't supposed to be an admin when they log in. Something like this:

mob/Login()
if(src.is_admin) // If the user is an admin as recognised by a variable, you could also do a search in a list by using admins.Find(src).
src.verbs+=typesof(/mob/admin/verb) //Add the appropriate verbs
..() // Make sure you either do the rest here, or ensure that you always call the parent.