Subdomain Posts
C++ | 441 days ago
None | 441 days ago
Recent Posts
None | 7 sec ago
Bash | 13 sec ago
None | 32 sec ago
None | 35 sec ago
None | 55 sec ago
None | 1 min ago
None | 1 min ago
None | 1 min ago
None | 2 min ago
None | 2 min ago
Sitereport
Find cool info about any domain on the internet?
visit sitereport
Free Subdomains
Want a pastebin.com sub-domain for your community?
learn more...
What is pastebin?
Pastebin is a website that hosts all your text & code on dedicated servers for easy sharing.
learn more...
Learn a little bit about the new Pastebin.com on our help page. hide message
By MaRcOsWeB on the 20th of Sep 2008 10:17:32 PM Download | Raw | Embed | Report
  1. #include <a_samp>
  2.  
  3.  
  4.  
  5. #define COLOR_ROJO 0xAA3333AA //colores mensajes
  6. #define COLOR_AMARILLO 0xFFFF00AA
  7.  
  8. forward getCheckpointType2(playerID);
  9. forward checkpointUpdate2();
  10. forward isPlayerInArea2(playerID, Float:data[4]);
  11. new playerCheckpoint2[MAX_PLAYERS];
  12.  
  13.  
  14.  
  15.  
  16. #define CP_DM       0
  17. #define CP_DMV      1
  18. #define CP_PBUS1    2
  19. #define CP_PBUS2    3
  20. #define CP_PBUS3    4
  21. #define CP_PBUS4    5
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28. #define MAX_POINTS2 6
  29.  
  30.  
  31. new Float:checkCoords2[MAX_POINTS2][4] = {
  32. {2086.2224,1874.6622,2286.2224,2074.6622},    //dm
  33. {146.2369,25.2268,346.2369,225.2268},      //volver del dm
  34. {1979.9790,1533.6473,2179.9790,1733.6473},   //paradabus avenida
  35. {1630.0044,1380.0146,1830.0044,1580.0146},   //paradabus aeropuerto
  36. {2059.3940,1893.6606,2259.3940,2093.6606},   //paradabus dm
  37. {1479.2019,1482.9419,1679.2019,1682.9419}     //paradabus
  38. };
  39.  
  40.  
  41.  
  42. new Float:checkpoints2[MAX_POINTS2][3] = {
  43. {2186.2224,1974.6622,10.8203},    //DM
  44. {246.2369,125.2268,1003.2188},    //Volver del dm
  45. {2079.9790,1633.6473,10.8203},    //paradabus avenida
  46. {1730.0044,1480.0146,10.8128},    //paradabus aeropuerto
  47. {2159.3940,1993.6606,10.8203},    //paradabus dm
  48. {1579.2019,1582.9419,10.8203}     //paradabus
  49. };
  50.  
  51.  
  52. new checkpointType2[MAX_POINTS2] = {
  53.     CP_DM,
  54.    CP_DMV,
  55.    CP_PBUS1,
  56.    CP_PBUS2,
  57.    CP_PBUS3,
  58.    CP_PBUS4
  59. };
  60.  
  61. public getCheckpointType2(playerID)
  62. {
  63.    return checkpointType2[playerCheckpoint2[playerID]];
  64.  
  65. }
  66.  
  67.  
  68. public isPlayerInArea2(playerID, Float:data[4])
  69. {
  70.    new Float:X, Float:Y, Float:Z;
  71.  
  72.    GetPlayerPos(playerID, X, Y, Z);
  73.    if(X >= data[0] && X <data>= data[1] && Y <= data[3]) {
  74.       return 1;
  75.    }
  76.    return 0;
  77. }
  78.  
  79. public checkpointUpdate2()
  80. {
  81.  for(new i=0; i<MAX_PLAYERS; i++)
  82.    {
  83.      if(IsPlayerConnected(i)) {
  84.            for(new j=0; j < MAX_POINTS2; j++) {
  85.              if(isPlayerInArea2(i, checkCoords2[j])) {
  86.                  if(playerCheckpoint2[i]!=j) {
  87.                        DisablePlayerCheckpoint(i);
  88.                   SetPlayerCheckpoint(i, checkpoints2[j][0],checkpoints2[j][1],checkpoints2[j][2], 2);
  89.                   playerCheckpoint2[i] = j;
  90.                }
  91.                } else {
  92.                   if(playerCheckpoint2[i]==j) {
  93.                       DisablePlayerCheckpoint(i);
  94.                       playerCheckpoint2[i] = 999;
  95.                    }
  96.                }
  97.            }
  98.       }
  99.    }
  100. }
  101.  
  102. public OnFilterScriptInit()
  103. {
  104.    print("\n--------------------------------------");
  105.    print(" Blank Filterscript by GuiLLe");
  106.    print("--------------------------------------\n");
  107.  SetTimer("checkpointUpdate", 1100, 1);
  108.    return 1;
  109. }
  110.  
  111. public OnFilterScriptExit()
  112. {
  113.    return 1;
  114. }
  115.  
  116.  
  117.  
  118. main()
  119. {
  120.  
  121. }
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128. public OnPlayerConnect(playerid)
  129. {
  130.     playerCheckpoint2[playerid] = 999;
  131. return 1;
  132. }
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.  
  140. public OnPlayerEnterCheckpoint(playerid)
  141. {
  142.  
  143.    switch (getCheckpointType2(playerid)) {
  144.  
  145.  
  146.  
  147.       case CP_DM: {
  148.          SendClientMessage(playerid, COLOR_AMARILLO, "Para entrar al DeathMatch utiliza /dm");
  149.  
  150.  
  151.  
  152.       }
  153.  
  154.  
  155.  
  156.  
  157.  
  158.       }
  159.  
  160.    return 1;
  161.  
  162.    }
Submit a correction or amendment below. Make A New Post
To highlight particular lines, prefix each line with @h@
Syntax highlighting:
Post expiration:
Post exposure:
Name / Title:
Email: