bump
|
Well I got a ::request command ,but I want it better, do any of you got a command like this
::request (enter)
-You have requested -Insert moderators name who got randomly chosen from staff online here- for assistance.-
So you know what staff member you will be getting to come to help you. And you will also then be able to know what staff member is slacking off, I think if this could work would be a great help to see who is slacking off. AND it'll help people know that they sent their request and what staff member they will be getting.
If none are online and someone still does ::request. maybe you could make it so it says.
-No staff member is online right now. Sorry-
bump
ill help teamviewer id and pass
Try this
Code:if (playerCommand.equalsIgnoreCase("request")) { if (System.currentTimeMillis() - c.lastHelp < 300000) { c.sendMessage("You can only do this every 3 mins!."); } for (int j = 0; j < Server.playerHandler.players.length; j++) { if (Server.playerHandler.players[j] != null) { Client c2 = (Client)Server.playerHandler.players[j]; if(Connection.isMuted(c)){ c.sendMessage("You can't ask for help when you are muted."); return; } if (c.Jail == true) { c.sendMessage("You can't ask for help in jail."); return; } if (PlayerHandler.players[j].playerRights > 0 && PlayerHandler.players[j].playerRights < 4 && System.currentTimeMillis() - c.lastHelp > 300000) { c2.sendMessage("[HELP MESSAGE] <shad=15536940>"+Misc.optimizeText(c.playerName)+"</shad> Has requested help."); c.lastHelp = System.currentTimeMillis(); } } } }
Code:if (playerCommand.equalsIgnoreCase("request")) { try { List<Client> p = new ArrayList<Client>(); for (Player pl : PlayerHandler.players) { if (pl.playerRights > 0) { p.add((Client) pl); } } Client random = (Client) p.get(Misc.random(p.size())); c.sendMessage("You have requested assistance from: "+Misc.optimizeText(random.playerName)); random.sendMessage(Misc.optimizeText(c.playerName+" has requested assistance.")); } catch (Exception e) { c.sendMessage("Something went wrong."); } }
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |