Official Everybody Edits Forums

Do you think I could just leave this part blank and it'd be okay? We're just going to replace the whole thing with a header image anyway, right?

You are not logged in.

#1 2016-01-24 07:42:25, last edited by cercul1 (2016-01-24 09:06:29)

cercul1
Member
From: USA
Joined: 2015-02-18
Posts: 91

How to check what team someone is?

I'm making a bot and I have teams set up to show who's turn it is:
     none-not joined
     red-not your turn
     green- your turn

but how do I check what team they're on


Om_1869ea_249353.jpg

Offline

#2 2016-01-24 07:53:46

Luka504
Member
From: Serbia,probs never heard of it
Joined: 2015-02-19
Posts: 2,934

Re: How to check what team someone is?

I cant give u the direct command,since im not a proggramer.
But maybe something with team doors?If they fall through it and collect a coin for example
You teleport them wherever u want?


How long will it take me to get banned again?
Place your bets right here.

Offline

#3 2016-01-24 07:56:51

cercul1
Member
From: USA
Joined: 2015-02-18
Posts: 91

Re: How to check what team someone is?

No that wouldn't work for my use of it, but thank you. c:


Om_1869ea_249353.jpg

Offline

#4 2016-01-24 13:12:34

den3107
Member
From: Netherlands
Joined: 2015-04-24
Posts: 1,025

Re: How to check what team someone is?

http://pastebin.com/4Ka7smBv is MOSTLY updates (doesn't have the newest data about separate aura styles and such).
Reading from that page:
# team - UserID joins a team
    [0] <Integer> UserID
    [1] <Integer> Color
    0       Disabled
    1       Red
    2       Blue
    3       Green
    4       Cyan
    5       Magenta
    6       Yellow

So in your onMessage method, listen for the team-type and keep track of which player being which team in your Player object or somewhere else.

Offline

#5 2016-01-24 18:29:47

cercul1
Member
From: USA
Joined: 2015-02-18
Posts: 91

Re: How to check what team someone is?

den3107 wrote:

http://pastebin.com/4Ka7smBv is MOSTLY updates (doesn't have the newest data about separate aura styles and such).
Reading from that page:
# team - UserID joins a team
    [0] <Integer> UserID
    [1] <Integer> Color
    0       Disabled
    1       Red
    2       Blue
    3       Green
    4       Cyan
    5       Magenta
    6       Yellow

So in your onMessage method, listen for the team-type and keep track of which player being which team in your Player object or somewhere else.

K I'm pretty nooby at c# still, but i understand that i can use m.GetInt(1) and stuff but like, i need to use this info in case "say", i can't use it in case "team"... i'm  not quite sure how they work entirely, but i was thinking i could create another dictionary called teams, like i did for players.  if this is a good idea, could you explain how i would set it up and use this.  if you have a better idea, i would much appreciate it too.


Om_1869ea_249353.jpg

Offline

#6 2016-01-24 18:36:49, last edited by capasha (2016-01-24 19:00:24)

capasha
Member
Joined: 2015-02-21
Posts: 4,066

Re: How to check what team someone is?

Why would you run it in say? When it's the message "team"?
Show me a bit of your code. I guess you have coded wrong.

This is how I would do it. You can store more data in the class. Instead of different dictionarys.
http://pastebin.com/JLUYE72u

Offline

#7 2016-01-24 19:49:48

den3107
Member
From: Netherlands
Joined: 2015-04-24
Posts: 1,025

Re: How to check what team someone is?

I think you need to declare a variable as a global where you save what player is in which team, then you can access it everywhere in that cs file.

Offline

den31071453661388577664

Board footer

Powered by FluxBB

[ Started around 1732759900.4768 - Generated in 0.046 seconds, 12 queries executed - Memory usage: 1.44 MiB (Peak: 1.56 MiB) ]