Advertisement
Guest User

Untitled

a guest
Oct 2nd, 2011
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 3.20 KB | None | 0 0
  1. #include <a_samp>
  2.  
  3. #include "../include/gl_common.inc"
  4.  
  5. #include <core>
  6.  
  7. #include <float>
  8.  
  9. //Les couleurs du serveur utiliser
  10.  
  11. #define ROUGE 0xAFAFAFAA
  12.  
  13. #define GRIS 0x8F8F8FFF
  14.  
  15. #define VERT 0x33AA33AA
  16.  
  17. #define JAUNE 0xFFFF00AA
  18.  
  19. #define ROSE 0xFF66FFAA
  20.  
  21. #define BLEU 0x0000BBAA
  22.  
  23. #define COLOR_LIGHTBLUE 0x33CCFFAA
  24.  
  25. #define COLOR_DARKRED 0x660000AA
  26.  
  27. #define COLOR_ORANGE 0xFF9900AA
  28.  
  29. // ON DEFINI LES VARIABLES DES ARMES..
  30. new arme1, munition1;
  31. /* emplacement1,
  32. arme2, munition2, emplacement2,
  33. arme3, munition3, emplacement3,
  34. arme4, munition4, emplacement4; */
  35.  
  36. new Stuntmania;
  37.  
  38. main()
  39.  
  40. {
  41.  
  42.     print("\n----------------------------------");
  43.  
  44.     print("  By Enzo (2011)\n");
  45.  
  46.     print("----------------------------------\n");
  47.  
  48. }
  49.  
  50. //-----------------------------------Message de debut , debut de jeux---------------------------------------
  51.  
  52. public OnPlayerConnect(playerid)
  53. {
  54.     SendClientMessage(playerid,ROUGE,"Bienvenue sur le serveur.");
  55.     GivePlayerMoney(playerid, 225000);
  56.     return 1;
  57. }
  58.  
  59. //-------------------------------------Basse du joueur---------------------------------------
  60.  
  61. public OnGameModeInit()
  62. {
  63.     return 1;
  64. }
  65.  
  66. //-------------------------------------Spawn du joueur---------------------------------------
  67.  
  68. public OnPlayerSpawn(playerid)
  69. {
  70.     GangZoneShowForPlayer(playerid, Stuntmania, 0xFF80FF96);
  71.     SetPlayerHealth(playerid, GetPlayerScore(playerid) + 100);
  72.     SetPlayerPos(playerid,2503.39990234,-1672.80004883,13.00000000);
  73.     return 1;
  74. }
  75.  
  76. public OnPlayerDeath(playerid, killerid, reason)
  77. {
  78.     return 1;
  79. }
  80.  
  81. public OnPlayerCommandText(playerid, cmdtext[])
  82. {
  83. /*
  84. AddPlayerClass(0,2470.0728,-1658.8296,13.3385,89.9275,0,0,0,0,0,0); // CHECK 1.
  85. AddPlayerClass(0,2352.2813,-1658.7698,13.3791,89.6142,0,0,0,0,0,0); // CHECK 2.
  86. AddPlayerClass(0,2344.8572,-1605.7319,21.9796,3.1334,0,0,0,0,0,0); // CHECK 3.
  87. AddPlayerClass(0,2301.2695,-1564.3423,15.1716,71.7540,0,0,0,0,0,0); // CHECK 4.
  88. */
  89.     if(strcmp("/debut", cmdtext, true) == 0)
  90.     {
  91.         if (IsPlayerConnected(playerid))
  92.         {
  93.             SetPlayerCheckpoint(playerid, 2470.0728,-1658.8296,13.3385, 4);
  94.             return 1;
  95.         }
  96.     }
  97.  
  98. public OnPlayerEnterCheckpoint(playerid)
  99. {
  100.     /*
  101.     AddPlayerClass(0,2470.0728,-1658.8296,13.3385,89.9275,0,0,0,0,0,0); // CHECK 1.
  102.     AddPlayerClass(0,2352.2813,-1658.7698,13.3791,89.6142,0,0,0,0,0,0); // CHECK 2.
  103.     AddPlayerClass(0,2344.8572,-1605.7319,21.9796,3.1334,0,0,0,0,0,0); // CHECK 3.
  104.     AddPlayerClass(0,2301.2695,-1564.3423,15.1716,71.7540,0,0,0,0,0,0); // CHECK 4.
  105.     */
  106.  
  107.     new check[3], compteur;
  108.     check[0] = "2352.2813,-1658.7698,13.3791",
  109.     check[1] = "2344.8572,-1605.7319,21.9796",
  110.     check[2] = "2301.2695,-1564.3423,15.1716";
  111.  
  112.  
  113.     for (compteur = 0 ; compteur < 3 ; compteur++)
  114.     {
  115.         if (IsPlayerInRangeOfPoint(playerid, 5.0, check[compteur]))
  116.         {
  117.             SendClientMessage(playerid,0xFFFF00AA, "> CheckPoint atteint.");//nous lui envoyions un message pour l'avertir qu'il y est
  118.             DisablePlayerCheckpoint(playerid);//nous lui retirons le checkpoint
  119.             SetPlayerCheckpoint(playerid, check[compteur], 4); // On créer le news.
  120.         }
  121.     }
  122.     return 1;
  123. }
  124.  
  125. public OnPlayerDisconnect(playerid, reason)
  126. {
  127.     return 1;
  128. }
  129.  
  130. public OnPlayerRequestClass(playerid, classid)
  131. {
  132.     return 1;
  133. }
  134.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement