AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Detecting scripts and user configs (https://forums.alliedmods.net/showthread.php?t=62317)

Zamma 10-23-2007 20:45

Detecting scripts and user configs
 
Is it possible to read a usersconfig for scripts?

For instance.. if the user has a button bound to say bind "o" "+sparta" and the script spams a load of say commands ect.

Is the +sparta client side? and the say commands sent out the only readables?

Is it possible to read this +sparta command the client used?

Plus can u detect whatever command the player just used (say, +attack) and record it?

thanks in advanced!

Alka 10-24-2007 06:56

Re: Detecting scripts and user configs
 
Quote:

Originally Posted by kp_uparrow (Post 545567)
hl commands like +attack cannot be detected

WUT? how about...
Fakemeta:
Code:

if(pev(id, pev_button) & IN_ATTACK))
{
    client_print(id, print_center, "You'r in attack, dumb!");
}

:S

Jheshka 10-25-2007 00:20

Re: Detecting scripts and user configs
 
Quote:

Originally Posted by kp_uparrow (Post 545793)
not with register_clcmd

Are you dumb?

He just showed how to detect if the player was attacking...

Code:
if(pev(id, pev_button) & IN_ATTACK)) { //DO STUFF IF PLAYER IS ATTACKING }

Zamma 10-25-2007 15:38

Re: Detecting scripts and user configs
 
so no way of reading +scripts
or configs?

Wilson [29th ID] 10-26-2007 04:40

Re: Detecting scripts and user configs
 
Hey guys why don't you start your own thread about it? :P

To answer your question, Zamma, yeah you can catch it.

register_clcmd( "+sparta", "hook_sparta" );

I don't know if you can block it though since it's client-sided....but at least you can send him the opposite commands to set him back to normal.

Zamma 10-26-2007 09:39

Re: Detecting scripts and user configs
 
Wilson - does that mean you need to know the script name?

What happens for instant if u just want to record whatever client command they use?
If your just checking for scripts...

Wilson [29th ID] 10-26-2007 13:12

Re: Detecting scripts and user configs
 
Code:
public client_command( id ) {    new cmd[64];    read_argv( 0, cmd, 63 );    // the string 'cmd' is now the command the client sent }

Obviously it's not gonna catch certain commands that are strictly client-side and don't get sent to the server.

Zamma 10-26-2007 17:52

Re: Detecting scripts and user configs
 
what about rate commands? - can it detect rate commands / slot changing commands ?

Wilson [29th ID] 10-27-2007 12:46

Re: Detecting scripts and user configs
 
slot changing commands, no. But to counter it, you can detect the weapon_glock commands, etc., which the slot commands actually activate.

rate commands, I honestly don't know. Try it and see.


All times are GMT -4. The time now is 01:19.

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