Welcome to Open Carnage

A resource for gamers and technology enthusiasts, with unique means of rewarding content creation and support. Have a wander to see why we're worth the time!

mdc81

Customized message

12 posts in this topic

You can create a script where when entering your server shows you a message specifically to you by your nickname, try it in the event.txt with the following event

 

event_join $name:M chef  'say * "Welcome Friend M chet"'

 

As you see is a welcome message specifically to my friends halo but it does not work for space there is M (space) chef only when it is a nickname without spaces and without 'someone can help me to solve that please, Thank

 

Share this post


Link to post
Share on other sites

Members of Open Carnage never see off-site ads.

Hi @Kavawuvi,

 

That solution for names with spaces above doesn't work, e.g

event_prejoin '$name:Weyland Sucks' 'sv_kick $name'

doesn't kick the name.
 

Don't suppose you have any other suggestions?

 

Cheers

Share this post


Link to post
Share on other sites
34 minutes ago, Weyland said:

Hi @Kavawuvi,

 

That solution for names with spaces above doesn't work, e.g


event_prejoin '$name:Weyland Sucks' 'sv_kick $name'

doesn't kick the name.
 

Don't suppose you have any other suggestions?

 

Cheers

 

$name is not valid during event_prejoin because the player hasn't been assigned their name yet. Use event_join, instead.

Weyland likes this

status.png?customhost=ProtonNebula.com:1

status.png?customhost=ProtonNebula.com:2

status.png?customhost=ProtonNebula.com:2

competent.png

Share this post


Link to post
Share on other sites

Posted (edited)

The event_prejoin is working fine on names with no spaces though?

 

For names with spaces I've tried both

event_prejoin '$name:Weyland Sucks' 'sv_kick $name'
event_prejoin $name:'Weyland Sucks' 'sv_kick $name'

and neither work.

 

I've also tried 

event_join '$name:Weyland Sucks' 'sv_kick $name'
event_alive '$name:Weyland Sucks' 'sv_kick $name'

and neither work.

Edited by Weyland

Share this post


Link to post
Share on other sites

Hey @Krazychic, no nothing to do with POQ sucks - I've just found using sv_kicks on event_prejoins has been a nice discreet way to weed out a few of the more persistent trolls lurking behind VPNs and keygens/re-installs.

 

Be handy to get it working for players with spaces in their name as well.

Krazychic likes this

Share this post


Link to post
Share on other sites
1 hour ago, Weyland said:

The event_prejoin is working fine on names with no spaces though?

To my knowledge, event_prejoin's $name uses the name of the player who last took up that player slot, not the name of the player who is joining. It's possible sehe fixed this, but I can't be certain.
 

 

1 hour ago, Weyland said:

event_join '$name:Weyland Sucks' 'sv_kick $name'
event_alive '$name:Weyland Sucks' 'sv_kick $name'

Use 'sv_kick $n'.

 

Using sv_kick to kick by name is very dangerous if scripting. If you programmed this to look for a name that is just a number, then sv_kick will possibly kick the person with that number as their player index rather than that number as their name. Also, sv_kick only takes one argument, and if $name has a space in it, each word in the name will be treated as its own argument causing the command to fail.


status.png?customhost=ProtonNebula.com:1

status.png?customhost=ProtonNebula.com:2

status.png?customhost=ProtonNebula.com:2

competent.png

Share this post


Link to post
Share on other sites

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.

 

Share this post


Link to post
Share on other sites

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.