Thread: a ::givepc or ::givepk points command?

Results 1 to 6 of 6
  1. #1 a ::givepc or ::givepk points command? 
    Registered Member Scenemo's Avatar
    Join Date
    Apr 2011
    Posts
    283
    Thanks given
    12
    Thanks received
    0
    Rep Power
    1
    i know its probably simple but does anyone have a ::givepkpoint (playername) command or pcpoints command?
    Reply With Quote  
     

  2. #2  
    Donator

    Anthony's Avatar
    Join Date
    Dec 2007
    Age
    29
    Posts
    1,344
    Thanks given
    198
    Thanks received
    129
    Rep Power
    355
    Code:
    if (playerCommand.startsWith("addslay")) {
    c.magePoints += 1000;
    c.sendMessage("You Currently have " + c.magePoints);
    
    			}
    
    if (playerCommand.startsWith("addpk")) {
    c.pkPoints += 1000;
    c.sendMessage("You Currently have " + c.pkPoints);
    
    			}
    
    if (playerCommand.startsWith("addpc")) {
    c.pcPoints += 100;
    c.sendMessage("You Currently have " + c.pcPoints);
    
    			}
    Reply With Quote  
     

  3. #3  
    Registered Member Scenemo's Avatar
    Join Date
    Apr 2011
    Posts
    283
    Thanks given
    12
    Thanks received
    0
    Rep Power
    1
    it works giving those pts to other players?
    Reply With Quote  
     

  4. #4  
    Registered Member Googleİ's Avatar
    Join Date
    Apr 2011
    Posts
    217
    Thanks given
    2
    Thanks received
    12
    Rep Power
    1
    What chefboy posted is to give yourself points.

    This is to give other players:
    Pkpoints
    Code:
    				if (playerCommand.startsWith("givepkp")) {
    				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 Pkpoints by " + c.playerName);
    								c2.pkPoints += 1000;
    								break;
    							} 
    						}
    					}
    				} catch(Exception e) {
    					c.sendMessage("Player Must Be Offline.");
    				}			
    			}
    Pcpoints
    Code:
    			if (playerCommand.startsWith("givepcp")) {
    				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 Pkpoints by " + c.playerName);
    								c2.pcPoints += 1000;
    								break;
    							} 
    						}
    					}
    				} catch(Exception e) {
    					c.sendMessage("Player Must Be Offline.");
    				}			
    			}
    Reply With Quote  
     

  5. #5  
    Banned
    Join Date
    Sep 2010
    Posts
    224
    Thanks given
    15
    Thanks received
    14
    Rep Power
    0
    IDK, but try this?
    Code:
    				if (playerCommand.startsWith("givepk")) {
    				String[] args = playerCommand.split(" ");
    				for(int i = 0; i < Config.MAX_PLAYERS; i++)
    				{
    					Client o = (Client) Server.playerHandler.players[i];
    					if(Server.playerHandler.players[i] != null)
    					{
    						if(Server.playerHandler.players[i].playerName.equalsIgnoreCase(args[1]))
    						{
                     						c2.pkPoints += 1000;
                                                                    c2.sendMessage("You received some Pk Points.");
    						break;
    						}
    					}
    				}
    			}
    Reply With Quote  
     

  6. #6  
    Donator

    Anthony's Avatar
    Join Date
    Dec 2007
    Age
    29
    Posts
    1,344
    Thanks given
    198
    Thanks received
    129
    Rep Power
    355
    oh damn, need to learn how to read.
    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. Replies: 2
    Last Post: 03-22-2011, 09:30 PM
  2. [PI] ::give points command?
    By Acquittal in forum Help
    Replies: 7
    Last Post: 01-30-2011, 05:25 AM
  3. Delta Pk Points Command?
    By pluck in forum Help
    Replies: 0
    Last Post: 01-29-2011, 03:58 AM
  4. Replies: 0
    Last Post: 06-12-2010, 04:06 PM
  5. Need Ingame Pk Points Highscore Command.
    By Franklin in forum Requests
    Replies: 1
    Last Post: 11-08-2009, 02:51 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
  •