HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Can anyone make my ban system

04-12-2004, 09:59 PM#1
Oxalic
<player> types ban <player>

Everyone gets a choice that pops up yes or no
if majority choses yes the player is banned, if the majority choses no or half of the players chose no nothing happens
04-12-2004, 10:46 PM#2
The Gearhead
Set Variable_CurrentPlayers to 0
For (Integer A 1-12)
+ Loop
~ ~ If/Then/Else (Multiple)
~ ~ - If
~ ~ ~ And
((Player((Integer A))) slot status) Equal to Is playing
((Player((Integer A))) controller) Equal to User
~ ~ - Then
(Meh, I'll summarize it from here on)
Set Variable_CurrentPlayers to (Variable_CurrentPlayers + 1)


That will tell you how many players.

After it does that, create an identical "For" loop, except to show a dialog which is Yes/No. Yes sets another variable to +1, and No keeps it equal. Lets say thats Variable_VoteTally

After that, all you have to do is create a trigger "Game - Value of Real Variable" the variable being VoteTally with "Greater than" (.5 x CurrentPlayers)

Then, for the actions, you set VoteTally to 0, CurrentPlayers to 0, and do whatever actions you want to get rid of somebody.
04-12-2004, 10:52 PM#3
fugly
Code:
Event: Player 1 chat message -ban (as a substring)
          (Make one of these for every player)
Action:
      set BannedPlayer = Player(convert entered substring 10,10 into integer)
      Game Disp TXT - (explain whats going on for every one)
   
      set booleen vaiable ban = true
      start timer (ban timer)
      create window for timer

Code:
Event: Player 1 chat message -yes (as an exact match)
(one of these for every player)
Condition: ban = true
Action: set bannumber = bannumber + 1

Code:
Event: Timer - ban timer (expires)
Action:
set ban = false
if (bannumber/Number of Players in the game > 0.5) 
   then
    Defeat for BannedPlayer
    else
    Do nothing

that should give the general idea
04-12-2004, 11:47 PM#4
The Gearhead
So defeat works in the latest patch?
04-13-2004, 12:47 AM#5
Oxalic
11 players... you would also have to account for players leaving or a non-full house. If you could make it into a working .w3x that would rock
04-13-2004, 01:48 AM#6
The Gearhead
His method works, believe me. Number of players in game is an integer, I just forgot of its existance.
04-13-2004, 05:36 PM#7
Oxalic
Fugly looks like a good system but i dont get how to work with string so could you make it in editor and attach it or tell me how it works (the string stuff)
04-13-2004, 08:56 PM#8
fugly
want me to just make the whole thing? if not then here
- b a n 0 1
1 2 3 456 7

see how that works? So therefore you need the number that is in 6,7
so you would use that in your trigger
04-13-2004, 09:54 PM#9
fugly
Quote:
Originally Posted by fugly
want me to just make the whole thing? if not then here
- b a n 0 1
1 2 3 456 7

see how that works? So therefore you need the number that is in 6,7
so you would use that in your trigger

here is the map
04-13-2004, 10:52 PM#10
DoCa-Cola
You could also use mine and AnArKi's system on top of using yours. If you find a player that is a complete asshole, you add their name to the text array, when the game starts, it does a check for all of the names in the array, if a player with that name is playing, they get defeated with the message "You were disconnected"

Though it's not what you're looking for, it's a damn nice system that everyone should use to purge their maps of complete idiots.
04-14-2004, 12:00 AM#11
fugly
ok here is an update of my bugged map, (players can vote more than once, stupid me)
04-15-2004, 04:11 PM#12
Deathperception
Thanks 4 this system I this is exactly what I'm looking for. ^_^