2 * ===============================================================
3 * SourceMod (C)2004-2007 AlliedModders LLC. All rights reserved.
4 * ===============================================================
6 * This file is not open source and may not be copied without explicit
7 * written permission of AlliedModders LLC. This file may not be redistributed
8 * in whole or significant part.
9 * For information, see LICENSE.txt or http://www.sourcemod.net/license.php
15 #include "sm_globals.h"
16 #include "sourcemod.h"
18 static cell_t ThrowError(IPluginContext *pContext, const cell_t *params)
22 g_SourceMod.FormatString(buffer, sizeof(buffer), pContext, params, 1);
24 if (pContext->GetContext()->n_err == SP_ERROR_NONE)
26 pContext->ThrowNativeErrorEx(SP_ERROR_ABORTED, "%s", buffer);
32 static cell_t GetTime(IPluginContext *pContext, const cell_t *params)
34 time_t t = time(NULL);
36 pContext->LocalToPhysAddr(params[1], &addr);
40 return static_cast<cell_t>(t);
43 REGISTER_NATIVES(coreNatives)
46 {"ThrowError", ThrowError},