View difference between Paste ID: rAP4qFwA and zgbjaQY1
SHOW: | | - or go back to the newest paste.
1-
1+
struct PassData //thanks to DeadMG for improvements.
2-
struct CallbackAMX
2+
{ 
3-
{
3+
    std::vector<cell> Paths;
4-
	bool PublicFound;
4+
	std::vector<cell> Polygon;
5-
	cell AMX_address;
5+
	int extraid;
6-
	cell * AMX_physical;
6+
	AMX * script;
7-
	int POINTER;
7+
	cell MoveCost;
8-
	CallbackAMX()
8+
	PassData()
9
	{
10-
		PublicFound = false;
10+
		extraid = 0;
11-
		AMX_address = NULL;
11+
		script = NULL;
12-
		AMX_physical = NULL;
12+
		MoveCost = 0;
13-
		POINTER = 0;
13+
		Paths.clear();
14
		Polygon.clear();
15-
};
15+
16-
16+
    template<typename Iterator,typename Piterator> PassData(Iterator begin, Iterator end, int extraid_, cell MoveCost_, AMX * script_, Piterator Pbegin, Piterator Pend)
17-
struct Callbacks
17+
        : Paths(begin, end),Polygon(Pbegin,Pend)
18-
{
18+
    { 
19-
	CallbackAMX ClosestNodeIDChange;
19+
        extraid = extraid_; 
20-
	CallbackAMX GPSRouteCalculated;
20+
		MoveCost = MoveCost_;
21-
};
21+
		script = script_;
22-
22+
    }
23-
std::map			<AMX*, Callbacks>			rcp_amxinfo;
23+
	~PassData()
24-
24+
25-
PLUGIN_EXPORT int PLUGIN_CALL AmxLoad( AMX *amx ) 
25+
		Paths.clear();
26-
{
26+
		Polygon.clear();
27-
	Callbacks temp;
27+
28-
	if (!amx_FindPublic(amx, "OnPlayerClosestNodeIDChange", &temp.ClosestNodeIDChange.POINTER))
28+
};