How to code @votekick?

Zavnice

New member
Joined
Aug 18, 2023
Messages
13
@kick command is pretty common, but what about @votekick?
If someone wants to kick a Player
Type @votekick <Player>
And after you type that all players in the game need to vote to kick the Player. If all players voted the Player will be kicked. If there are no votes, the votekick will be cancelled.
Also when a Player type @votekick <Player>
The message will say:
"<The writer> WOULD like to kick <Player>"

Please tell me how to code that.
 

veddnt

Active member
Joined
Jun 2, 2023
Messages
180
Player event(Chat msg.) -> Split text[(Player msg.), arr(%player%-msg)] -> If variable equals( %player%-msgඞ0, @votekick) -> If variable NOT equal[(%player%-vote, True) -> Set variable(%player%-vote, True) -> Send msg ALL(%player% would like to kick %player%-msgඞ1) ->Increment variable( %player%-msgඞ1_VOTES) -> If variable more or equal(%player%-msgඞ1_VOTES, (Online player)) -> Select obj, Player by condition If name equals(%player%-msgඞ1) -> Player action SELECTED( Kick player)
 

Zavnice

New member
Joined
Aug 18, 2023
Messages
13
Player event(Chat msg.) -> Split text[(Player msg.), arr(%player%-msg)] -> If variable equals( %player%-msgඞ0, @votekick) -> If variable NOT equal[(%player%-vote, True) -> Set variable(%player%-vote, True) -> Send msg ALL(%player% would like to kick %player%-msgඞ1) ->Increment variable( %player%-msgඞ1_VOTES) -> If variable more or equal(%player%-msgඞ1_VOTES, (Online player)) -> Select obj, Player by condition If name equals(%player%-msgඞ1) -> Player action SELECTED( Kick player)
Ty
 

veddnt

Active member
Joined
Jun 2, 2023
Messages
180
How the other players gonna vote bro 💀
You didnt mention @vote or @yes
Player event(Chat msg.) -> Split text[(Player msg.), arr(%player%-msg)] -> If player name equals-> [If variable equals( %player%-msgඞ0, @votekick) -> Set variable(PlayerNameToGettingVoted, (%player%-msgඞ1)) -> Send msg ALL(%player% would like to kick l(%player%-msgඞ1)

Player event(Chat msg.) -> Split text[(Player msg.), arr(%player%-msg)] -> If variable equals( %player%-msgඞ0, @yes) -> If variable NOT equal[(%player%-vote, True) -> Set variable(%player%-vote, True) -> Send msg ALL(%player% voted YES) ->Increment variable( PlayerNameToGettingVoted) -> If variable more or equal(%player%-msgඞ1_VOTES, (Online player)) -> Select obj, Player by condition If name equals(%player%-msgඞ1) -> Player action SELECTED( Kick player) -> Select obj. ALL PLAYER -> Set variable( %selected%-vote, False)

@votekick (player) -> Start vote
@yes -> Vote yes to get player kicked
 
Top