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.
Pages: 1
Hello guys i have a big problem with my bot. there i send screenshot.
PS: I need somehow make alive and dead system, to see who is dead and who is alive..
Thx for help :*
^ Made by Bobithan thx. ^
Offline
Hello guys i have a big problem with my bot. there i send screenshot.
PS: I need somehow make alive and dead system, to see who is dead and who is alive..Thx for help :*
Instead of a for loop. Why doesn't you use a dictionary that use your OOP?
Like:
Dictionary<int,players> player = new Dictionary<int,players>();
switch (m.Type) {
case "add":
player.Add(m.Getint(0),new players() { username = m.GetString(1), alive = true });
break;
case "kill":
if (player.ContainsKey(m.GetInt(0))
{
if (player[m.GetInt()].alive) player[m.GetInt(0)].alive = false;
}
break;
}
class players
{
public string username { get; set; }
public bool alive { get; set; }
}
Offline
Thx but another error pup ups..
http://prntscr.com/acrhdo
^ Made by Bobithan thx. ^
Offline
Thx but another error pup ups..
http://prntscr.com/acrhdo
Maybe you would consider telling us what the error is.
Everybody edits, but some edit more than others
Offline
Thx but another error pup ups..
http://prntscr.com/acrhdo
I think the error is cause because you add the player two times to the dictionary, which causes the dictionary to have two items with the same key, so just delete one of the two.
Offline
Thx but another error pup ups..
http://prntscr.com/acrhdo
You should save the coins in the players list too. I don't see a reason to have so many dictionarys.
And what 912468 said. It's shouldn't be added twice.
Offline
i usually create a separate list with players and add everyone into the game
Each time when someone dies on case "kill"
delete the player until there is 1 player left and that 1 player wins
Sample Text.
Doritos/Mountain Dew eater.
420 No scoping 69 scrubs per day
Always smoke weed everyday.
Known for: #getrekt Bot (possible revive with new stuff?)
Offline
Here is an example how I would do it.
http://pastebin.com/GJ9YHGuy
Offline
Here is an example how I would do it.
http://pastebin.com/GJ9YHGuy
Yay, unnecessary functionality. You can't be a pro programmer without it.
~ I think this post would be better answered with a tutorial about certain collections, such as class dictionaries, as lack of core C# knowledge seems to be the difficulty here rather than using EE's messages.
Teach a man to fish. Don't just hand him fish.
If motivation to work harder than absolutely necessary was a common attribute among newbie botmakers, sites like these would be more helpful than spoonfed code:
http://www.dotnetperls.com/
http://stackoverflow.com/
http://www.homeandlearn.co.uk/csharp/csharp.html
https://msdn.microsoft.com/en-us/librar … s.71).aspx
Peer learning's great and all, but it's not done quite right in this forum in the [Help] threads.
One bot to rule them all, one bot to find them. One bot to bring them all... and with this cliché blind them.
Offline
Teach a man to fish. Don't just hand him fish.
"Teach men to fish and then fishermen will be less paid." Fishermen quote.
"Quantity its better than quality." Chinese quote.
Everybody edits, but some edit more than others
Offline
"Teach men to fish and then fishermen will be less paid." Fishermen quote."Quantity its better than quality." Chinese quote.
I have no idea what you're arguing.
And your signature image is annoyingly big <3
One bot to rule them all, one bot to find them. One bot to bring them all... and with this cliché blind them.
Offline
Pages: 1
[ Started around 1732514258.9184 - Generated in 0.068 seconds, 13 queries executed - Memory usage: 1.61 MiB (Peak: 1.8 MiB) ]