Raised This Month: $51 Target: $400
 12% 

player_say commands


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
psychokilla
Junior Member
Join Date: Jan 2005
Old 04-15-2005 , 22:50   player_say commands
Reply With Quote #1

Can someone check this and tell me what would be the proper way to enter the commands (I'm assuming each command would take the same form)

Quote:

// EventScripts v0.2.0
setinfo mycommand 0
setinfo myvar 0
es_token mycommand event_var(text) 1
if (event_var(text) equalto "site") then es_xmsg [Info] www.lame-gaming.co.uk
if (event_var(text) equalto "help") then es ma_help
if (event_var(text) equalto "rules") then es_xmsg [Info] www.lame-gaming.co.uk/server-rules.htm
if (server_var(mycommand) equalto "!kick") then es_token myvar event_var(text) 2
if (server_var(mycommand) equalto "!kick") then es ma_kick server_var(myvar)
if (server_var(mycommand) equalto "!mute") then es_token myvar event_var(text) 2
if (server_var(mycommand) equalto "!mute") then es ma_mute server_var(myvar)
if (server_var(mycommand) equalto "!slap") then es_token myvar event_var(text) 2
if (server_var(mycommand) equalto "!slap") then es ma_slap server_var(myvar)
if (server_var(mycommand) equalto "!drug") then es_token myvar event_var(text) 2
if (server_var(mycommand) equalto "!drug") then es ma_drug server_var(myvar)
if (server_var(mycommand) equalto "!map") then es_token myvar event_var(text) 2
if (server_var(mycommand) equalto "!map") then es ma_map server_var(myvar)
if (server_var(mycommand) equalto "!burn") then es_token myvar event_var(text) 2
if (server_var(mycommand) equalto "!burn") then es ma_burn server_var(myvar)
The first three commands are, of course, just prompts for info, the remaining ones would hopefully take the form of typing into say :

!kick badplayer

and then the kick command would be carried out (presumably with auto-complete of the name)

Thanks in advance
psychokilla is offline
ajax
Veteran Member
Join Date: Jan 2005
Old 04-15-2005 , 23:29  
Reply With Quote #2

looks to me like it would work, unless you run into timing or variable expansion issues. also it probably won't work if you really are running "EventScripts v0.2.0"

let us know if it works.
ajax is offline
Mattie
Veteran Member
Join Date: Jan 2005
Old 04-15-2005 , 23:47  
Reply With Quote #3

This looks like it will work fine. Keep in mind though, that these are going to trigger no matter who types them. I wouldn't use this on a public server.

You have to be sure your say commands are in this form:
!kick mattie

If you ever tried:
!kick The Terrible Hacker On My Server

it would kick everyone with "the" in their name. Probably best if you asked players to always use the userid instead of a name.

-Mattie
Mattie is offline
psychokilla
Junior Member
Join Date: Jan 2005
Old 04-16-2005 , 08:05  
Reply With Quote #4

Good to know it should work, but I have my admins listed in admins.txt, so only those who have access to admin functions would be able to kick surely?

Because anyone trying to kick without admin access would be told that it's an unknown command.
psychokilla is offline
psychokilla
Junior Member
Join Date: Jan 2005
Old 04-16-2005 , 08:16  
Reply With Quote #5

Good to know it should work, but I have my admins listed in admins.txt, so only those who have access to admin functions would be able to kick surely?

Because anyone trying to kick without admin access would be told that it's an unknown command.
psychokilla is offline
Mattie
Veteran Member
Join Date: Jan 2005
Old 04-16-2005 , 09:20  
Reply With Quote #6

Quote:
Originally Posted by psychokilla
Good to know it should work, but I have my admins listed in admins.txt, so only those who have access to admin functions would be able to kick surely?

Because anyone trying to kick without admin access would be told that it's an unknown command.
Nooo-- the script you posted causes those commands to be run on the server console not on the player's console. You have to be careful about that. It's just like running "ma_kick 1" from a cfg file-- it's translated as an rcon/console command.

If you want the admins to execute it themselves, you need to use Mani's client execute command, ma_cexec. For example:

Code:
if (server_var(mycommand) equalto "!burn") then es ma_cexec event_var(userid) ma_burn server_var(myvar)
This causes Mani to tell their client to execute the command in their client's console. As such, it will be subject to Mani's security.

Hope this helps,
-Mattie
Mattie is offline
psychokilla
Junior Member
Join Date: Jan 2005
Old 04-16-2005 , 13:25  
Reply With Quote #7

Thanks again Mattie and all, works a treat now
psychokilla is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 08:34.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode