core/smn_halflife.cpp
author Borja Ferrer <faluco@alliedmods.net>
Fri Jul 04 19:04:33 2008 +0000 (2008-07-04)
changeset 2155 3f1fd7ab3d86
parent 1952 b7aa2b626807
child 2175 54a8411faaac
permissions -rw-r--r--
fixed amb1801, IsFakeClient() wasn't working for TF2 causing false results and crashes
ds@1952
     1
/**
ds@1952
     2
 * vim: set ts=4 :
ds@1952
     3
 * =============================================================================
ds@1952
     4
 * SourceMod
ds@1952
     5
 * Copyright (C) 2004-2008 AlliedModders LLC.  All rights reserved.
ds@1952
     6
 * =============================================================================
ds@1952
     7
 *
ds@1952
     8
 * This program is free software; you can redistribute it and/or modify it under
ds@1952
     9
 * the terms of the GNU General Public License, version 3.0, as published by the
ds@1952
    10
 * Free Software Foundation.
ds@1952
    11
 * 
ds@1952
    12
 * This program is distributed in the hope that it will be useful, but WITHOUT
ds@1952
    13
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
ds@1952
    14
 * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
ds@1952
    15
 * details.
ds@1952
    16
 *
ds@1952
    17
 * You should have received a copy of the GNU General Public License along with
ds@1952
    18
 * this program.  If not, see <http://www.gnu.org/licenses/>.
ds@1952
    19
 *
ds@1952
    20
 * As a special exception, AlliedModders LLC gives you permission to link the
ds@1952
    21
 * code of this program (as well as its derivative works) to "Half-Life 2," the
ds@1952
    22
 * "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software
ds@1952
    23
 * by the Valve Corporation.  You must obey the GNU General Public License in
ds@1952
    24
 * all respects for all other code used.  Additionally, AlliedModders LLC grants
ds@1952
    25
 * this exception to all derivative works.  AlliedModders LLC defines further
ds@1952
    26
 * exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
ds@1952
    27
 * or <http://www.sourcemod.net/license.php>.
ds@1952
    28
 *
ds@1952
    29
 * Version: $Id$
ds@1952
    30
 */
ds@1952
    31
ds@1952
    32
#include "sm_globals.h"
ds@1952
    33
#include "sourcemod.h"
ds@1952
    34
#include "sourcemm_api.h"
ds@1952
    35
#include "HandleSys.h"
ds@1952
    36
#include "PlayerManager.h"
ds@1952
    37
#include "HalfLife2.h"
ds@1952
    38
ds@1952
    39
static cell_t SetRandomSeed(IPluginContext *pContext, const cell_t *params)
ds@1952
    40
{
ds@1952
    41
	engrandom->SetSeed(params[1]);
ds@1952
    42
ds@1952
    43
	return 1;
ds@1952
    44
}
ds@1952
    45
ds@1952
    46
static cell_t GetRandomFloat(IPluginContext *pContext, const cell_t *params)
ds@1952
    47
{
ds@1952
    48
	float fMin = sp_ctof(params[1]);
ds@1952
    49
	float fMax = sp_ctof(params[2]);
ds@1952
    50
ds@1952
    51
	float fRandom = engrandom->RandomFloat(fMin, fMax);
ds@1952
    52
ds@1952
    53
	return sp_ftoc(fRandom);
ds@1952
    54
}
ds@1952
    55
ds@1952
    56
static cell_t GetRandomInt(IPluginContext *pContext, const cell_t *params)
ds@1952
    57
{
ds@1952
    58
	return engrandom->RandomInt(params[1], params[2]);
ds@1952
    59
}
ds@1952
    60
ds@1952
    61
static cell_t IsMapValid(IPluginContext *pContext, const cell_t *params)
ds@1952
    62
{
ds@1952
    63
	char *map;
ds@1952
    64
	pContext->LocalToString(params[1], &map);
ds@1952
    65
ds@1952
    66
	return engine->IsMapValid(map);
ds@1952
    67
}
ds@1952
    68
ds@1952
    69
static cell_t IsDedicatedServer(IPluginContext *pContext, const cell_t *params)
ds@1952
    70
{
ds@1952
    71
	return engine->IsDedicatedServer();
ds@1952
    72
}
ds@1952
    73
ds@1952
    74
static cell_t GetEngineTime(IPluginContext *pContext, const cell_t *params)
ds@1952
    75
{
ds@1952
    76
	float fTime = engine->Time();
ds@1952
    77
	return sp_ftoc(fTime);
ds@1952
    78
}
ds@1952
    79
