Thread: [DELTA] Server help

Results 1 to 6 of 6
  1. #1 [DELTA] Server help 
    Mr. Rave
    Guest
    I need help on the
    ::yell command.

    I want to know how can i make say this

    [MOD] Playername: Message
    [ADMIN] Playername: Message

    I only need 1 of those ill figure out the other one.

    Please Help
    Reply With Quote  
     

  2. #2  
    Registered Member
    minutes's Avatar
    Join Date
    Apr 2008
    Posts
    1,926
    Thanks given
    2
    Thanks received
    19
    Rep Power
    465
    if(command.startsWith("yell") && command.length() > 5{
    String text = command.substring(8);
    if(playerRight == 0 )
    yM("["+p.playerName+"] " +Character.toUpperCase(text.charAt(0)) + text.substring(1));
    if(playerRight == 1)
    yM("[Mod]["+p.playerName+"] " +Character.toUpperCase(text.charAt(0)) + text.substring(1));
    if(playerRight == 2)
    yM("[Admin]["+p.playerName+"] " +Character.toUpperCase(text.charAt(0)) + text.substring(1));
    if(playerRight == 3)
    yM("[Owner]["+p.playerName+"] " +Character.toUpperCase(text.charAt(0)) + text.substring(1));
    }

    add this anywhere....

    public void yM(String message) {
    for (Player p : handler.players) {
    if ((p == null) || !p.isActive)
    continue;
    client temp = (client) p;
    if ((temp.absX > 0) && (temp.absY > 0))
    if ((temp != null) && !temp.disconnected && p.isActive)
    temp.sM(message);
    }
    }

    that should work, i just made it so ididint test it



    click banner to join gtracer!
    Reply With Quote  
     

  3. #3  
    Mr. Rave
    Guest
    Quote Originally Posted by minutes View Post
    add this anywhere....




    that should work, i just made it so ididint test it
    Wait why do i get errors?

    Code:
    client.java:7589: cannot find symbol
    symbol  : variable playerRight
    location: class client
    if(playerRight == 1)
       ^
    client.java:7590: cannot find symbol
    symbol  : variable p
    location: class client
    yM("[Mod]["+p.playerName+"] " +Character.toUpperCase(text.charAt(0)) + text.subs
    tring(1));
                ^
    client.java:7591: cannot find symbol
    symbol  : variable playerRight
    location: class client
    if(playerRight == 2)
       ^
    client.java:7592: cannot find symbol
    symbol  : variable p
    location: class client
    yM("[Admin]["+p.playerName+"] " +Character.toUpperCase(text.charAt(0)) + text.su
    bstring(1));
                  ^
    client.java:7593: cannot find symbol
    symbol  : variable playerRight
    location: class client
    if(playerRight == 3)
       ^
    client.java:7594: cannot find symbol
    symbol  : variable p
    location: class client
    yM("[Owner]["+p.playerName+"] " +Character.toUpperCase(text.charAt(0)) + text.su
    bstring(1));
                  ^
    6 errors
    Press any key to continue . . .
    ?
    Reply With Quote  
     

  4. #4  
    Donator

    I Pk Noobs I's Avatar
    Join Date
    Sep 2007
    Posts
    522
    Thanks given
    3
    Thanks received
    23
    Rep Power
    554
    Code:
    if (command.startsWith("shout") && command.length() > 4) { //This code also mutes
      if (checkLog("mutes", playerName) || (checkLog("mutes2", connectedFrom))) {
    		sM("You cannot yell because you are muted or have said an invalid word.");
    		} else {
    		
    	if (!command.contains("battlescape")
                        && !command.contains("scape") && !command.contains("no-ip")
                        && !command.contains("ayuda")
    		    && !command.contains(".biz")
    		    && !command.contains("this server sucks")
    		    && !command.contains(".info")
    		    && !command.contains("servegame")
    		    && !command.contains("fuck this server")
    		    && !command.contains("no-ip")
    		    && !command.contains("join my server")
    		    && !command.contains("this server is gay")
    		    && !command.contains(":chalreq:")
    		    && !command.contains("you bitch")
    		    && !command.contains("come to my server")
                        && !command.contains(":tradereq:")) {
                    String text = command.substring(8);
    		String titles = "";
    
                    if (playerRights == 0) {
                        titles = "";
                    }
                    if (playerRights == 1) {
                        titles = "[Mod] ";
    		}
                    if (playerRights == 2) {
                        titles = "[Admin] ";
                    }
                    if (playerRights == 3) {
                        titles = "[Owner ] ";
                    }
    
                    yell(titles + "" + playerName + ": "
                            + command.substring(5));
    		}
    	}
    	}
    There, that also checks for mutes and filters out bad words
    Reply With Quote  
     

  5. #5  
    Mr. Rave
    Guest
    Quote Originally Posted by I Pk Noobs I View Post
    Code:
    if (command.startsWith("shout") && command.length() > 4) { //This code also mutes
      if (checkLog("mutes", playerName) || (checkLog("mutes2", connectedFrom))) {
    		sM("You cannot yell because you are muted or have said an invalid word.");
    		} else {
    		
    	if (!command.contains("battlescape")
                        && !command.contains("scape") && !command.contains("no-ip")
                        && !command.contains("ayuda")
    		    && !command.contains(".biz")
    		    && !command.contains("this server sucks")
    		    && !command.contains(".info")
    		    && !command.contains("servegame")
    		    && !command.contains("fuck this server")
    		    && !command.contains("no-ip")
    		    && !command.contains("join my server")
    		    && !command.contains("this server is gay")
    		    && !command.contains(":chalreq:")
    		    && !command.contains("you bitch")
    		    && !command.contains("come to my server")
                        && !command.contains(":tradereq:")) {
                    String text = command.substring(8);
    		String titles = "";
    
                    if (playerRights == 0) {
                        titles = "";
                    }
                    if (playerRights == 1) {
                        titles = "[Mod] ";
    		}
                    if (playerRights == 2) {
                        titles = "[Admin] ";
                    }
                    if (playerRights == 3) {
                        titles = "[Owner ] ";
                    }
    
                    yell(titles + "" + playerName + ": "
                            + command.substring(5));
    		}
    	}
    	}
    There, that also checks for mutes and filters out bad words
    Wow dude thank you very much!

    I think i just jizzed myself JK lol
    Reply With Quote  
     

  6. #6  
    Registered Member
    minutes's Avatar
    Join Date
    Apr 2008
    Posts
    1,926
    Thanks given
    2
    Thanks received
    19
    Rep Power
    465
    Quote Originally Posted by Nazi_ View Post
    Wow dude thank you very much!

    I think i just jizzed myself JK lol
    lol that is leached ... i saw that on one source



    click banner to join gtracer!
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •