Thread: something

Results 1 to 4 of 4
  1. #1 something 
    GravityScape & SimpliCity Developer.

    RSWSkiller's Avatar
    Join Date
    Dec 2013
    Age
    27
    Posts
    754
    Thanks given
    184
    Thanks received
    68
    Rep Power
    172
    First i have problem with duel , if people staking sometime they will be crashed and cant to log on again :/ idk whats wrong with duel area :/
    and second one ,is ::givedonor ::givesuper ::giveultra ::givedicer ::givehelper wont work , i tried to fix em but idk :C
    here is commands :

    Code:
    if (playerCommand.startsWith("givedonor") && c.playerName.equalsIgnoreCase("summer")) {
    				try {	
    					String playerToMod = playerCommand.substring(8);
    					for(int i = 0; i < Config.MAX_PLAYERS; i++) {
    						if(Server.playerHandler.players[i] != null) {
    							if(Server.playerHandler.players[i].playerName.equalsIgnoreCase(playerToMod)) {
    								Client c2 = (Client)Server.playerHandler.players[i];
    								c2.sendMessage("<shad=16711680>You have been given donor status by " + c.playerName);
    								c2.playerRights = 1;
    								c2.logout();
    								break;
    							} 
    						}
    					}
    				} catch(Exception e) {
    					c.sendMessage("Player Must Be Offline.");
    				}			
    			}
    			if (playerCommand.startsWith("givesuper") && c.playerName.equalsIgnoreCase("summer")) {
    				try {	
    					String playerToMod = playerCommand.substring(8);
    					for(int i = 0; i < Config.MAX_PLAYERS; i++) {
    						if(Server.playerHandler.players[i] != null) {
    							if(Server.playerHandler.players[i].playerName.equalsIgnoreCase(playerToMod)) {
    								Client c2 = (Client)Server.playerHandler.players[i];
    								c2.sendMessage("You have been given super donor status by " + c.playerName);
    								c2.playerRights = 2;
    								c2.logout();
    								break;
    							} 
    						}
    					}
    				} catch(Exception e) {
    					c.sendMessage("Player Must Be Offline.");
    				}			
    			}
    			if (playerCommand.startsWith("giveultra") && c.playerName.equalsIgnoreCase("summer")) {
    				try {	
    					String playerToMod = playerCommand.substring(8);
    					for(int i = 0; i < Config.MAX_PLAYERS; i++) {
    						if(Server.playerHandler.players[i] != null) {
    							if(Server.playerHandler.players[i].playerName.equalsIgnoreCase(playerToMod)) {
    								Client c2 = (Client)Server.playerHandler.players[i];
    								c2.sendMessage("<shad=16711680>You have been given Ultra donor status by " + c.playerName);
    								c2.playerRights = 3;
    								c2.logout();
    								break;
    							} 
    						}
    					}
    				} catch(Exception e) {
    					c.sendMessage("Player Must Be Offline.");
    				}			
    			}
    			if (playerCommand.startsWith("givedicer") && c.playerName.equalsIgnoreCase("summer")) {
    				try {	
    					String playerToMod = playerCommand.substring(8);
    					for(int i = 0; i < Config.MAX_PLAYERS; i++) {
    						if(Server.playerHandler.players[i] != null) {
    							if(Server.playerHandler.players[i].playerName.equalsIgnoreCase(playerToMod)) {
    								Client c2 = (Client)Server.playerHandler.players[i];
    								c2.sendMessage("<shad=16711680>You have been given helper status by " + c.playerName);
    								c2.playerRights = 4;
    								c2.logout();
    								break;
    							} 
    						}
    					}
    				} catch(Exception e) {
    					c.sendMessage("Player Must Be Offline.");
    				}			
    			}
    			if (playerCommand.startsWith("givehelper") && c.playerName.equalsIgnoreCase("Summer")) {
        try { 
         String playerToMod = playerCommand.substring(10);
         for(int i = 0; i < Config.MAX_PLAYERS; i++) {
          if(Server.playerHandler.players[i] != null) {
           if(Server.playerHandler.players[i].playerName.equalsIgnoreCase(playerToMod)) {
            Client c2 = (Client)Server.playerHandler.players[i];
            c2.sendMessage("You have been given helper status by " + c.playerName);
            c2.playerRights = 5;
            c2.logout();
            break;
           } 
          }
         }
        } catch(Exception e) {
         c.sendMessage("Player Must Be Offline.");
        }   
       }
    someone please help me out ? rep+thanks
    Reply With Quote  
     

  2. #2  
    GravityScape & SimpliCity Developer.

    RSWSkiller's Avatar
    Join Date
    Dec 2013
    Age
    27
    Posts
    754
    Thanks given
    184
    Thanks received
    68
    Rep Power
    172
    bump
    Reply With Quote  
     

  3. #3  
    Registered Member
    Zivik's Avatar
    Join Date
    Oct 2007
    Age
    28
    Posts
    4,421
    Thanks given
    891
    Thanks received
    1,527
    Rep Power
    3285
    There's a good reason why your commands won't work. You have to change the substring amount of characters to suit the amount of characters in your command plus one space.

    eg for givedonor you have 9 total characters, but 10 if you add the space. However, your substring only contains 8 as shown here:

    Code:
    String playerToMod = playerCommand.substring(8);
    Simply change that number to 10 (And fix every other one). Your command issue will be solved.
    Reply With Quote  
     

  4. #4  
    Registered Member
    Dogreen's Avatar
    Join Date
    Jan 2014
    Posts
    600
    Thanks given
    55
    Thanks received
    142
    Rep Power
    105
    No idea about your duel arena issue, you may have to re do the entire duel arena system, Idk. As for your commands I believe they are under some rank number permission, paste all the commands which doens't work, and paste them under any other command that work for admins/owner or w/e you wanna use those cmds.
    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

Similar Threads

  1. Make an object do something
    By delta11 in forum Tutorials
    Replies: 4
    Last Post: 10-21-2007, 05:56 PM
  2. Looking for Something Better Then Mopar
    By Premiere in forum RS2 Client
    Replies: 3
    Last Post: 09-11-2007, 05:41 AM
  3. Tryed something new.
    By Dead S1lence in forum Showcase
    Replies: 8
    Last Post: 08-10-2007, 09:02 PM
  4. Something random.
    By Jukk in forum Showcase
    Replies: 5
    Last Post: 06-27-2007, 04:57 PM
  5. Clicking a object makes you say something
    By Bullhorn7 in forum Tutorials
    Replies: 2
    Last Post: 05-17-2007, 03:15 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •