Advertisement
Guest User

Limits Samp (c) by Kaliber

a guest
Jan 10th, 2013
206
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 5.44 KB | None | 0 0
  1. /* SA-MP Include Count
  2.  *
  3.  * (c) by Kaliber, 2013
  4.  *
  5.  */
  6. #include <a_samp>
  7. static counter[8];
  8. /******************************************************************************/
  9. native C_CreateObject(modelid,Float:X,Float:Y,Float:Z,Float:r1,Float:r2,Float:r3,Float:dis) = CreateObject;
  10. native C_CreatePickup(modelid,type,Float:X,Float:Y,Float:Z,World) = CreatePickup;
  11. native C_Create3DTextLabel(text[],color,Float:X,Float:Y,Float:Z,Float:DrawDistance,virtualworld,testLOS) = Create3DTextLabel;
  12. native C_CreateVehicle(modelid,Float:X,Float:Y,Float:Z,Float:A,c1,c2,respawn=-1) = CreateVehicle;
  13. native C_AddStaticVehicle(modelid,Float:X,Float:Y,Float:Z,Float:A,c1,c2) = AddStaticVehicle;
  14. native C_AddStaticVehicleEx(modelid,Float:X,Float:Y,Float:Z,Float:A,c1,c2,respawn=-1) = AddStaticVehicleEx;
  15. native C_SetPlayerMapIcon(playerid, iconid, Float:x, Float:y, Float:z, markertype, color, style) = SetPlayerMapIcon;
  16. native C_CreatePlayer3DTextLabel(playerid, text[], color, Float:X, Float:Y, Float:Z, Float:DrawDistance, attachedplayer, attachedvehicle, testLOS) = CreatePlayer3DTextLabel;
  17. native C_GangZoneCreate(Float:minx, Float:miny, Float:maxx, Float:maxy) = GangZoneCreate;
  18. native C_CreateMenu(title[], columns, Float:x, Float:y, Float:col1width, Float:col2width) = CreateMenu;
  19. forward C_OnGameModeInit();
  20. /******************************************************************************/
  21. #if defined _ALS_CreateObject
  22.     #undef CreateObject
  23. #else
  24.     #define _ALS_CreateObject
  25. #endif
  26. #define CreateObject _CreateObject
  27. stock _CreateObject(modelid,Float:X,Float:Y,Float:Z,Float:r1,Float:r2,Float:r3,Float:dis) {
  28.     counter[0]++;
  29.     return C_CreateObject(modelid,X,Y,Z,r1,r2,r3,dis);
  30. }
  31. #if defined _ALS_CreatePickup
  32.     #undef CreatePickup
  33. #else
  34.     #define _ALS_CreatePickup
  35. #endif
  36. #define CreatePickup _CreatePickup
  37. stock _CreatePickup(modelid,type,Float:X,Float:Y,Float:Z,World) {
  38.     counter[1]++;
  39.     return C_CreatePickup(modelid,type,X,Y,Z,World);
  40. }
  41. #if defined _ALS_Create3DTextLabel
  42.     #undef Create3DTextLabel
  43. #else
  44.     #define _ALS_Create3DTextLabel
  45. #endif
  46. #define Create3DTextLabel _Create3DTextLabel
  47. stock _Create3DTextLabel(text[],color,Float:X,Float:Y,Float:Z,Float:DrawDistance,virtualworld,testLOS) {
  48.     counter[2]++;
  49.     return C_Create3DTextLabel(text,color,X,Y,Z,DrawDistance,virtualworld,testLOS);
  50. }
  51. #if defined _ALS_CreateVehicle
  52.     #undef CreateVehicle
  53. #else
  54.     #define _ALS_CreateVehicle
  55. #endif
  56. #define CreateVehicle _CreateVehicle
  57. stock _CreateVehicle(modelid,Float:X,Float:Y,Float:Z,Float:A,c1,c2,respawn=-1) {
  58.     counter[3]++;
  59.     return C_CreateVehicle(modelid,X,Y,Z,A,c1,c2,respawn);
  60. }
  61. #if defined _ALS_AddStaticVehicle
  62.     #undef AddStaticVehicle
  63. #else
  64.     #define _ALS_AddStaticVehicle
  65. #endif
  66. #define AddStaticVehicle _AddStaticVehicle
  67. stock _AddStaticVehicle(modelid,Float:X,Float:Y,Float:Z,Float:A,c1,c2) {
  68.     counter[3]++;
  69.     return C_CreateVehicle(modelid,X,Y,Z,A,c1,c2);
  70. }
  71. #if defined _ALS_AddStaticVehicleEx
  72.     #undef AddStaticVehicleEx
  73. #else
  74.     #define _ALS_AddStaticVehicleEx
  75. #endif
  76. #define AddStaticVehicleEx _AddStaticVehicleEx
  77. stock _AddStaticVehicleEx(modelid,Float:X,Float:Y,Float:Z,Float:A,c1,c2,respawn=-1) {
  78.     counter[3]++;
  79.     return C_CreateVehicle(modelid,X,Y,Z,A,c1,c2,respawn);
  80. }
  81. #if defined _ALS_SetPlayerMapIcon
  82.     #undef SetPlayerMapIcon
  83. #else
  84.     #define _ALS_SetPlayerMapIcon
  85. #endif
  86. #define SetPlayerMapIcon _SetPlayerMapIcon
  87. stock _SetPlayerMapIcon(playerid, iconid, Float:x, Float:y, Float:z, markertype, color, style) {
  88.     counter[4]++;
  89.     return C_SetPlayerMapIcon(playerid,iconid,x,y,z,markertype,color,style);
  90. }
  91. #if defined _ALS_CreatePlayer3DTextLabel
  92.     #undef CreatePlayer3DTextLabel
  93. #else
  94.     #define _ALS_CreatePlayer3DTextLabel
  95. #endif
  96. #define CreatePlayer3DTextLabel _CreatePlayer3DTextLabel
  97. stock _CreatePlayer3DTextLabel(playerid, text[], color, Float:X, Float:Y, Float:Z, Float:DrawDistance, attachedplayer, attachedvehicle, testLOS) {
  98.     counter[5]++;
  99.     return C_CreatePlayer3DTextLabel(playerid, text, color, X, Y, Z, DrawDistance, attachedplayer, attachedvehicle, testLOS);
  100. }
  101. #if defined _ALS_GangZoneCreate
  102.     #undef GangZoneCreate
  103. #else
  104.     #define _ALS_GangZoneCreate
  105. #endif
  106. #define GangZoneCreate _GangZoneCreate
  107. stock _GangZoneCreate(Float:minx, Float:miny, Float:maxx, Float:maxy) {
  108.     counter[6]++;
  109.     return C_GangZoneCreate(minx, miny, maxx, maxy);
  110. }
  111. #if defined _ALS_CreateMenu
  112.     #undef CreateMenu
  113. #else
  114.     #define _ALS_CreateMenu
  115. #endif
  116. #define CreateMenu _CreateMenu
  117. stock _CreateMenu(title[], columns, Float:x, Float:y, Float:col1width, Float:col2width) {
  118.     counter[7]++;
  119.     return C_CreateMenu(title, columns, x, y, col1width, col2width);
  120. }
  121. public OnGameModeInit() {
  122.     SetTimer("C_Variablen_Ausgeben",1000*5,0);
  123.     return CallLocalFunction("C_OnGameModeInit", "");
  124. }
  125. #if defined _ALS_OnGameModeInit
  126.     #undef OnGameModeInit
  127. #else
  128.     #define _ALS_OnGameModeInit
  129. #endif
  130. #define OnGameModeInit C_OnGameModeInit
  131. forward C_Variablen_Ausgeben();
  132. public C_Variablen_Ausgeben() {
  133.     print("\n-----------------------------------------");
  134.     printf("| \tObjekte: \t%d | %d\t|",counter[0],MAX_OBJECTS);
  135.     printf("| \tPickups: \t%d | %d\t|",counter[1],MAX_PICKUPS);
  136.     printf("| \tGlobal 3D:\t%d | 1024\t|",counter[2]);
  137.     printf("| \tAutos: \t\t%d | %d\t|",counter[3],MAX_VEHICLES);
  138.     printf("| \tMapIcons:\t%d | 100\t\t|",counter[4]);
  139.     printf("| \tPlayer 3D:\t%d | 1024\t|",counter[5]);
  140.     printf("| \tGangZones:\t%d | 1024\t|",counter[6]);
  141.     printf("| \tMenus: \t\t%d | 128\t\t|",counter[7]);
  142.     print("-----------------------------------------");
  143.     return 1;
  144. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement