diff --git a/dlls/dod/dodfun/NPD.cpp b/dlls/dod/dodfun/NPD.cpp index 3a54468c..01dff499 100755 --- a/dlls/dod/dodfun/NPD.cpp +++ b/dlls/dod/dodfun/NPD.cpp @@ -154,6 +154,7 @@ static cell AMX_NATIVE_CALL set_user_score(AMX *amx, cell *params){ *( (int*)pPlayer->pEdict->pvPrivateData + STEAM_PDOFFSET_SCORE ) = params[2]; if ( params[3]){ + /* //ScoreShort message MESSAGE_BEGIN(MSG_ALL,gmsgScoreShort); WRITE_BYTE(pPlayer->index); @@ -162,6 +163,11 @@ static cell AMX_NATIVE_CALL set_user_score(AMX *amx, cell *params){ WRITE_SHORT( *( (int*)pPlayer->pEdict->pvPrivateData + STEAM_PDOFFSET_DEATHS ) ); WRITE_BYTE(1); MESSAGE_END(); + */ + MESSAGE_BEGIN(MSG_ALL, gmsgObjScore); + WRITE_BYTE(pPlayer->index); + WRITE_SHORT(params[2]); + MESSAGE_END(); } } @@ -177,7 +183,9 @@ static cell AMX_NATIVE_CALL set_user_frags(AMX *amx, cell *params){ pPlayer->pEdict->v.frags = (float)params[2]; if ( params[3]){ + /* //ScoreShort message + MESSAGE_BEGIN(MSG_ALL,gmsgScoreShort); WRITE_BYTE(pPlayer->index); WRITE_SHORT( *( (int*)pPlayer->pEdict->pvPrivateData + STEAM_PDOFFSET_SCORE ) ); @@ -185,6 +193,11 @@ static cell AMX_NATIVE_CALL set_user_frags(AMX *amx, cell *params){ WRITE_SHORT( *( (int*)pPlayer->pEdict->pvPrivateData + STEAM_PDOFFSET_DEATHS ) ); WRITE_BYTE(1); MESSAGE_END(); + */ + MESSAGE_BEGIN(MSG_ALL, gmsgFrags); + WRITE_BYTE(pPlayer->index); + WRITE_SHORT((int)pPlayer->pEdict->v.frags); + MESSAGE_END(); } } return 1; diff --git a/dlls/dod/dodfun/dodfun.h b/dlls/dod/dodfun/dodfun.h index 69d6f3a4..3cfbd31f 100755 --- a/dlls/dod/dodfun/dodfun.h +++ b/dlls/dod/dodfun/dodfun.h @@ -55,6 +55,8 @@ extern int gmsgScoreShort; extern int gmsgPTeam; extern int gmsgInitObj; extern int gmsgSetObj; +extern int gmsgFrags; +extern int gmsgObjScore; extern int iFGrenade; extern int iFRocket; diff --git a/dlls/dod/dodfun/moduleconfig.cpp b/dlls/dod/dodfun/moduleconfig.cpp index f310a03a..3b9c5bf6 100755 --- a/dlls/dod/dodfun/moduleconfig.cpp +++ b/dlls/dod/dodfun/moduleconfig.cpp @@ -56,6 +56,8 @@ int gmsgScoreShort; int gmsgPTeam; int gmsgInitObj; int gmsgSetObj; +int gmsgFrags; +int gmsgObjScore; struct sUserMsg { const char* name; @@ -68,6 +70,8 @@ struct sUserMsg { { "ScoreShort",&gmsgScoreShort,NULL,false }, { "PTeam",&gmsgPTeam,NULL,false }, { "SetObj",&gmsgSetObj,Client_SetObj,false }, + { "Frags",&gmsgFrags,NULL,false }, + { "ObjScore", &gmsgObjScore, NULL, false }, { 0,0,0,false } }; diff --git a/plugins/include/dodfun.inc b/plugins/include/dodfun.inc index defe0b39..ea8f63da 100755 --- a/plugins/include/dodfun.inc +++ b/plugins/include/dodfun.inc @@ -49,7 +49,10 @@ native dod_is_randomclass(index); /* Returns player deaths */ native dod_get_pl_deaths(index); -/* Sets player deaths. */ +/* Sets player deaths. + * Note if you opt to refresh the scoreboard, it + * will make the player appear as "DEAD" in the scoreboard. + */ native dod_set_pl_deaths(index,value,refresh=1); /* Returns player deaths. */