| ConnorMcLeod |
02-11-2009 11:14 |
Re: Function istriggered is not configured in hamdata.ini.
Seems that the forward doesn't exists for dod or that sawce hasn't found the offset.
IF it was existing, your code would be wrong and should be :
public Flag_Cap(iEnt, id) (supposing dod_capture_area is an existing entity)
If you only want to catch when this is triggered, you can run this plugin :
PHP Code:
#include <amxmodx>
new g_iState
public plugin_init() { register_plugin("LogEvents Logger", "1.0.0", "connorr") register_srvcmd("logevents", "ServerCommand_LogEvents", _, "<print> | <log> | <stop>") }
public plugin_log() { if(!g_iState) { return }
static szMain[256], szDetail[256], szRegistered[256] static iArgsNum, n, m, szTemp[64]
read_logdata(szMain, 255)
iArgsNum = read_logargc()
n = 0 m = formatex(szRegistered, 255, "register_logevent(^"function_name^", %d", iArgsNum)
for(new i; i<iArgsNum; i++) { read_logargv(i, szTemp, 63) n += formatex(szDetail[n], 255-n, "^n%d=%s", i, szTemp) m += formatex(szRegistered[m], 255-m, ", ^"%d=%s^"", i, szTemp) } m += formatex(szRegistered[m], 255-m, ")^n")
if(g_iState==2) { static const logfile[] = "logevents.log" log_to_file(logfile, "^n%s%s^n%s", szMain, szDetail, szRegistered) } else { server_print("^n%s%s^n%s", szMain, szDetail, szRegistered) } }
public ServerCommand_LogEvents() { new szArg1[6] read_argv(1, szArg1, 5)
static const szStates[][] = {"stop", "print", "log"}
for(new i; i<sizeof(szStates); i++) { if( equal(szArg1, szStates[i]) && g_iState != i ) { g_iState = i break } }
server_print("[LogEvents Logger] Currently : %s", szStates[g_iState]) }
When you are near the flag, type 'logevent log', wait for the thing be triggered, then type logevent stop, go in the log file and you will have an example on how you can register the logevent.
Maybe :
register_logevent("Cap_Flag", 4, "1=triggered a", "2=dod_capture_area")
|