Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <cstdio>
- #include <cstring>
- #include <sampgdk/a_players.h>
- #include <sampgdk/a_samp.h>
- #include <sampgdk/core.h>
- #include <sampgdk/sdk.h>
- extern void *pAMXFunctions;
- void SAMPGDK_CALL PrintTickCountTimer(int timerid, void *params) {
- sampgdk::logprintf("Tick count: %d", GetTickCount());
- }
- SAMPGDK_CALLBACK(bool, OnGameModeInit())
- {
- SetGameModeText("Hello, World!");
- AddPlayerClass(0, 1958.3783f, 1343.1572f, 15.3746f, 269.1425f, 0, 0, 0, 0, 0, 0);
- SetTimer(1000, true, PrintTickCountTimer, 0);
- sampgdk::logprintf("sampgdk in ongamemodeinit!");
- return true;
- }
- PLUGIN_EXPORT unsigned int PLUGIN_CALL Supports()
- {
- return sampgdk::Supports() | SUPPORTS_VERSION | SUPPORTS_AMX_NATIVES | SUPPORTS_PROCESS_TICK;
- }
- PLUGIN_EXPORT bool PLUGIN_CALL Load(void **ppData)
- {
- pAMXFunctions = ppData[PLUGIN_DATA_AMX_EXPORTS];
- bool load = sampgdk::Load(ppData);
- sampgdk::logprintf("loading...........");
- return load;
- }
- PLUGIN_EXPORT void PLUGIN_CALL Unload()
- {
- sampgdk::Unload();
- }
- AMX_NATIVE_INFO natives[] =
- {
- // Settings
- { NULL, NULL }
- };
- PLUGIN_EXPORT int PLUGIN_CALL AmxLoad(AMX *amx)
- {
- return amx_Register(amx, natives, -1);
- }
- PLUGIN_EXPORT int PLUGIN_CALL AmxUnload(AMX *amx)
- {
- return AMX_ERR_NONE;
- }
- PLUGIN_EXPORT void PLUGIN_CALL ProcessTick()
- {
- sampgdk::ProcessTick();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement