/temprank

Re: /temprank

Postby Conor » 26 Feb 2013, 17:19

You have still forgot to change the first problem.

I'm not sure if it will be okay with MCDzienny, but I think when players disconnect they instantly become 'null'. So 'p.group' will not be anything, as p is null, null doesn't have a group. So you cannot demote the player.

Unless you use setrank and the players name, like I previously suggested, which can rank offline players.

So you just need to target this bit of code:
Code: Select all
         Thread.Sleep(time);
         Player.GlobalMessage(who.color+who.name+" %awas reverted to their original rank.");
                         who.group = oldGroup;
                who.color = oldGroup.color;


But I'm not 100% sure on the Player variable become null on disconnect, but I'm pretty sure about it, so its better to be safe than sorry, or you can run some tests :)

If you leave the code as it is, you could have some (temporary) ranked players staying permanent O:
Conor (Conanza121)
User avatar
Conor
Coder
 
Posts: 390
Joined: 10 Oct 2012, 21:36
Location: @21Conor

Re: /temprank

Postby ismellike » 26 Feb 2013, 17:25

I tested it on myself and it will still revert the rank, tested on one of my ops too.
What a beast...
User avatar
ismellike
Coder
 
Posts: 731
Joined: 31 Oct 2012, 04:04
Location: Kansas

Re: /temprank

Postby Conor » 26 Feb 2013, 19:16

ismellike wrote:I tested it on myself and it will still revert the rank, tested on one of my ops too.


Ah okay, I must be wrong about the Player variable going to a null value after disconnection then.
Conor (Conanza121)
User avatar
Conor
Coder
 
Posts: 390
Joined: 10 Oct 2012, 21:36
Location: @21Conor

Previous

Return to Requests for Addon

Who is online

Users browsing this forum: No registered users and 2 guests

cron