Skip to content

Commit 009681f

Browse files
authored
bug fixes and log support
1 parent 3358270 commit 009681f

10 files changed

+2290
-1844
lines changed

src/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ add_samp_plugin(textdraw-streamer
2525
natives_data.cpp
2626
natives_global.cpp
2727
natives_player.cpp
28+
natives_plugin.cpp
2829
plugin.h
2930
plugin_version.hpp
3031
plugincommon.h

src/main.cpp

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,10 @@ PLUGIN_EXPORT bool PLUGIN_CALL Load(void **ppData)
5757
sampgdk::logprintf(" | |");
5858
sampgdk::logprintf(" | Discord: |");
5959
sampgdk::logprintf(" | |");
60-
sampgdk::logprintf(" | Nexor#4730 |");
60+
sampgdk::logprintf(" | benburakya - Nexor#4730 |");
6161
sampgdk::logprintf(" | |");
6262
sampgdk::logprintf(" =================================");
63-
sampgdk::logprintf("");
63+
sampgdk::logprintf("");
6464
}
6565
return load;
6666
}
@@ -92,7 +92,7 @@ PLUGIN_EXPORT void PLUGIN_CALL Unload()
9292
sampgdk::logprintf(" | |");
9393
sampgdk::logprintf(" | Discord: |");
9494
sampgdk::logprintf(" | |");
95-
sampgdk::logprintf(" | Nexor#4730 |");
95+
sampgdk::logprintf(" | benburakya - Nexor#4730 |");
9696
sampgdk::logprintf(" | |");
9797
sampgdk::logprintf(" =================================");
9898
sampgdk::logprintf("");
@@ -124,6 +124,7 @@ extern "C" const AMX_NATIVE_INFO NativeList[] =
124124
{"DynamicTextDrawSetPreviewModel", Natives::DynamicTextDrawSetPreviewModel},
125125
{"DynamicTextDrawSetPreviewRot", Natives::DynamicTextDrawSetPreviewRot},
126126
{"DynamicTextDrawSetPreviewVehCol", Natives::DynamicTextDrawSetPreviewVehicleColours},
127+
127128
{"IsValidDynamicTextDraw", Natives::IsValidDynamicTextDraw},
128129
{"IsDynTextDrawVisibleForPlayer", Natives::IsDynamicTextDrawVisibleForPlayer},
129130
{"DynamicTextDrawGetString", Natives::DynamicTextDrawGetString},
@@ -133,7 +134,7 @@ extern "C" const AMX_NATIVE_INFO NativeList[] =
133134
{"DynamicTextDrawGetPos", Natives::DynamicTextDrawGetPos},
134135
{"DynamicTextDrawGetColour", Natives::DynamicTextDrawGetColour},
135136
{"DynamicTextDrawGetBoxColour", Natives::DynamicTextDrawGetBoxColour},
136-
{"DynamicTextDrawGetBackgroundCol", Natives::DynamicTextDrawGetBackgroundColour},
137+
{"DynamicTextDrawGetBackgroundCo", Natives::DynamicTextDrawGetBackgroundColour},
137138
{"DynamicTextDrawGetShadow", Natives::DynamicTextDrawGetShadow},
138139
{"DynamicTextDrawGetOutline", Natives::DynamicTextDrawGetOutline},
139140
{"DynamicTextDrawGetFont", Natives::DynamicTextDrawGetFont},
@@ -143,7 +144,7 @@ extern "C" const AMX_NATIVE_INFO NativeList[] =
143144
{"DynamicTextDrawGetAlignment", Natives::DynamicTextDrawGetAlignment},
144145
{"DynamicTextDrawGetPreviewModel", Natives::DynamicTextDrawGetPreviewModel},
145146
{"DynamicTextDrawGetPreviewRot", Natives::DynamicTextDrawGetPreviewRot},
146-
{"DynamicTextDrawGetPreviewVehCol", Natives::DynamicTextDrawGetPreviewVehicleColours},
147+
{"DynamicTextDrawGetPreviewVehCo", Natives::DynamicTextDrawGetPreviewVehicleColours},
147148
{"DynamicTextDrawGetRealID", Natives::DynamicTextDrawGetRealID},
148149
{"DynamicTextDrawGetSize", Natives::DynamicTextDrawGetSize},
149150

@@ -168,6 +169,7 @@ extern "C" const AMX_NATIVE_INFO NativeList[] =
168169
{"DynamicPlayerTextDrawSetPrevMdl", Natives::DynamicPlayerTextDrawSetPreviewModel},
169170
{"DynamicPlayerTextDrawSetPrevRot", Natives::DynamicPlayerTextDrawSetPreviewRot},
170171
{"DynamicPlayerTextDrawPrevVehCol", Natives::DynamicPlayerTextDrawSetPreviewVehicleColours},
172+
171173
{"IsValidDynamicPlayerTextDraw", Natives::IsValidDynamicPlayerTextDraw},
172174
{"IsDynamicPlayerTextDrawVisible", Natives::IsDynamicPlayerTextDrawVisible},
173175
{"DynamicPlayerTextDrawGetString", Natives::DynamicPlayerTextDrawGetString},
@@ -205,6 +207,9 @@ extern "C" const AMX_NATIVE_INFO NativeList[] =
205207
{ "DynamicTextDraw_GetArrayData", Natives::DynamicTextDraw_GetArrayData},
206208
{ "DynamicTextDraw_ClearArrayData", Natives::DynamicTextDraw_ClearArrayData},
207209

210+
// Logger
211+
{ "TDLogger__", Natives::TDLogger },
212+
208213
// NULL
209214
{NULL, NULL}
210215
};

src/natives.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,4 +130,7 @@ namespace Natives
130130
cell AMX_NATIVE_CALL DynamicTextDraw_SetArrayData(AMX* amx, cell* params);
131131
cell AMX_NATIVE_CALL DynamicTextDraw_GetArrayData(AMX* amx, cell* params);
132132
cell AMX_NATIVE_CALL DynamicTextDraw_ClearArrayData(AMX* amx, cell* params);
133+
134+
// Logger
135+
cell AMX_NATIVE_CALL TDLogger(AMX* amx, cell* params);
133136
};

0 commit comments

Comments
 (0)