Thread: Command for making ALL players do the same animgfx?

Results 1 to 4 of 4
  1. #1 Command for making ALL players do the same animgfx? 
    Registered Member
    Join Date
    Oct 2013
    Posts
    16
    Thanks given
    2
    Thanks received
    6
    Rep Power
    11
    So I have the command for Animgfx added, but I want to make a similar one which instead makes every online player do the entered animgfx. Any tips on how I would go about creating that command?
    EDIT - Source is 718
    case "animgfx":
    int animId = Integer.parseInt(cmd[1]);
    int gfxId = Integer.parseInt(cmd[2]);
    int height = cmd.length > 3 ? Integer.parseInt(cmd[3]) : 0;
    player.setNextAnimation(new Animation(animId));
    player.setNextGraphics(new Graphics(gfxId, 0, height));
    return true;
    Last edited by guthixfaithz; 05-17-2019 at 04:06 PM. Reason: Forgot to put in revision
    Reply With Quote  
     

  2. Thankful user:


  3. #2  
    Registered Member
    arch337's Avatar
    Join Date
    Sep 2008
    Posts
    2,712
    Thanks given
    170
    Thanks received
    285
    Discord
    Arch337#1337
    Rep Power
    631
    So loop all the players online and make them do the gfx.


    "A fail act is something you do regular, but a dumb act is something you can learn from"
    Spoiler for Problem?:
    Reply With Quote  
     

  4. Thankful user:


  5. #3  
    Registered Member
    Join Date
    Sep 2017
    Posts
    52
    Thanks given
    1
    Thanks received
    15
    Rep Power
    18
    Quote Originally Posted by guthixfaithz View Post
    So I have the command for Animgfx added, but I want to make a similar one which instead makes every online player do the entered animgfx. Any tips on how I would go about creating that command?
    EDIT - Source is 718
    case "animgfx":
    int animId = Integer.parseInt(cmd[1]);
    int gfxId = Integer.parseInt(cmd[2]);
    int height = cmd.length > 3 ? Integer.parseInt(cmd[3]) : 0;
    player.setNextAnimation(new Animation(animId));
    player.setNextGraphics(new Graphics(gfxId, 0, height));
    return true;
    Code:
    	case "animgfx":
    	int animId = Integer.parseInt(cmd[1]);
    	int gfxId = Integer.parseInt(cmd[2]);
    	int height = cmd.length > 3 ? Integer.parseInt(cmd[3]) : 0;
    	for (Player p : World.getPlayers()) {
    		p.setNextAnimation(new Animation(animId));
    		p.setNextGraphics(new Graphics(gfxId, 0, height));
    	}
    	return true;
    Reply With Quote  
     

  6. Thankful user:


  7. #4  
    Registered Member
    Join Date
    Oct 2013
    Posts
    16
    Thanks given
    2
    Thanks received
    6
    Rep Power
    11
    Quote Originally Posted by aNamedSoul View Post
    Code:
    	case "animgfx":
    	int animId = Integer.parseInt(cmd[1]);
    	int gfxId = Integer.parseInt(cmd[2]);
    	int height = cmd.length > 3 ? Integer.parseInt(cmd[3]) : 0;
    	for (Player p : World.getPlayers()) {
    		p.setNextAnimation(new Animation(animId));
    		p.setNextGraphics(new Graphics(gfxId, 0, height));
    	}
    	return true;
    That did the trick, thank you very much!
    Reply With Quote  
     

  8. Thankful users:



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: 7
    Last Post: 02-19-2013, 11:14 PM
  2. Replies: 0
    Last Post: 06-29-2012, 09:50 PM
  3. [Pi] Making a player have the same rights
    By eclipsev2 in forum Help
    Replies: 12
    Last Post: 06-29-2011, 04:59 AM
  4. Replies: 5
    Last Post: 12-26-2010, 05:22 PM
  5. All players do same Animation?
    By hedgefund in forum Help
    Replies: 2
    Last Post: 04-18-2010, 06:22 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
  •