Welcome to Open Carnage

A resource for Halo 1 modding and tech, with unique means of rewarding individual content creation and support. Have a wander to see why we're worth the time! EST. 2012


Customized message

12 posts in this topic
13 minutes ago, Weyland said:

Hi @Kavawuvi


I've been using the following for a few months with no problems

event_prejoin '$name:WeylandSucks' 'sv_kick $name'

Using that, SAPP has consistently kicked the player joining with the specified name.


From what you're saying and from the testing I've done it appears using the same command for names with spaces just isn't going to work, even when I change the prejoin to a join and the sv_kick to a k - thank you for responding and your input anyway.




Let's look at the command for a moment:

sv_kick $name

You're using the command sv_kick which takes exactly one argument, and that is either the number of the player or the name of the player.



The variable, $name will be substituted for the name of the player. So, if we have a player called Weyland, the command will then look like this:

sv_kick Weyland

You're giving it one parameter: Weyland. Therefore, it will be successful and the player will be kicked.



Let's say our player is called Weyland Sucks for a moment. The command will look like this then:

sv_kick Weyland Sucks

The problem is now you're giving sv_kick TWO parameters: Weyland and Sucks. sv_kick only takes one parameter, so the command will fail. The player will not be removed from the game. Although it worked once when you were just checking for Weyland, it did not work this time.



Now let's also say our player is called 002 (my old name). The command will look like this then:

sv_kick 002

Note that "002" can be treated as a number, here, and thus Halo may instead kick player number 2 rather than the player named "002". Unless the player's number is also 2, then the command will fail, or worse: the wrong player might be kicked.



However, if you kicked players like this:

sv_kick $n

Then it will always kick the correct player regardless of the name of that player.

Share this post

Link to post
Share on other sites

Members of Open Carnage never see off-site ads.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.