01.12.2009, 17:02
Well, I found out that Peter's Invoke snippet is not very efficient in speed, so I tried around with stuff like this
This already works so far, but note I've made a seperate function for it since it seems to crash when I use pIsPlayerConnected directly (not quite sure why, but have an idea)
Also, my disassembly knowlege isn't good enough to see why this doesn't work for all functions (such as these that need more arguments), I was already guessing the parameter
could be an AMX cell* but this also failed.
So, if any of you is experienced enough to explain it, I will appreciate it
pawn Код:
typedef bool (*IsPlayerConnected_t)(int);
IsPlayerConnected_t pIsPlayerConnected = (IsPlayerConnected_t)0x4637E0;
bool IsPlayerConnected(int iPlayerID) { return pIsPlayerConnected(iPlayerID); }
Also, my disassembly knowlege isn't good enough to see why this doesn't work for all functions (such as these that need more arguments), I was already guessing the parameter
could be an AMX cell* but this also failed.
So, if any of you is experienced enough to explain it, I will appreciate it