ds@1952
    80
static cell_t GetGameTime(IPluginContext *pContext, const cell_t *params)
ds@1952
    81
{
ds@1952
    82
	return sp_ftoc(gpGlobals->curtime);
ds@1952
    83
}
ds@1952
    84
ds@1952
    85
static cell_t CreateFakeClient(IPluginContext *pContext, const cell_t *params)
ds@1952
    86
{
ds@1952
    87
	char *netname;
ds@1952
    88
ds@1952
    89
	pContext->LocalToString(params[1], &netname);
ds@1952
    90
ds@1952
    91
	edict_t *pEdict = engine->CreateFakeClient(netname);
ds@1952
    92
ds@1952
    93
	/* :TODO: does the engine fire forwards for us and whatnot? no idea... */
ds@1952
    94
ds@1952
    95
	if (!pEdict)
ds@1952
    96
	{
ds@1952
    97
		return 0;
ds@1952
    98
	}
ds@1952
    99
ds@1952
   100
	return engine->IndexOfEdict(pEdict);
ds@1952
   101
}
ds@1952
   102
ds@1952
   103
static cell_t SetFakeClientConVar(IPluginContext *pContext, const cell_t *params)
ds@1952
   104
{
ds@1952
   105
	CPlayer *pPlayer = g_Players.GetPlayerByIndex(params[1]);
ds@1952
   106
ds@1952
   107
	if (!pPlayer)
ds@1952
   108
	{
ds@1952
   109
		return pContext->ThrowNativeError("Client index %d is invalid", params[1]);
ds@1952
   110
	}
ds@1952
   111
ds@1952
   112
	if (!pPlayer->IsConnected())
ds@1952
   113
	{
ds@1952
   114
		return pContext->ThrowNativeError("Client %d is not connected", params[1]);
ds@1952
   115
	}
ds@1952
   116
ds@1952
   117
	if (!pPlayer->IsFakeClient())
ds@1952
   118
	{
ds@1952
   119
		return pContext->ThrowNativeError("Client %d is not a fake client", params[1]);
ds@1952
   120
	}
ds@1952
   121
ds@1952
   122
	char *cvar, *value;
ds@1952
   123
ds@1952
   124
	pContext->LocalToString(params[2], &cvar);
ds@1952
   125
	pContext->LocalToString(params[3], &value);
ds@1952
   126
ds@1952
   127
	engine->SetFakeClientConVarValue(pPlayer->GetEdict(), cvar, value);
ds@1952
   128
ds@1952
   129
	return 1;
ds@1952
   130
}
ds@1952
   131
ds@1952
   132
static cell_t GetGameDescription(IPluginContext *pContext, const cell_t *params)
ds@1952
   133
{
ds@1952
   134
	const char *description;
ds@1952
   135
ds@1952
   136
	if (params[3])
ds@1952
   137
	{
ds@1952
   138
		description = gamedll->GetGameDescription();
ds@1952
   139
	} else {
ds@1952
   140
		description = SERVER_CALL(GetGameDescription)();
ds@1952
   141
	}
ds@1952
   142
ds@1952
   143
	size_t numBytes;
ds@1952
   144
	
ds@1952
   145
	pContext->StringToLocalUTF8(params[1], params[2], description, &numBytes);
ds@1952
   146
ds@1952
   147
	return numBytes;
ds@1952
   148
}
ds@1952
   149
ds@1952
   150
static cell_t GetGameFolderName(IPluginContext *pContext, const cell_t *params)
ds@1952
   151
{
ds@1952
   152
	const char *name = g_SourceMod.GetGameFolderName();
ds@1952
   153
	size_t numBytes;
ds@1952
   154
ds@1952
   155
	pContext->StringToLocalUTF8(params[1], params[2], name, &numBytes);
ds@1952
   156
ds@1952
   157
	return numBytes;
ds@1952
   158
}
ds@1952
   159
ds@1952
   160
/* Useless comment to bump the build */
ds@1952
   161
static cell_t GetCurrentMap(IPluginContext *pContext, const cell_t *params)
ds@1952
   162
{
ds@1952
   163
	size_t bytes;
ds@1952
   164
	pContext->StringToLocalUTF8(params[1], params[2], STRING(gpGlobals->mapname), &bytes);
ds@1952
   165
	return bytes;
ds@1952
   166
}
ds@1952
   167
ds@1952
   168
static cell_t PrecacheModel(IPluginContext *pContext, const cell_t *params)
ds@1952
   169
{
ds@1952
   170
	char *model;
ds@1952
   171
	pContext->LocalToString(params[1], &model);
ds@1952
   172
ds@1952
   173
	return engine->PrecacheModel(model, params[2] ? true : false);
ds@1952
   174
}
ds@1952
   175
ds@1952
   176
static cell_t PrecacheSentenceFile(IPluginContext *pContext, const cell_t *params)
ds@1952
   177
{
ds@1952
   178
	char *sentencefile;
ds@1952
   179
	pContext->LocalToString(params[1], &sentencefile);
ds@1952
   180
ds@1952
   181
	return engine->PrecacheSentenceFile(sentencefile, params[2] ? true : false);
ds@1952
   182
}
ds@1952
   183
ds@1952
   184
static cell_t PrecacheDecal(IPluginContext *pContext, const cell_t *params)
ds@1952
   185
{
ds@1952
   186
	char *decal;
ds@1952
   187
	pContext->LocalToString(params[1], &decal);
ds@1952
   188
ds@1952
   189
	return engine->PrecacheDecal(decal, params[2] ? true : false);
ds@1952
   190
}
ds@1952
   191
ds@1952
   192
static cell_t PrecacheGeneric(IPluginContext *pContext, const cell_t *params)
ds@1952
   193
{
ds@1952
   194
	char *generic;
ds@1952
   195
	pContext->LocalToString(params[1], &generic);
ds@1952
   196
ds@1952
   197
	return engine->PrecacheGeneric(generic, params[2] ? true : false);
ds@1952
   198
}
ds@1952
   199
ds@1952
   200
static cell_t IsModelPrecached(IPluginContext *pContext, const cell_t *params)
ds@1952
   201
{
ds@1952
   202
	char *model;
ds@1952
   203
	pContext->LocalToString(params[1], &model);
ds@1952
   204
ds@1952
   205
	return engine->IsModelPrecached(model) ? 1 : 0;
ds@1952
   206
}
ds@1952
   207
ds@1952
   208
static cell_t IsDecalPrecached(IPluginContext *pContext, const cell_t *params)
ds@1952
   209
{
ds@1952
   210
	char *decal;
ds@1952
   211
	pContext->LocalToString(params[1], &decal);
ds@1952
   212
ds@1952
   213
	return engine->IsDecalPrecached(decal) ? 1 : 0;
ds@1952
   214
}
ds@1952
   215
ds@1952
   216
static cell_t IsGenericPrecached(IPluginContext *pContext, const cell_t *params)
ds@1952
   217
{
ds@1952
   218
	char *generic;
ds@1952
   219
	pContext->LocalToString(params[1], &generic);
ds@1952
   220
ds@1952
   221
	return engine->IsGenericPrecached(generic) ? 1 : 0;
ds@1952
   222
}
ds@1952
   223
ds@1952
   224
static cell_t PrecacheSound(IPluginContext *pContext, const cell_t *params)
ds@1952
   225
{
ds@1952
   226
	char *sample;
ds@1952
   227
	pContext->LocalToString(params[1], &sample);
ds@1952
   228
ds@1952
   229
	return enginesound->PrecacheSound(sample, params[2] ? true : false) ? 1 : 0;
ds@1952
   230
}
ds@1952
   231
ds@1952
   232
static cell_t IsSoundPrecached(IPluginContext *pContext, const cell_t *params)
ds@1952
   233
{
ds@1952
   234
	char *sample;
ds@1952
   235
	pContext->LocalToString(params[1], &sample);
ds@1952
   236
ds@1952
   237
	return enginesound->IsSoundPrecached(sample) ? 1 : 0;
ds@1952
   238
}
ds@1952
   239
ds@1952
   240
static cell_t smn_CreateDialog(IPluginContext *pContext, const cell_t *params)
ds@1952
   241
{
ds@1952
   242
	KeyValues *pKV;
ds@1952
   243
	HandleError herr;
ds@1952
   244
	Handle_t hndl = static_cast<Handle_t>(params[2]);
ds@1952
   245
	CPlayer *pPlayer = g_Players.GetPlayerByIndex(params[1]);
ds@1952
   246
ds@1952
   247
	if (!pPlayer)
ds@1952
   248
	{
ds@1952
   249
		return pContext->ThrowNativeError("Client index %d is invalid", params[1]);
ds@1952
   250
	}
ds@1952
   251
ds@1952
   252
	if (!pPlayer->IsInGame())
ds@1952
   253
	{
ds@1952
   254
		return pContext->ThrowNativeError("Client %d is not in game", params[1]);
ds@1952
   255
	}
ds@1952
   256
ds@1952
   257
	pKV = g_SourceMod.ReadKeyValuesHandle(hndl, &herr, true);
ds@1952
   258
	if (herr != HandleError_None)
ds@1952
   259
	{
ds@1952
   260
		return pContext->ThrowNativeError("Invalid key value handle %x (error %d)", hndl, herr);
ds@1952
   261
	}
ds@1952
   262
ds@1952
   263
	serverpluginhelpers->CreateMessage(pPlayer->GetEdict(), 
ds@1952
   264
		static_cast<DIALOG_TYPE>(params[3]), 
ds@1952
   265
		pKV, 
ds@1952
   266
		vsp_interface);
ds@1952
   267
ds@1952
   268
	return 1;
ds@1952
   269
}
ds@1952
   270
ds@1952
   271
static cell_t PrintToChat(IPluginContext *pContext, const cell_t *params)
ds@1952
   272
{
ds@1952
   273
	int client = params[1];
ds@1952
   274
	CPlayer *pPlayer = g_Players.GetPlayerByIndex(client);
ds@1952
   275
ds@1952
   276
	if (!pPlayer)
ds@1952
   277
	{
ds@1952
   278
		return pContext->ThrowNativeError("Client index %d is invalid", client);
ds@1952
   279
	}
ds@1952
   280
ds@1952
   281
	if (!pPlayer->IsInGame())
ds@1952
   282
	{
ds@1952
   283
		return pContext->ThrowNativeError("Client %d is not in game", client);
ds@1952
   284
	}
ds@1952
   285
ds@1952
   286
	g_SourceMod.SetGlobalTarget(client);
ds@1952
   287
ds@1952
   288
	char buffer[192];
ds@1952
   289
	g_SourceMod.FormatString(buffer, sizeof(buffer), pContext, params, 2);
ds@1952
   290
ds@1952
   291
	/* Check for an error before printing to the client */
ds@1952
   292
	if (pContext->GetContext()->n_err != SP_ERROR_NONE)
ds@1952
   293
	{
ds@1952
   294
		return 0;
ds@1952
   295
	}
ds@1952
   296
ds@1952
   297
	if (!g_HL2.TextMsg(client, HUD_PRINTTALK, buffer))
ds@1952
   298
	{
ds@1952
   299
		return pContext->ThrowNativeError("Could not send a usermessage");
ds@1952
   300
	}
ds@1952
   301
ds@1952
   302
	return 1;
ds@1952
   303
}
ds@1952
   304
ds@1952
   305
static cell_t PrintCenterText(IPluginContext *pContext, const cell_t *params)
ds@1952
   306
{
ds@1952
   307
	int client = params[1];
ds@1952
   308
	CPlayer *pPlayer = g_Players.GetPlayerByIndex(client);
ds@1952
   309
ds@1952
   310
	if (!pPlayer)
ds@1952
   311
	{
ds@1952
   312
		return pContext->ThrowNativeError("Client index %d is invalid", client);
ds@1952
   313
	}
ds@1952
   314
ds@1952
   315
	if (!pPlayer->IsInGame())
ds@1952
   316
	{
ds@1952
   317
		return pContext->ThrowNativeError("Client %d is not in game", client);
ds@1952
   318
	}
ds@1952
   319
ds@1952
   320
	g_SourceMod.SetGlobalTarget(client);
ds@1952
   321
ds@1952
   322
	char buffer[192];
ds@1952
   323
	g_SourceMod.FormatString(buffer, sizeof(buffer), pContext, params, 2);
ds@1952
   324
ds@1952
   325
	/* Check for an error before printing to the client */
ds@1952
   326
	if (pContext->GetContext()->n_err != SP_ERROR_NONE)
ds@1952
   327
	{
ds@1952
   328
		return 0;
ds@1952
   329
	}
ds@1952
   330
ds@1952
   331
	if (!g_HL2.TextMsg(client, HUD_PRINTCENTER, buffer))
ds@1952
   332
	{
ds@1952
   333
		return pContext->ThrowNativeError("Could not send a usermessage");
ds@1952
   334
	}
ds@1952
   335
ds@1952
   336
	return 1;
ds@1952
   337
}
ds@1952
   338
ds@1952
   339
static cell_t PrintHintText(IPluginContext *pContext, const cell_t *params)
ds@1952
   340
{
ds@1952
   341
	int client = params[1];
ds@1952
   342
	CPlayer *pPlayer = g_Players.GetPlayerByIndex(client);
ds@1952
   343
ds@1952
   344
	if (!pPlayer)
ds@1952
   345
	{
ds@1952
   346
		return pContext->ThrowNativeError("Client index %d is invalid", client);
ds@1952
   347
	}
ds@1952
   348
ds@1952
   349
	if (!pPlayer->IsInGame())
ds@1952
   350
	{
ds@1952
   351
		return pContext->ThrowNativeError("Client %d is not in game", client);
ds@1952
   352
	}
ds@1952
   353
ds@1952
   354
	g_SourceMod.SetGlobalTarget(client);
ds@1952
   355
ds@1952
   356
	char buffer[192];
ds@1952
   357
	g_SourceMod.FormatString(buffer, sizeof(buffer), pContext, params, 2);
ds@1952
   358
ds@1952
   359
	/* Check for an error before printing to the client */
ds@1952
   360
	if (pContext->GetContext()->n_err != SP_ERROR_NONE)
ds@1952
   361
	{
ds@1952
   362
		return 0;
ds@1952
   363
	}
ds@1952
   364
ds@1952
   365
	if (!g_HL2.HintTextMsg(client, buffer))
ds@1952
   366
	{
ds@1952
   367
		return pContext->ThrowNativeError("Could not send a usermessage");
ds@1952
   368
	}
ds@1952
   369
ds@1952
   370
	return 1;
ds@1952
   371
}
ds@1952
   372
ds@1952
   373
static cell_t ShowVGUIPanel(IPluginContext *pContext, const cell_t *params)
ds@1952
   374
{
ds@1952
   375
	HandleError herr;
ds@1952
   376
	char *name;
ds@1952
   377
	KeyValues *pKV = NULL;
ds@1952
   378
	int client = params[1];
ds@1952
   379
	Handle_t hndl = static_cast<Handle_t>(params[3]);
ds@1952
   380
	CPlayer *pPlayer = g_Players.GetPlayerByIndex(client);
ds@1952
   381
ds@1952
   382
	if (!pPlayer)
ds@1952
   383
	{
ds@1952
   384
		return pContext->ThrowNativeError("Client index %d is invalid", client);
ds@1952
   385
	}
ds@1952
   386
ds@1952
   387
	if (!pPlayer->IsInGame())
ds@1952
   388
	{
ds@1952
   389
		return pContext->ThrowNativeError("Client %d is not in game", client);
ds@1952
   390
	}
ds@1952
   391
ds@1952
   392
	if (hndl != BAD_HANDLE)
ds@1952
   393
	{
ds@1952
   394
		pKV = g_SourceMod.ReadKeyValuesHandle(hndl, &herr, true);
ds@1952
   395
		if (herr != HandleError_None)
ds@1952
   396
		{
ds@1952
   397
			return pContext->ThrowNativeError("Invalid key value handle %x (error %d)", hndl, herr);
ds@1952
   398
		}
ds@1952
   399
	}
ds@1952
   400
ds@1952
   401
	pContext->LocalToString(params[2], &name);
ds@1952
   402
ds@1952
   403
	if (!g_HL2.ShowVGUIMenu(client, name, pKV, (params[4]) ? true : false))
ds@1952
   404
	{
ds@1952
   405
		return pContext->ThrowNativeError("Could not send a usermessage");
ds@1952
   406
	}
ds@1952
   407
ds@1952
   408
	return 1;
ds@1952
   409
}
ds@1952
   410
ds@1952
   411
static cell_t smn_IsPlayerAlive(IPluginContext *pContext, const cell_t *params)
ds@1952
   412
{
ds@1952
   413
	CPlayer *player = g_Players.GetPlayerByIndex(params[1]);
ds@1952
   414
	if (player == NULL)
ds@1952
   415
	{
ds@1952
   416
		return pContext->ThrowNativeError("Invalid client index %d", params[1]);
ds@1952
   417
	}
ds@1952
   418
	else if (!player->IsInGame())
ds@1952
   419
	{
ds@1952
   420
		return pContext->ThrowNativeError("Client %d is not in game", params[1]);
ds@1952
   421
	}
ds@1952
   422
ds@1952
   423
	unsigned int state = player->GetLifeState();
ds@1952
   424
ds@1952
   425
	if (state == PLAYER_LIFE_UNKNOWN)
ds@1952
   426
	{
ds@1952
   427
		return pContext->ThrowNativeError("\"IsPlayerAlive\" not supported by this mod");
ds@1952
   428
	}
ds@1952
   429
	else if (state == PLAYER_LIFE_ALIVE)
ds@1952
   430
	{
ds@1952
   431
		return 1;
ds@1952
   432
	}
ds@1952
   433
	else
ds@1952
   434
	{
ds@1952
   435
		return 0;
ds@1952
   436
	}
ds@1952
   437
}
ds@1952
   438
ds@1952
   439
static cell_t GuessSDKVersion(IPluginContext *pContext, const cell_t *params)
ds@1952
   440
{
ds@1952
   441
#if defined METAMOD_PLAPI_VERSION
ds@1952
   442
	int version = g_SMAPI->GetSourceEngineBuild();
ds@1952
   443
ds@1952
   444
	if (version == SOURCE_ENGINE_ORIGINAL)
ds@1952
   445
	{
ds@1952
   446
		return 10;
ds@1952
   447
	}
ds@1952
   448
	else if (version == SOURCE_ENGINE_EPISODEONE)
ds@1952
   449
	{
ds@1952
   450
		return 20;
ds@1952
   451
	}
ds@1952
   452
	else if (version == SOURCE_ENGINE_ORANGEBOX)
ds@1952
   453
	{
ds@1952
   454
		return 30;
ds@1952
   455
	}
ds@1952
   456
#else
ds@1952
   457
	if (g_HL2.IsOriginalEngine())
ds@1952
   458
	{
ds@1952
   459
		return 10;
ds@1952
   460
	}
ds@1952
   461
	else
ds@1952
   462
	{
ds@1952
   463
		return 20;
ds@1952
   464
	}
ds@1952
   465
#endif
ds@1952
   466
ds@1952
   467
	return 0;
ds@1952
   468
}
ds@1952
   469
ds@1952
   470
REGISTER_NATIVES(halflifeNatives)
ds@1952
   471
{
ds@1952
   472
	{"CreateFakeClient",		CreateFakeClient},
ds@1952
   473
	{"GetCurrentMap",			GetCurrentMap},
ds@1952
   474
	{"GetEngineTime",			GetEngineTime},
ds@1952
   475
	{"GetGameDescription",		GetGameDescription},
ds@1952
   476
	{"GetGameFolderName",		GetGameFolderName},
ds@1952
   477
	{"GetGameTime",				GetGameTime},
ds@1952
   478
	{"GetRandomFloat",			GetRandomFloat},
ds@1952
   479
	{"GetRandomInt",			GetRandomInt},
ds@1952
   480
	{"IsDedicatedServer",		IsDedicatedServer},
ds@1952
   481
	{"IsMapValid",				IsMapValid},
ds@1952
   482
	{"SetFakeClientConVar",		SetFakeClientConVar},
ds@1952
   483
	{"SetRandomSeed",			SetRandomSeed},
ds@1952
   484
	{"PrecacheModel",			PrecacheModel},
ds@1952
   485
	{"PrecacheSentenceFile",	PrecacheSentenceFile},
ds@1952
   486
	{"PrecacheDecal",			PrecacheDecal},
ds@1952
   487
	{"PrecacheGeneric",			PrecacheGeneric},
ds@1952
   488
	{"IsModelPrecached",		IsModelPrecached},
ds@1952
   489
	{"IsDecalPrecached",		IsDecalPrecached},
ds@1952
   490
	{"IsGenericPrecached",		IsGenericPrecached},
ds@1952
   491
	{"PrecacheSound",			PrecacheSound},
ds@1952
   492
	{"IsSoundPrecached",		IsSoundPrecached},
ds@1952
   493
	{"CreateDialog",			smn_CreateDialog},
ds@1952
   494
	{"PrintToChat",				PrintToChat},
ds@1952
   495
	{"PrintCenterText",			PrintCenterText},
ds@1952
   496
	{"PrintHintText",			PrintHintText},
ds@1952
   497
	{"ShowVGUIPanel",			ShowVGUIPanel},
ds@1952
   498
	{"IsPlayerAlive",			smn_IsPlayerAlive},
ds@1952
   499
	{"GuessSDKVersion",			GuessSDKVersion},
ds@1952
   500
	{NULL,						NULL},
ds@1952
   501
};