• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] Kick Command?

Status
Not open for further replies.
Level 2
Joined
Oct 20, 2007
Messages
18
Hi. I was trying to make a -kick command, I know exactly what to do and I know that it will work, but I just DONT know how to make it so that you can type in the colour instead of the player number :(. Please help! (I know this sounds really noobish but I cant figure it out!)
 
Level 8
Joined
Sep 24, 2007
Messages
300
Well, if players have fixed colors, then it's simply -kick orange (player 6 get's kicked), but if players can pick their own colors, then...

It's a good idea actualy, to kick without custom kick.
 
Level 13
Joined
Jun 10, 2007
Messages
780
  • Actions
    • If ((Entered chat string) Equal to -kick blue) then do (Game - Defeat Player 2 (Blue) with the message: Host has kicked you.) else do (-------- Nothing --------)
Or

  • Untitled Trigger 001
    • Events
      • Player - Player 1 (Red) types a chat message containing -Kick Blue as An exact match
    • Conditions
    • Actions
      • Game - Defeat Player 2 (Blue) with the message: Host has kicked you.
 
Level 8
Joined
Sep 24, 2007
Messages
300
This won't work well.

Player 1 isn't always the host and player can change the color before the game starts, so if he is player 7 and changes to blue, player 2 is kicked even if he is not blue.

To prevent the color change you can make a trigger that changes color of player 2 to blue, player 3 to... etc

And instead of player 1 must be put Host (I don't know how to do that so someone else fix it now).
 
Level 4
Joined
Jun 8, 2004
Messages
66
Doing it by color can be pretty unreliable.

Only way that I know of to lock kicking to a dynamic player name would be to force it to only work for a specific slot. If you only want a small group of players/admins to be able to kick, check for the right player name whenever the chat commands are used.

What you could do is just do it by player ID, and have a function to return the name of the player who's in a specific slot.

Basically one chat command is "-guid #" where # is the ID of the player you want to get the name of.
The other is "-kick #" where # is the ID of the player you want to get rid of.

OR, if you don't mind the wall of text, you could just have a "-guid" command that loops through all playing players and returns "[id] - [playername]" for each player. You can just "-kick #" after that.
 
Level 35
Joined
Oct 9, 2006
Messages
6,392
The simple way would be this:

Make a trigger which finds host... I belive there is a tutorial on the hive about how to do that else you can search google for it.

btw If you cant find it... well then I post when I get back to my comp

Then make the first postet trigger, but replace red with the variable host,you get from finding host.
 
Level 2
Joined
Oct 20, 2007
Messages
18
Uh... well there is a problem with the host detector. I know it has been implemented into games like Vampirism Fire and Vampirism Beast. I often play those games and several times the host has been wrongly detected and therefore people abuse that. I also read another thread on this forum that said that if the person who has the fastest internet connection is usually selected as host.

and also....

Doing it by color can be pretty unreliable.

Only way that I know of to lock kicking to a dynamic player name would be to force it to only work for a specific slot. If you only want a small group of players/admins to be able to kick, check for the right player name whenever the chat commands are used.

What you could do is just do it by player ID, and have a function to return the name of the player who's in a specific slot.

Basically one chat command is "-guid #" where # is the ID of the player you want to get the name of.
The other is "-kick #" where # is the ID of the player you want to get rid of.


OR, if you don't mind the wall of text, you could just have a "-guid" command that loops through all playing players and returns "[id] - [playername]" for each player. You can just "-kick #" after that.

Could anyone tell me how to make that player name condition? I know it seems nooby but I really cant find it in the conditions :(

And about the player number kicking system, I have made another map with that, and it just becomes a bit of a bother having to type in the number, as I am not too familiar with the numbers lol.
 
Last edited:
Level 35
Joined
Oct 9, 2006
Messages
6,392
Well using JASS to detect host works smootless.. but doesnt have the trigger for it as I aint home and wont be for some time, but as far as I recall there is a system somewhere with it.

The color of player is jsut a very strange way of doing it, and not realy usefull, as it would be the same as using specific player.

The name one is jsut stupid, the condition is easy to find ( it is in real) but it would not serve any purpose.. why have a trigger that can detects if one specific person is in map and then make him able to kick? Then the map would only work 100% for some people. And when it find for specific slot, as he suggested well that is the samething as saying player 1 (red) can kick... as the result will be the same.....

Find host system is only thing that would work as you want it too, even the system with bugs will be better then the others..
 
Level 2
Joined
Oct 20, 2007
Messages
18
Thanks, I figured out the name condition. I wanted to have some admin commands so... yea. Anyway, thanks for all ur answers ^_^
 
Status
Not open for further replies.
Top