Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- am = array();
- AdminKit = "admin"; //Here set the name of the admin kit.
- //Translations:
- adminmode_on = "You now are in admin mode";
- adminmode_off = "You desactive the admin mode";
- command adminmode(){
- permission = "admin";
- execute(){
- pia = 0;
- foreach(val in am){
- if(val == player.id){
- pia = 1;
- am.remove(val);
- }
- }
- if(pia == 0){
- player.god = true;
- player.sudo("/kit " + AdminKit);
- player.message(adminmode_on);
- am.add(player.id);
- }
- else {
- player.god = false;
- server.execute("ci " + player.name);
- player.message(adminmode_off);
- }
- }
- }
- event onPlayerGestured(player, gesture){
- pia = 0;
- foreach(val in am){
- if(val==player.id){
- pia = 1;
- }
- }
- if(gesture == "PunchLeft" or gesture == "PunchRight"){
- if(pia == 1){
- looking = player.look.getBarricade();
- if(isSet(looking) == false){
- return;
- }
- if(looking.hasDoor() == true){
- dr = looking.getDoor();
- if(dr.isOpen == true){
- dr.close();
- }
- else {
- dr.open();
- }
- }
- else if(looking.hasStorage()){
- se = looking.getStorage();
- se.open(player);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement