Give_Levels_To_world()
set category = "Admin"
if(GMLockCheck())
usr<<"<font face ='Palatino Linotype' color=Green>Your Admin Powers Are Locked."
return
switch(alert("Give levels to every player logged in?","","Yes","No"))
if("Yes")
var/lvlin=input("How many")as null|num
if(lvlin==null||!lvlin||!usr)return
for(var/mob/PC/M in world)
if(M.loggedin && M.client)
if(!istype(M,/mob/PC))return
M << "[usr] gave you [lvlin] levels. Be patient while they add to your stats."
M.levelgains = 0
while(lvlin>0)
M.exp = M.tnl
M.Level_Up()
lvlin -= 1
sleep(1)
world<<"<b><font face ='Palatino Linotype' color=Green>[usr] has given everyone Levels!</b>"
else
return
Problem description:it gives levels to only 1 player.
it comes up like this
for the first player-
Mystic gave you 100 levels. Be patient while they add to your stats.
for other players -
Mystic gave you 0 levels. Be patient while they add to your stats.