Fix broken DoD Fun module natives (#851)

* Update hardcorded offsets

* Fixed using incorrect parameter for setting string
This commit is contained in:
diamond-optic 2020-05-28 18:54:36 -04:00 committed by GitHub
parent b60f58ac34
commit 307e71455a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 7 deletions

View File

@ -24,14 +24,14 @@
#define DODFUN_VERSION "1.0.2" #define DODFUN_VERSION "1.0.2"
// DoD Player // DoD Player
#define STEAM_PDOFFSET_WDEPLOY 229 + LINUXOFFSET // weapon deploy #define STEAM_PDOFFSET_WDEPLOY 230 + LINUXOFFSET // weapon deploy
#define STEAM_PDOFFSET_TEAMNAME 1396 + (LINUXOFFSET * sizeof(char)) // team name 349 char[16] #define STEAM_PDOFFSET_TEAMNAME 1400 + (LINUXOFFSET * sizeof(char)) // team name 349 char[16]
#define STEAM_PDOFFSET_CLASS 366 + LINUXOFFSET // player class #define STEAM_PDOFFSET_CLASS 367 + LINUXOFFSET // player class
#define STEAM_PDOFFSET_RCLASS 367 + LINUXOFFSET // random class #define STEAM_PDOFFSET_RCLASS 368 + LINUXOFFSET // random class
#define STEAM_PDOFFSET_SCORE 475 + LINUXOFFSET // score #define STEAM_PDOFFSET_SCORE 476 + LINUXOFFSET // score
#define STEAM_PDOFFSET_DEATHS 476 + LINUXOFFSET // deaths #define STEAM_PDOFFSET_DEATHS 477 + LINUXOFFSET // deaths
// DoD Control Point // DoD Control Point
struct pd_dcp { struct pd_dcp {

View File

@ -206,7 +206,7 @@ static cell AMX_NATIVE_CALL set_user_teamname(AMX *amx, cell *params){
if ( pPlayer->ingame ){ if ( pPlayer->ingame ){
int iLen; int iLen;
char *szTeamName = MF_GetAmxString(amx, params[1], 0, &iLen); char *szTeamName = MF_GetAmxString(amx, params[2], 0, &iLen);
pPlayer->setTeamName(szTeamName); pPlayer->setTeamName(szTeamName);