Advertisement
Dimitri_UA

[SA|C++]Plugin SDK. Короны!

Oct 16th, 2013
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.23 KB | None | 0 0
  1. #include <Windows.h>
  2. #include "plugin\plugin.h"
  3. #include "game_sa\CCoronas.h"
  4. #include "game_sa\common.h"
  5. #include "game_sa\CMessages.h"
  6.  
  7. void DrawCoronas();
  8.  
  9. using namespace plugin;
  10.  
  11. BOOL APIENTRY DllMain(HMODULE module, DWORD reason, LPVOID reserved)
  12. {
  13.     if(reason == DLL_PROCESS_ATTACH)
  14.     {
  15.         System::RegisterPlugin("Drawing Coronas", "DK", "coronasTest.asi", "1.0", 1, GAME_SA_1_0_US, NULL);
  16.         Core::RegisterFunc(FUNC_GAME_PROCESS, DrawCoronas);
  17.     }
  18.     return TRUE;
  19. }
  20.  
  21. void DrawCoronas()
  22. {
  23.     CPed *playa = FindPlayerPed(-1);
  24.     if(playa)
  25.     {
  26.         CCoronas::RegisterCorona(5001, playa, 255, 0, 0, 255, CVector(-1.0, -1.0, 0.0), 0.3, 100.0, CORONATYPE_SHINYSTAR, 0, 0, 0, 0, 0, 0, 0.5, 0, 15.0, 0, 0);
  27.         CCoronas::RegisterCorona(5002, playa, 255, 0, 0, 255, CVector(-1.0, 1.0, 0.0), 0.3, 100.0, CORONATYPE_SHINYSTAR, 0, 0, 0, 0, 0, 0, 0.5, 0, 15.0, 0, 0);
  28.         CCoronas::RegisterCorona(5003, playa, 255, 0, 0, 255, CVector(1.0, 1.0, 0.0), 0.3, 100.0, CORONATYPE_SHINYSTAR, 0, 0, 0, 0, 0, 0, 0.5, 0, 15.0, 0, 0);
  29.         CCoronas::RegisterCorona(5004, playa, 255, 0, 0, 255, CVector(1.0, -1.0, 0.0), 0.3, 100.0, CORONATYPE_SHINYSTAR, 0, 0, 0, 0, 0, 0, 0.5, 0, 15.0, 0, 0);
  30.         CMessages::AddMessageJumpQ("Coronas are drawed!", 100, 0, 0);
  31.     }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement