Advertisement
Shiny_

Untitled

Feb 8th, 2014
555
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.02 KB | None | 0 0
  1. Callbacks.cpp:
  2.  
  3. class OnClientCheckResponse {
  4.  public:
  5.   OnClientCheckResponse(int playerid, int actionid, int memaddr, int retndata): playerid(playerid), actionid(actionid), memaddr(memaddr), retndata(retndata) {}
  6.   bool operator()(Script *s) {
  7.     amx_Push(s->amx(), actionid);
  8.     amx_Push(s->amx(), memaddr);
  9.     amx_Push(s->amx(), retndata);
  10.     bool ret = s->Exec("OnClientCheckResponse", true);
  11.     return ret;
  12.   }
  13.   private:
  14.    int playerid;
  15.    int actionid;
  16.    int memaddr;
  17.    int retndata;
  18. };
  19.  
  20. PLUGIN_EXPORT bool PLUGIN_CALL OnClientCheckResponse(int playerid, int actionid, int memaddr, int retndata) {
  21.   using namespace ufs;
  22.   return UFS::Instance().ForEachScript(
  23.     ufs::OnClientCheckResponse(playerid, actionid, memaddr, retndata), true);
  24. }
  25.  
  26. a_samp.idl:
  27. [native] bool SendClientCheck([in] int playerid, [in] int actionid, [in] int memaddr, [in] int memOffset, [in] int bytesCount);
  28.  
  29. [callback, badret(false)] bool OnClientCheckResponse([in] int playerid, [in] int actionid, [in] int memaddr, [in] int retndata)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement