client_ forwards will now work with kill command

This commit is contained in:
Lukasz Wlasinksi 2004-10-25 11:05:59 +00:00
parent 3414cd7ce7
commit 3d1162ecd9
3 changed files with 14 additions and 2 deletions

View File

@ -110,6 +110,18 @@ const char* get_localinfo( const char* name , const char* def = 0 )
return b;
}
void ClientKill(edict_t *pEntity){
CPlayer *pPlayer = GET_PLAYER_POINTER(pEntity);
if ( !pPlayer->IsAlive())
RETURN_META(MRES_IGNORED);
MF_ExecuteForward( iFDamage,pPlayer->index , pPlayer->index , 0, 0, 0, 0 );
pPlayer->saveKill(pPlayer,0,0,0);
MF_ExecuteForward( iFDeath,pPlayer->index, pPlayer->index, 0, 0, 0 );
RETURN_META(MRES_IGNORED);
}
void ServerActivate_Post( edict_t *pEdictList, int edictCount, int clientMax ){
rankBots = (int)csstats_rankbots->value ? true:false;

View File

@ -70,7 +70,7 @@
// #define FN_ResetGlobalState ResetGlobalState /* pfnResetGlobalState() */
// #define FN_ClientConnect ClientConnect /* pfnClientConnect() (wd) Client has connected */
#define FN_ClientDisconnect ClientDisconnect /* pfnClientDisconnect() (wd) Player has left the game */
// #define FN_ClientKill ClientKill /* pfnClientKill() (wd) Player has typed "kill" */
#define FN_ClientKill ClientKill /* pfnClientKill() (wd) Player has typed "kill" */
// #define FN_ClientPutInServer ClientPutInServer /* pfnClientPutInServer() (wd) Client is entering the game */
// #define FN_ClientCommand ClientCommand /* pfnClientCommand() (wd) Player has sent a command (typed or from a bind) */
// #define FN_ClientUserInfoChanged ClientUserInfoChanged /* pfnClientUserInfoChanged() (wd) Client has updated their setinfo structure */

View File

@ -389,7 +389,7 @@ AMX_NATIVE_INFO stats_Natives[] = {
{ "xmod_get_stats_size", get_stats_size },
//***************************************
{ "get_weaponname", get_wpnname },
//{ "get_weaponname", get_wpnname },
///*******************
{ NULL, NULL }