Guest User

[FS] Sistema de Gripe [www.samppawno.blogspot.com]

a guest
Aug 27th, 2012
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 3.00 KB | None | 0 0
  1. /*              /====================================\
  2.                 | VISITE: WWW.SAMPPAWNO.BLOGSPOT.COM |
  3.                 \====================================/
  4.                                 |   |
  5.                                 |   |
  6.                                 |   |
  7.                                 |   |
  8.                                 |   |
  9.                                 |   |
  10.                                 |   |
  11.                                 |___|
  12.  
  13.                                                                         */
  14. #define FILTERSCRIPT
  15.  
  16. #include <a_samp>
  17.  
  18. new gripe[MAX_PLAYERS];
  19. new remedios[MAX_PLAYERS];
  20. forward gripe2(playerid);
  21. forward gripe3(playerid);
  22. forward gripe4(playerid);
  23. forward gripe5(playerid);
  24. forward gripe6(playerid);
  25.  
  26. #if defined FILTERSCRIPT
  27.  
  28. public OnFilterScriptInit()
  29. {
  30.     print("\n--------------------------------------");
  31.     print(" [FS] Sistema de Gripe. By Sergio       ");
  32.     print("  WWW.SAMPPAWNO.BLOGSPOT.COM            ");
  33.     print("--------------------------------------\n");
  34.     SetTimer("gripe2",10000,false);
  35.     return 1;
  36. }
  37.  
  38. public OnFilterScriptExit()
  39. {
  40.     return 1;
  41. }
  42.  
  43. #else
  44.  
  45.  
  46. #endif
  47.  
  48. public gripe2(playerid)
  49. {
  50.     gripe[playerid] = 1;
  51.     SetTimer("gripe3",1000,false);
  52.     SendClientMessage(playerid, 0xAA3333AA, "Você esta gripado, va ate um medico para nao morrer");
  53.     return 1;
  54. }
  55. public gripe3(playerid)
  56. {
  57.     SetPlayerHealth(playerid, -10);
  58.     SetTimer("gripe4",1000,false);
  59.     return 1;
  60. }
  61. public gripe4(playerid)
  62. {
  63.     SetPlayerHealth(playerid, -20);
  64.     SetTimer("gripe5",1000,false);
  65.     return 1;
  66. }
  67. public gripe5(playerid)
  68. {
  69.     SetPlayerHealth(playerid, -50);
  70.     SetTimer("gripe6",1000,false);
  71.     SendClientMessage(playerid, 0xAA3333AA, "Sua gripe ja esta na fase 5, corra para um medico antes que você morra. Voce perdu 50hp");
  72.     return 1;
  73. }
  74. public gripe6(playerid)
  75. {
  76.     SetPlayerHealth(playerid, -100);
  77.     SendClientMessage(playerid, 0xAA3333AA, "Sua gripe Evoluiu o levando a morte por gripe. Seu Pão duro!!!!");
  78.     return 1;
  79. }
  80. public OnPlayerCommandText(playerid, cmdtext[])
  81. {
  82.     if (strcmp("/remedios", cmdtext, true, 10) == 0)
  83.     {
  84.         if(IsPlayerInRangeOfPoint(playerid, 3.0, -27.1348,-54.9893,1003.5469) || IsPlayerInRangeOfPoint(playerid, 3.0, 1173.2234,-1322.9675,15.3947))
  85.         {
  86.             SendClientMessage(playerid,0xAA3333AA,"Você comprou seus remedios, digite /usarremedios para usarlos");
  87.             remedios[playerid] = 1;
  88.         }
  89.         else
  90.         {
  91.             SendClientMessage(playerid,0xAA3333AA,"Você não esta na 24/7 ou no hospital");
  92.         }//SetPlayerCheckpoint(playerid, X, Y, Z, 5);
  93.         return 1;
  94.     }
  95.     if (strcmp("/hospital", cmdtext, true, 10) == 0)
  96.     {
  97.         SendClientMessage(playerid,0xAA3333AA,"Siga a marca vermelha para chegar ao hospital!");
  98.         SetPlayerCheckpoint(playerid, 1173.2234,-1322.9675,15.3947, 5);
  99.         return 1;
  100.     }
  101.     if (strcmp("/usarremedios", cmdtext, true, 10) == 0)
  102.     {
  103.         if (remedios[playerid] == 1)
  104.         {
  105.            gripe[playerid] = 0;
  106.            SetPlayerHealth(playerid, 0);
  107.         }
  108.         else
  109.         {
  110.            SendClientMessage(playerid,0xAA3333AA,"Você não tem remedios, va a um hospital e compre");
  111.         }
  112.         return 1;
  113.     }
  114.     return 0;
  115. }
Add Comment
Please, Sign In to add comment