AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   PreThink Question... (https://forums.alliedmods.net/showthread.php?t=49217)

omghax 12-29-2006 21:24

PreThink Question...
 
I was wondering, before changing lots of code...

If PreThink could catch a users command, before the server crashed. Or if commands could even be run from PreThink... I've never mess around with it before.

e.g. if amx_bslap Bob 20 slaps the player Bob 20 times, but crash's instantly, if checking to see if the user ran the command through PreThink if it would make any difference logging wise.


-- Thanks, :)
-- Have a nice day, :D!

stupok 12-29-2006 21:33

Re: PreThink Question...
 
I'm guessing you run an EntMod server and want to know if someone crashed the server by using a certain command. If that's the case, search for EntMod Manager.

Anyway, to see which command crashed the server, just log all commands executed that could possibly crash the server. That means writing the commands to a file, like a txt file as they are executed. Also, write a line in the file when the server starts. That way, you can see what the last command was before the server started, which is also the last command executed during the previous session. This last command is most likely the one that caused the crash.

client_PreThink cannot help you to find the command that caused the crash.

omghax 12-29-2006 21:39

Re: PreThink Question...
 
Well, I'm somewhat running an EntMod server. And I have all of that running already, but it never logs the last command.

Is there anything that would?

XxAvalanchexX 12-29-2006 21:56

Re: PreThink Question...
 
Place AMXX above Entmod in Metamod's plugins.ini file, if it isn't already. You could then use the client_command forward and log whatever comes through.

omghax 12-29-2006 22:09

Re: PreThink Question...
 
Would this be more efficient then using plugin_init? Or does it receive it semi faster... ?

Thanks for the replys by the way, :)

spider853 12-30-2006 05:51

Re: PreThink Question...
 
You Wana Say Something Like Try() Catch??


All times are GMT -4. The time now is 22:24.

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