In response to Gohan Games



I feel pity .... you guys Should start exploit BYOND!
see typesof()

instead of going like deleting/inserting all verbs categorised in GM or Admin
usr.verbs+=typesof(/mob/GM/verbs)


And NEVER NEVER NEVER NEVER use usr when usr = src!
In response to Getenks
Yea, i missed that of usr and src xD
In response to Getenks
Getenks wrote:
I feel pity .... you guys Should start exploit BYOND!
see typesof()

instead of going like deleting/inserting all verbs categorised in GM or Admin
> usr.verbs+=typesof(/mob/GM/verbs)
>

And NEVER NEVER NEVER NEVER use usr when usr = src!

I tend to get infinate loop errors when I do that. So I go:
src.verbs += typesof("/mob/GM/verbs")


:)
In response to Gohan Games
mob/admin/verb/give_powers()
var/list/buffer = list()
for(var/client/c)
buffer += "[c.mob.name] ([c.ckey])" //i like viewing player names instead of keys, personally
buffer[c.mob.name] = c
/*if(!buffer.len) if you decide to do exclusions
src<<"No one else is online"
return*/

var/decision = input(src,"","") as null|anything in buffer
if(decision)
var/client/client = buffer[decision]
var/mob/m = client.mob
m.verbs += typesof(/mob/admin/verb)

You really should loop through clients to access players and not all mobs. If your game has some insane amount of mobs, there would be one hell of a list to go through. Also, what if some of the mobs have the same name? Looping through clients avoids that issue entirely.

Yes, it's longer, but in the end, it's better.
Page: 1 2