reverted project file for now

moved printing natives

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%40524
This commit is contained in:
David Anderson
2007-02-17 17:25:50 +00:00
parent 43051a0571
commit 03e70ebe16
3 changed files with 51 additions and 57 deletions
-48
View File
@@ -159,23 +159,6 @@ static cell_t sm_IsPlayerFakeClient(IPluginContext *pCtx, const cell_t *params)
return (pPlayer->IsFakeClient()) ? 1 : 0;
}
static cell_t sm_PrintToServer(IPluginContext *pCtx, const cell_t *params)
{
char buffer[1024];
char *fmt;
int arg = 2;
pCtx->LocalToString(params[1], &fmt);
size_t res = atcprintf(buffer, sizeof(buffer)-2, fmt, pCtx, params, &arg);
buffer[res++] = '\n';
buffer[res] = '\0';
META_CONPRINT(buffer);
return 1;
}
static cell_t sm_GetClientInfo(IPluginContext *pContext, const cell_t *params)
{
int client = params[1];
@@ -202,35 +185,6 @@ static cell_t sm_GetClientInfo(IPluginContext *pContext, const cell_t *params)
return 1;
}
static cell_t sm_PrintToConsole(IPluginContext *pCtx, const cell_t *params)
{
int index = params[1];
if ((index < 1) || (index > g_Players.GetMaxClients()))
{
return pCtx->ThrowNativeError("Invalid client index %d", index);
}
CPlayer *pPlayer = g_Players.GetPlayerByIndex(index);
if (!pPlayer->IsInGame())
{
return pCtx->ThrowNativeError("Client %d is not in game", index);
}
char buffer[1024];
char *fmt;
int arg = 3;
pCtx->LocalToString(params[2], &fmt);
size_t res = atcprintf(buffer, sizeof(buffer)-2, fmt, pCtx, params, &arg);
buffer[res++] = '\n';
buffer[res] = '\0';
engine->ClientPrintf(pPlayer->GetEdict(), buffer);
return 1;
}
static cell_t SetUserAdmin(IPluginContext *pContext, const cell_t *params)
{
int client = params[1];
@@ -402,8 +356,6 @@ REGISTER_NATIVES(playernatives)
{"IsPlayerInGame", sm_IsPlayerIngame},
{"IsClientAuthorized", sm_IsPlayerAuthorized},
{"IsFakeClient", sm_IsPlayerFakeClient},
{"PrintToServer", sm_PrintToServer},
{"PrintToConsole", sm_PrintToConsole},
{"GetClientInfo", sm_GetClientInfo},
{"SetUserAdmin", SetUserAdmin},
{"GetUserAdmin", GetUserAdmin},