From 00af8f5a2094b5db4ade853e963e8b80537434fb Mon Sep 17 00:00:00 2001 From: kurta999 Date: Tue, 17 Jun 2014 13:14:29 +0200 Subject: [PATCH] Another small fixes.. --- Addresses.cpp | 8 +++++--- Hooks.cpp | 3 ++- Hooks.h | 2 ++ Scripting.cpp | 8 ++++---- main.h | 3 --- 5 files changed, 13 insertions(+), 11 deletions(-) diff --git a/Addresses.cpp b/Addresses.cpp index 8530a02..4fdb6ce 100644 --- a/Addresses.cpp +++ b/Addresses.cpp @@ -42,8 +42,8 @@ void CAddress::Initialize(eSAMPVersion sampVersion) switch(sampVersion) { - case SAMP_VERSION_03Z: - + case SAMP_VERSION_03Z: + { VAR_pRestartWaitTime = 0x8150130; FUNC_CConsole_AddStringVariable = 0x0809F590; @@ -52,8 +52,9 @@ void CAddress::Initialize(eSAMPVersion sampVersion) FUNC_CFilterscripts_LoadFilterscript = 0x0809FDB0; FUNC_CFilterscripts_UnLoadFilterscript = 0x080A01E0; + break; } - case SAMP_VERSION_03Z_R2_2: + case SAMP_VERSION_03Z_R2_2: { VAR_pRestartWaitTime = 0x8150B60; @@ -63,6 +64,7 @@ void CAddress::Initialize(eSAMPVersion sampVersion) FUNC_CFilterscripts_LoadFilterscript = 0x0809FF80; FUNC_CFilterscripts_UnLoadFilterscript = 0x080A03B0; + break; } } #endif diff --git a/Hooks.cpp b/Hooks.cpp index 10337be..f168cf0 100644 --- a/Hooks.cpp +++ b/Hooks.cpp @@ -70,6 +70,7 @@ bool Unlock(void *address, int len) #endif } +#ifdef WIN32 DWORD FindPattern(char *pattern, char *mask) { #ifdef WIN32 @@ -101,7 +102,7 @@ DWORD FindPattern(char *pattern, char *mask) return NULL; } - +#endif void GetAddresses() { DWORD temp; diff --git a/Hooks.h b/Hooks.h index e4a2023..893920f 100644 --- a/Hooks.h +++ b/Hooks.h @@ -9,7 +9,9 @@ #define POINTER_TO_MEMBER(m,n,o) temp = n, m = *(o *)&temp bool Unlock(void *address, int len); +#ifdef WIN32 DWORD FindPattern(char *pattern, char *mask); +#endif void GetAddresses(); void InstallPreHooks(); void InstallPostHooks(); diff --git a/Scripting.cpp b/Scripting.cpp index 7b83cb3..162a57a 100644 --- a/Scripting.cpp +++ b/Scripting.cpp @@ -1410,7 +1410,7 @@ static cell AMX_NATIVE_CALL n_IsObjectMaterialSlotUsed( AMX* amx, cell* params ) return pObject->Material[i].byteUsed; } -// native GetObjectMaterial(objectid, materialindex, &modelid, txdname[], txdnamelen = sizeof(txdname), texturename[], texturenamelen = sizeof(txdnamelen), &materialcolor); +// native GetObjectMaterial(objectid, materialindex, &modelid, txdname[], txdnamelen = sizeof(txdname), texturename[], texturenamelen = sizeof(texturename), &materialcolor); static cell AMX_NATIVE_CALL n_GetObjectMaterial( AMX* amx, cell* params ) { // If unknown server version @@ -1450,7 +1450,7 @@ static cell AMX_NATIVE_CALL n_GetObjectMaterial( AMX* amx, cell* params ) return 1; } -// native GetObjectMaterialText(objectid, materialindex, text[], textlen= sizeof(text), &materialsize, fontface[], fontfacelen = sizeof(fontface), &fontsize, &bold, &fontcolor, &backcolor, &textalignment); +// native GetObjectMaterialText(objectid, materialindex, text[], textlen = sizeof(text), &materialsize, fontface[], fontfacelen = sizeof(fontface), &fontsize, &bold, &fontcolor, &backcolor, &textalignment); static cell AMX_NATIVE_CALL n_GetObjectMaterialText( AMX* amx, cell* params ) { // If unknown server version @@ -1696,7 +1696,7 @@ static cell AMX_NATIVE_CALL n_IsPlayerObjectMaterialSlotUsed( AMX* amx, cell* pa } -// native GetPlayerObjectMaterial(playerid, objectid, materialindex, &modelid, txdname[], txdnamelen = sizeof(txdname), texturename[], texturenamelen = sizeof(txdnamelen), &materialcolor); +// native GetPlayerObjectMaterial(playerid, objectid, materialindex, &modelid, txdname[], txdnamelen = sizeof(txdname), texturename[], texturenamelen = sizeof(texturename), &materialcolor); static cell AMX_NATIVE_CALL n_GetPlayerObjectMaterial( AMX* amx, cell* params ) { // If unknown server version @@ -1737,7 +1737,7 @@ static cell AMX_NATIVE_CALL n_GetPlayerObjectMaterial( AMX* amx, cell* params ) return 1; } -// native GetPlayerObjectMaterialText(playerid, objectid, materialindex, text[], textlen= sizeof(text), &materialsize, fontface[], fontfacelen = sizeof(fontface), &fontsize, &bold, &fontcolor, &backcolor, &textalignment); +// native GetPlayerObjectMaterialText(playerid, objectid, materialindex, text[], textlen = sizeof(text), &materialsize, fontface[], fontfacelen = sizeof(fontface), &fontsize, &bold, &fontcolor, &backcolor, &textalignment); static cell AMX_NATIVE_CALL n_GetPlayerObjectMaterialText( AMX* amx, cell* params ) { // If unknown server version diff --git a/main.h b/main.h index 7b2a6d9..1e7ee9a 100644 --- a/main.h +++ b/main.h @@ -18,9 +18,6 @@ #include "Scripting.h" #include "CModelSizes.h" -#define MAX_HOUSES 300 -#define MAX_HOUSE_ELEMENTS 500 - typedef void (* logprintf_t)(char *, ...); extern logprintf_t logprintf;