D4RkSiD3

[FS] Rainbow Heatlh & Armour Troll

Dec 20th, 2015
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 8.03 KB | None | 0 0
  1. /*
  2.                                         Spanish/Español:
  3.     •  •   •   •  •   •  •  •   •    •   •  •  •  • • •  •   •  •  •  • •  •  •  •  • •  •  • •  • •  • •  • •  •
  4.     • NO Publicar este FILTERSCRIPT en otros foros de SA-MP y hacerse pasar por el creador del código.          •
  5.     •                                                                                                           •
  6.     • -> Código Creado Por D4Rk$iD3 <-                                                                          •
  7.     •                                                                                                           •
  8.     • CREDITOS:                                                                                                 •
  9.     •     -> D4Rk$iD3: Desarrollo e idea del código.                                                            •
  10.     •     Puedes hacer Tu modificacion libremente siempre y cuándo estés respetando y manteniendo los créditos. •
  11.     •                                                                                                           •
  12.     •   Nota: Este Script hace que cada 1 segundo, tu vida y chaleco cambien aleatoriamente                   •
  13.     •         como el Mod/Hack Pulse Health, a veces, verás como si tu vida cambiara lento,                   •
  14.     •         pero los demás siempre verán que cambia muy rápido, por eso, al implementarlo en tu servidor,   •
  15.     •         puedes trollear a los players o usar este script como comando VIP,                              •
  16.     •         Esto no es algo que se vea en todos lados, la idea de crear este sistema,                       •
  17.     •         fue por esa misma razón, para aportar algo creativo e innovador.                                •                            
  18.     •  •   •   •  •   •  •  •   •    •   •  •  •  • • •  •   •  •  •  • •  •  •  •  • •  •  • •  • •  • •  • •  •
  19.  
  20.  
  21.                                          English/Inglés:
  22. IMPORTANT !!!
  23. READ CAREFULLY TO AVOID become a thief spaces ABSOLUTELY the Credit Theft or publication of This filterscript without my permission.
  24.  
  25. • NO Post this filterscript elsewhere SAMP and pose as the creator of the code. • • -> Code Created By d4rk$iD3 <-
  26. • CREDITS • -> d4rk$iD3: Development and idea of the code.
  27.  
  28. NOTE: This script makes every 1 second, your life vest switched randomly much as it does the Mod / Hack Press Health, sometimes you will see like your life will change slow, but others always see that changes very quickly, so, to implement it on your server, you can troll the players or using this script as a VIP command.
  29.  
  30. This is not something you see everywhere, the idea of creating this system was for the same reason, to make something creative and innovative.
  31.  
  32. • You can make your modified freely as long as you're respecting and keeping credit.
  33. */
  34. #include <a_samp>  //Bookstore
  35.  
  36. #pragma tabsize 0
  37.  
  38. /**==* Colors *==**/
  39. #define red                    0xFF0000AA
  40. #define green                  0x33FF33AA
  41. /**==* end line Colors *==**/
  42.  
  43. /**==* Declaration of variables *==**/
  44. new HealthRandom[MAX_PLAYERS];
  45. new PH[MAX_PLAYERS];
  46.  
  47. #if defined FILTERSCRIPT
  48.  
  49. public OnFilterScriptInit()
  50. {
  51.     print("\n--------------------------------------");
  52.     print(" Pulse Health And Armour by D4Rk$iD3");
  53.     print("--------------------------------------\n");
  54.     return 1;
  55. }
  56.  
  57. public OnFilterScriptExit()
  58. {
  59.     KillTimer(PH[playerid]);  //Al finalizar el Fs, se detiene el temporizador del pulse health & armour.
  60.     return 1;
  61. }
  62. #endif
  63.  
  64. public OnPlayerConnect(playerid)
  65. {
  66.     HealthRandom[playerid]=0; //Al entrar al servidor la variable está en 0, para que quede en 1, debe ingresar el comando de activación.
  67.     return 1;
  68. }
  69.  
  70. public OnPlayerDisconnect(playerid, reason)
  71. {
  72.     HealthRandom[playerid]=0; //Al salir del servidor, la variable queda en 0
  73.     return 1;
  74. }
  75.  
  76. public OnPlayerCommandText(playerid, cmdtext[])
  77. {
  78.  if(!strcmp(cmdtext, "/pulse", true))
  79.     {
  80.             if(HealthRandom[playerid] == 0)
  81.             {
  82.                 new RandomHealth = random(9);
  83.                 if(RandomHealth == 0)
  84.                 {
  85.                     SendClientMessage(playerid, green, "¡Info!: {FFFFFF}Has Activado el Modo Health & Armour Random.");
  86.                     HealthRandom[playerid] = 1;
  87.                     PH[playerid] = SetTimerEx("PulseHealth", 1, 1, "i", playerid);
  88.                     return 1;
  89.                 }
  90.                 else if(RandomHealth == 1)
  91.                 {
  92.                     SendClientMessage(playerid, green, "¡Info!: {FFFFFF}Has Activado el Modo Health & Armour Random.");
  93.                     HealthRandom[playerid] = 1;
  94.                     PH[playerid] = SetTimerEx("PulseHealth", 1, 1, "i", playerid);
  95.                     return 1;
  96.                 }
  97.                 else if(RandomHealth == 2)
  98.                 {
  99.                     SendClientMessage(playerid, red, "¡Info!: {FFFFFF}Has Activado el Modo Health & Armour Random.");
  100.                     HealthRandom[playerid] = 1;
  101.                     PH[playerid] = SetTimerEx("PulseHealth", 1, 1, "i", playerid);
  102.                     return 1;
  103.                 }
  104.                 else if(RandomHealth == 3)
  105.                 {
  106.                     SendClientMessage(playerid, green, "¡Info!: {FFFFFF}Has Activado el Modo Health & Armour Random.");
  107.                     HealthRandom[playerid] = 1;
  108.                     PH[playerid] = SetTimerEx("PulseHealth", 1, 1, "i", playerid);
  109.                     return 1;
  110.                 }
  111.                 else if(RandomHealth == 4)
  112.                 {
  113.                     SendClientMessage(playerid, green, "¡Info!: {FFFFFF}Has Activado el Modo Health & Armour Random.");
  114.                     HealthRandom[playerid] = 1;
  115.                     PH[playerid] = SetTimerEx("PulseHealth", 1, 1, "i", playerid);
  116.                     return 1;
  117.                 }
  118.                 else if(RandomHealth == 5)
  119.                 {
  120.                     SendClientMessage(playerid, green, "¡Info!: {FFFFFF}Has Activado el Modo Health & Armour Random.");
  121.                     HealthRandom[playerid] = 1;
  122.                     PH[playerid] = SetTimerEx("PulseHealth", 1, 1, "i", playerid);
  123.                     return 1;
  124.                 }
  125.                 else if(RandomHealth == 6)
  126.                 {
  127.                     SendClientMessage(playerid, green, "¡Info!: {FFFFFF}Has Activado el Modo Health & Armour Random.");
  128.                     HealthRandom[playerid] = 1;
  129.                     PH[playerid] = SetTimerEx("PulseHealth", 1, 1, "i", playerid);
  130.                     return 1;
  131.                 }
  132.                 else if(RandomHealth == 7)
  133.                 {
  134.                     SendClientMessage(playerid, green, "¡Info!: {FFFFFF}Has Activado el Modo Health & Armour Random.");
  135.                     HealthRandom[playerid] = 1;
  136.                     PH[playerid] = SetTimerEx("PulseHealth", 1, 1, "i", playerid);
  137.                     return 1;
  138.                 }
  139.                 else if(RandomHealth == 8)
  140.                 {
  141.                     SendClientMessage(playerid, green, "¡Info!: {FFFFFF}Has Activado el Modo Health & Armour Random.");
  142.                     HealthRandom[playerid] = 1;
  143.                     PH[playerid] = SetTimerEx("PulseHealth", 1, 1, "i", playerid);
  144.                     return 1;
  145.                 }
  146.             }
  147.             else if(HealthRandom[playerid] == 1)
  148.             {
  149.                 SendClientMessage(playerid, red, "¡Info!: {FFFFFF}Has Desactivado el Modo Health & Armour Random.");
  150.                 HealthRandom[playerid] = 0;
  151.                 KillTimer(PH[playerid]);
  152.         }
  153.         return 1;
  154.     }
  155.     return 0;
  156. }
  157.  
  158. forward PulseHealth(playerid); //función que se cumplirá al iniciar o terminar cada temporizador.
  159. public PulseHealth(playerid)
  160. {
  161.         if(HealthRandom[playerid] == 1)
  162.         {
  163.             new RandomHealth = random(9);
  164.             if(RandomHealth == 0)
  165.             {
  166.             SetPlayerHealth(playerid,100);
  167.             SetPlayerArmour(playerid, 1);
  168.             }
  169.             else if(RandomHealth == 1)
  170.             {
  171.             SetPlayerHealth(playerid,80);
  172.             SetPlayerArmour(playerid, 5);
  173.             }
  174.             else if(RandomHealth == 2)
  175.             {
  176.             SetPlayerHealth(playerid,60);
  177.             SetPlayerArmour(playerid, 10);
  178.             }
  179.             else if(RandomHealth == 3)
  180.             {
  181.             SetPlayerHealth(playerid,40);
  182.             SetPlayerArmour(playerid, 20);
  183.             }
  184.             else if(RandomHealth == 4)
  185.             {
  186.             SetPlayerHealth(playerid,20);
  187.             SetPlayerArmour(playerid, 40);
  188.             }
  189.             else if(RandomHealth == 5)
  190.             {
  191.             SetPlayerHealth(playerid,10);
  192.             SetPlayerArmour(playerid, 60);
  193.             }
  194.             else if(RandomHealth == 6)
  195.             {
  196.             SetPlayerHealth(playerid,5);
  197.             SetPlayerArmour(playerid, 80);
  198.             }
  199.             else if(RandomHealth == 7)
  200.             {
  201.             SetPlayerHealth(playerid,3);
  202.             SetPlayerArmour(playerid, 100);
  203.             }
  204.             else if(RandomHealth == 8)
  205.             {
  206.             SetPlayerHealth(playerid,1);
  207.             SetPlayerArmour(playerid, 50);
  208.             }
  209.     }
  210.     return 1;
  211. }
Add Comment
Please, Sign In to add comment