proc/adminjoin(mob/M)
var/playerkey = ckey.(M.key)
if(playerkey == "name")
usr.admin = 1
return
//mob
// DM
// key = "name"
// admin = 1
//
Problem description:
I am trying to assign a 1 to the admin variable when the player matches the name placeholder, I am a bit stuck on how to do it i have tried a few things like above and think that it can be done with ckey or key but am not entirely sure how
the commented out bit was working but the player model would disappear when i did that, and i am unsure why it was not due to code running from having admin cause i tested by assigning admin by default.
could i please get some advice Thanks :)
var/playerkey = ckey.(M.key)
should be
var/playerkey = ckey(M.key)
However, since this is a proc, I would highly advise against using usr in it.