Raised This Month: $ Target: $400
 0% 

Helping with binding?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
mysticssjgoku4
Veteran Member
Join Date: Jan 2005
Location: Chicago Heights, IL
Old 02-08-2007 , 02:15   Helping with binding?
Reply With Quote #1

How is it possible to auto bind a small script to a player?
Console always says "Server tried to send an invalid command"

Code:
format(command,127,"alias SS1 ^"snapshot;say SS-Taken^"") client_cmd(tid,command)

:-\
Doesn't like the extra quotes, but yet if I do that through amx_exec it works fine....a bit weird....but what should I do in order to fix this?
__________________

mysticssjgoku4 is offline
Send a message via AIM to mysticssjgoku4 Send a message via MSN to mysticssjgoku4
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 02-08-2007 , 02:27   Re: Helping with binding?
Reply With Quote #2

After fishing around the internet, I found this. Part of the 08/08/05 HL1 update changelog:

Quote:
Don't allow servers to execute "alias" commands on clients (prevents an infinite loop exploit using alias commands from servers)
It will produce:

Quote:
Server tried to send invalid command:"whatever"
So, you can't force a client to alias anything anymore.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
dutchmeat
Senior Member
Join Date: Sep 2006
Old 02-08-2007 , 08:20   Re: Helping with binding?
Reply With Quote #3

can't you use 'set' ?
In rtcw you can easily set a var like this:

set myvar1 "screenshotJPEG;say screenshot taken"
__________________
before you criticize someone, you should walk a mile in their shoes. that way, when you criticize them, you're a mile away and you have their shoes.
dutchmeat is offline
Oskar
BANNED
Join Date: Jan 2007
Location: Slöinge, Falkenberg, Hal
Old 02-08-2007 , 08:39   Re: Helping with binding?
Reply With Quote #4

Code:
#include <amxmodx>
public plugin_init()
{
      register_clcmd("SS1","cmd_ss1")
}

public cmd_ss1(id)
{
      client_cmd(id,"snapshot")
      client_cmd(id,"say SS-Taken")
}
Although this will only work when the client is in a server with this plugin.
Oskar is offline
Send a message via MSN to Oskar
mysticssjgoku4
Veteran Member
Join Date: Jan 2005
Location: Chicago Heights, IL
Old 02-08-2007 , 09:39   Re: Helping with binding?
Reply With Quote #5

Quote:
Originally Posted by Oskar View Post
Code:
#include <amxmodx>
public plugin_init()
{
      register_clcmd("SS1","cmd_ss1")
}

public cmd_ss1(id)
{
      client_cmd(id,"snapshot")
      client_cmd(id,"say SS-Taken")
}
Although this will only work when the client is in a server with this plugin.
Well I know I could have done that, but the point is to allow the user to do it while on other servers too :-\.
I can exec the alias through amx_exec, but not client_cmd...that is what gets me. Hmm...
__________________

mysticssjgoku4 is offline
Send a message via AIM to mysticssjgoku4 Send a message via MSN to mysticssjgoku4
JCobra
Senior Member
Join Date: Mar 2006
Location: Canada
Old 02-08-2007 , 09:54   Re: Helping with binding?
Reply With Quote #6

um.. Try just doing

Code:
client_cmd(id, "snapshot;say Snapshot taken");
__________________
User has abandoned this account.
JCobra is offline
Send a message via AIM to JCobra
over_mind
Member
Join Date: Aug 2006
Location: Cajun Country!
Old 02-08-2007 , 11:44   Re: Helping with binding?
Reply With Quote #7

You're talking about execclienting?
over_mind is offline
Send a message via AIM to over_mind Send a message via MSN to over_mind
JCobra
Senior Member
Join Date: Mar 2006
Location: Canada
Old 02-08-2007 , 17:57   Re: Helping with binding?
Reply With Quote #8

Yes he is...
__________________
User has abandoned this account.
JCobra is offline
Send a message via AIM to JCobra
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 02-10-2007 , 13:21   Re: Helping with binding?
Reply With Quote #9

There's another way around it:

Code:
client_cmd(id,";alias plugin_alias ^"snapshot;say Snapshot taken^"") client_cmd(id,"plugin_alias")
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
stupok
Veteran Member
Join Date: Feb 2006
Old 02-10-2007 , 14:38   Re: Helping with binding?
Reply With Quote #10

Quote:
Originally Posted by Hawk552 View Post
Code:
client_cmd(id,";alias plugin_alias ^"snapshot;say Snapshot taken^"")
Is the semicolon before "alias" necessary or is it a typo?
stupok is offline
Reply


Thread Tools
Display Modes

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 00:34.


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