Player variable for referee?

Player variable for referee?

Postby Warren1001 » 23 Nov 2013, 16:08

if (p.referee)
{
etc
}
Whats the variable for ref?
Warren1001
 
Posts: 197
Joined: 08 Aug 2012, 03:50

Re: Player variable for referee?

Postby joppiesaus » 23 Nov 2013, 17:02

That vaiable is a boolean, which chooses if the player is a referee in zombie mode. You could do handy stuff with this, for example let him allow to fly during the wave. :D
joppiesaus
 
Posts: 379
Joined: 20 Aug 2012, 07:28
Location: in a obsedian house, with glass in it so i can see the lava!

Re: Player variable for referee?

Postby Warren1001 » 24 Nov 2013, 02:16

Yes, yes. But how do I use it? Like, what's the code for it?
Warren1001
 
Posts: 197
Joined: 08 Aug 2012, 03:50

Re: Player variable for referee?

Postby joppiesaus » 24 Nov 2013, 19:18

I don't know how you mean it... but:
Code: Select all
bool isPlayerReferee = p.referee;
if (isPlayerReferee) // Or isPlayerreferee == true
{
   // CODE GOES HERE
}
// I don't know if you can modify it...
p.referee = true;
joppiesaus
 
Posts: 379
Joined: 20 Aug 2012, 07:28
Location: in a obsedian house, with glass in it so i can see the lava!

Re: Player variable for referee?

Postby Warren1001 » 25 Nov 2013, 06:15

joppiesaus wrote:I don't know how you mean it... but:
Code: Select all
bool isPlayerReferee = p.referee;
if (isPlayerReferee) // Or isPlayerreferee == true
{
   // CODE GOES HERE
}
// I don't know if you can modify it...
p.referee = true;

Ty, that's exactly what I was looking for.
Warren1001
 
Posts: 197
Joined: 08 Aug 2012, 03:50

Re: Player variable for referee?

Postby Warren1001 » 25 Nov 2013, 06:35

Ugh, nevermind.
I want the thing that does the same thing as p.referee would, but p.referee is not a valid thing to use. What do I use if I want to turn off someone being ref or not without using the command, because I'm rewritting the /referee command.
Warren1001
 
Posts: 197
Joined: 08 Aug 2012, 03:50

Re: Player variable for referee?

Postby ismellike » 25 Nov 2013, 06:57

For educational purposes, I would recommend you take a look at dotPeek (look it up).
What a beast...
User avatar
ismellike
Coder
 
Posts: 731
Joined: 31 Oct 2012, 04:04
Location: Kansas


Return to Help in Coding

Who is online

Users browsing this forum: No registered users and 1 guest

cron