Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- struct CallbackAMX
- {
- bool PublicFound;
- cell AMX_address;
- cell * AMX_physical;
- int POINTER;
- CallbackAMX()
- {
- PublicFound = false;
- AMX_address = NULL;
- AMX_physical = NULL;
- POINTER = 0;
- }
- };
- struct Callbacks
- {
- CallbackAMX ClosestNodeIDChange;
- CallbackAMX GPSRouteCalculated;
- };
- std::map <AMX*, Callbacks> rcp_amxinfo;
- PLUGIN_EXPORT int PLUGIN_CALL AmxLoad( AMX *amx )
- {
- Callbacks temp;
- if (!amx_FindPublic(amx, "OnPlayerClosestNodeIDChange", &temp.ClosestNodeIDChange.POINTER))
- {
- temp.ClosestNodeIDChange.PublicFound = true;
- }
- if (!amx_FindPublic(amx, "GPS_WhenRouteIsCalculated", &temp.GPSRouteCalculated.POINTER))
- {
- temp.GPSRouteCalculated.PublicFound = true;
- }
- rcp_amxinfo.insert(std::pair<AMX*,Callbacks>(amx,temp));
- return amx_Register( amx, Natives::AMXNatives, -1 );
- }
Advertisement
Add Comment
Please, Sign In to add comment