Skip to content

Commit

Permalink
Added support for 0.3z R4
Browse files Browse the repository at this point in the history
  • Loading branch information
kurta999 committed Aug 12, 2014
1 parent 72fe892 commit 102cd82
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 3 deletions.
11 changes: 9 additions & 2 deletions Addresses.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@
DWORD CAddress::FUNC_Logprintf_03Z = 0x00486CB0;
DWORD CAddress::FUNC_Logprintf_03ZR2_2 = 0x00487310;
DWORD CAddress::FUNC_Logprintf_03ZR3 = 0x00487460;
DWORD CAddress::FUNC_Logprintf_03ZR4 = 0x004875F0;
#else
DWORD CAddress::FUNC_Logprintf_03Z = 0x080A7440;
DWORD CAddress::FUNC_Logprintf_03ZR2_2 = 0x080A77D0;
DWORD CAddress::FUNC_Logprintf_03ZR3 = 0x080A78E0;
DWORD CAddress::FUNC_Logprintf_03ZR4 = 0x80A7A90;
#endif

// Pointers
Expand Down Expand Up @@ -65,7 +67,7 @@ void CAddress::Initialize(eSAMPVersion sampVersion)
//ADDR_RECEIVE_HOOKPOS = 0x458B80;
break;
}
case SAMP_VERSION_03Z_R2_2:
case SAMP_VERSION_03Z_R4:
{
//ADDR_RECEIVE_HOOKPOS = 0x458A20;
break;
Expand Down Expand Up @@ -118,7 +120,12 @@ void CAddress::Initialize(eSAMPVersion sampVersion)
FUNC_CConsole_SetIntVariable = 0x809EFB0;

ADDR_RECEIVE_HOOKPOS = 0x080AD1FF;
asd = 0x080AF1E7;
break;
}
case SAMP_VERSION_03Z_R4:
{
VAR_pRestartWaitTime = 0x81514E0; // 12.0
FUNC_CConsole_SetIntVariable = 0x809EFB0; // find for maxplayers
break;
}
}
Expand Down
2 changes: 2 additions & 0 deletions Addresses.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ enum eSAMPVersion
SAMP_VERSION_03Z,
SAMP_VERSION_03Z_R2_2,
SAMP_VERSION_03Z_R3,
SAMP_VERSION_03Z_R4,

SAMP_VERSION_SKIPPED,
};
Expand All @@ -53,6 +54,7 @@ class CAddress
static DWORD FUNC_Logprintf_03Z;
static DWORD FUNC_Logprintf_03ZR2_2;
static DWORD FUNC_Logprintf_03ZR3;
static DWORD FUNC_Logprintf_03ZR4;

// Pointers
static DWORD VAR_ppNetGame;
Expand Down
1 change: 0 additions & 1 deletion CServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ bool CServer::OnPlayerStreamIn(unsigned short playerid, unsigned short forplayer

bool CServer::OnPlayerStreamOut(unsigned short playerid, unsigned short forplayerid)
{
return 1;
//logprintf("leave stream zone playerid = %d, forplayerid = %d", playerid, forplayerid);
PlayerID playerId = pRakServer->GetPlayerIDFromIndex(playerid);
PlayerID forplayerId = pRakServer->GetPlayerIDFromIndex(forplayerid);
Expand Down
5 changes: 5 additions & 0 deletions main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,11 @@ PLUGIN_EXPORT bool PLUGIN_CALL Load(void ** ppData)
version = SAMP_VERSION_03Z_R3;
strcpy(szVersion, "0.3z R3");
}
else if(logprintf == (logprintf_t)CAddress::FUNC_Logprintf_03ZR4)
{
version = SAMP_VERSION_03Z_R4;
strcpy(szVersion, "0.3z R4");
}

// If not unknown, then initalize things
if(version != SAMP_VERSION_UNKNOWN)
Expand Down

0 comments on commit 102cd82

Please # to comment.