viewing paste Unknown #14711 | Athena

Posted on the
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
-   script  jail2   -1,{
OnInit:
    set .GmAccess, 99;
    bindatcmd "jail",strnpcinfo(3)+"::OnAtcommand";
    end;
OnPCLoginEvent:
    for(.@i = 0; .@i < getarraysize(.array$); .@i++){
        if(strcharinfo(0) == .array$[.@i]){
            atcommand "@jail " + .array$[.@i];
            deletearray .array$[.@i], 1;
        }
    }
    end;
OnAtcommand:
    if(getgmlevel()> .GmAccess){
        input .@n$;
        if(attachrid(getcharid(3,.@n$))){
            atcommand "@jail " + .@n$;
        }else{
            dispbottom "Player is not online";
            set .@s, getarraysize(.array$);
            set .array$[.@s], .@n$;
            dispbottom .@s;
        }
        end;
    }else{
        dispbottom "Your GM-Level is too low to do that";
    }
}
Viewed 651 times, submitted by Normynator.