Advertisement
SAMProductions

[10/16/2013] - SA-MP (FilterScript): [SCBSys-v1.0] - Simple

Oct 16th, 2013
244
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 6.71 KB | None | 0 0
  1.                                                                                                                                                                     /*
  2.  
  3.      ______________________________________________________________________
  4.     |                  _       _                  ________                 |
  5.     |                (  \    (  \               (   _____ \                |
  6.     |                |  |    |  |      ______   |  |     \ \               |
  7.     |                |  |____|  |    (    ___\  |  |      \ \              |
  8.     |                |   ____   |     \  \  (_) |  |       ) )             |
  9.     |                |  |    |  |   _  \  \     |  |      / /              |
  10.     |                |  )    |  ) (  )__\  \    |  |_____/ /               |
  11.     |                |_/     |_/   \_______/    |_________/                |
  12.     |                                                                      |
  13.     |                       [HSD] High Speed Drivers                       |
  14.     |                                                                      |
  15.     |      [HSD] Company Clan of Programmers, Scripters, and Mappers       |
  16.     |______________________________________________________________________|
  17.                      http://forum.sa-mp.com/member.php?u=211939
  18.  
  19.                         Updated Date: 10/16/2013 (MM/DD/YYYY)
  20.  
  21.                        Visit Me on SA-MP Forum for More Updates
  22.  
  23.                                  Let the Credits !
  24.  
  25. • Super Fast System
  26. • [1] Command(s)
  27. • Fast Commands to Enable or Disable System
  28. • http://forum.sa-mp.com/member.php?u=211939 | Visit Me on SA-MP Forum |.
  29.  
  30. ~ Do: ~
  31.  
  32. - Must have Permission if you want to Share this on another Website.
  33. - etc.
  34.  
  35. ~ Do Not: ~
  36.  
  37. - Remove Credits.
  38. - Change Author Name / Information.
  39. - Stealing Filterscript.
  40. - No Permission but Sharing on another Website.
  41. - etc.
  42.  
  43. [ Information ] :-
  44.  
  45. Author: SAMProductions
  46. FilterScript Name: Simple Car Bomb System v1.0
  47. Updated Date: 10/16/2013 - (MM/DD/YYYY)
  48.  
  49. Thanks To:
  50.  
  51. SA-MP Team - a_samp
  52. You - For Supporting and Downloading
  53.  
  54. and to Whoever i forgot to Mention
  55.  
  56. -: [ End Information ]
  57.  
  58. • Do not Remove the Credits.
  59. • Do not Change the Author Name / Information.
  60. • Do not Steal the Filterscript.
  61.  
  62. • Disrespecting Any of These, You will Die.
  63. • Disrespecting Any of These, I'll Rape You.
  64. • Disrespecting Any of These, I'll Report You.
  65.  
  66. • Thanks For Using, Enjoy :)
  67.  
  68.  
  69.  
  70. //----------------------------------------------------------------------------//                                                                                                                                                                                                                                    */
  71.  
  72. #define FILTERSCRIPT
  73.  
  74. #include <a_samp>
  75.  
  76. new Bomb[MAX_VEHICLES];
  77. new BombExplodeegem[MAX_PLAYERS];
  78. new VehicleLo[MAX_PLAYERS];
  79. new BombExplodeja[MAX_VEHICLES];
  80.  
  81. #if defined FILTERSCRIPT
  82.  
  83. public OnFilterScriptInit()
  84. {
  85.     // AntiDeAMX: Start - "Unarmed (Fist) & Brass Knuckles"
  86.     AntiDeAMX();
  87.     // AntiDeAXM: End
  88.    
  89.     print("<|--------------------------[Loaded]--------------------------|>");
  90.     print(" | Simple CarBomb System (/makeabomb) Made By: SAMProductions |");
  91.     print("<|--------------------------[Loaded]--------------------------|>");
  92.     return 1;
  93. }
  94.  
  95. public OnFilterScriptExit()
  96. {
  97.     print("<|-------------------------[UnLoaded]-------------------------|>");
  98.     print(" | Simple CarBomb System (/makeabomb) Made By: SAMProductions |");
  99.     print("<|-------------------------[UnLoaded]-------------------------|>");
  100.     return 1;
  101. }
  102.  
  103. #else
  104. #endif
  105.  
  106. stock randomEx(minnum = cellmin, maxnum = cellmax) return random(maxnum - minnum + 1) + minnum;
  107.  
  108. public OnPlayerCommandText(playerid, cmdtext[])
  109. {
  110.     if (strcmp("/makeabomb", cmdtext, true, 10) == 0)
  111.     {
  112.         if(IsPlayerInAnyVehicle(playerid))
  113.         {
  114.             if(Bomb[GetPlayerVehicleID(playerid)] == 0)
  115.             {
  116.                 SendClientMessage(playerid, -1, "{FF0000}<!> {EEEEEE}Bomb has been Created !");
  117.                 BombExplodeegem[playerid] = 1;
  118.                 }
  119.                 else
  120.                 {
  121.             }
  122.             SendClientMessage(playerid, -1, "{FF0000}<!> {EEEEEE}This Car has a Bomb already !");
  123.         }
  124.         else
  125.         {
  126.         SendClientMessage(playerid, -1, "{FF0000}<!> {EEEEEE}You must be in a Vehicle !");
  127.         }
  128.         return 1;
  129.     }
  130.     return 0;
  131. }
  132.  
  133. public OnPlayerExitVehicle(playerid, vehicleid)
  134. {
  135.     if(BombExplodeegem[playerid] == 1)
  136.     {
  137.         VehicleLo[playerid] = GetPlayerVehicleID(playerid);
  138.         SetTimer("BombVeh", 5000, false);
  139.         BombExplodeegem[playerid] = 0;
  140.         SendClientMessage(playerid, -1, "{FF0000}<!> {EEEEEE}Bomb will be activated in 5 Seconds !");
  141.         new rexp = randomEx(1, 100);
  142.         BombExplodeja[vehicleid] = rexp;
  143.     }
  144.     if(Bomb[vehicleid] == 1)
  145.     {
  146.         if(BombExplodeja[vehicleid] != 16)
  147.         {
  148.             new Float:x, Float:y, Float:z;
  149.             GetVehiclePos(vehicleid, x, y, z);
  150.             CreateExplosion(x, y, z, 5, 10.0);
  151.             SetPlayerHealth(playerid, 0);
  152.             SetPlayerArmour(playerid, 0);
  153.             Bomb[vehicleid] = 0;
  154.         }
  155.     }
  156.     return 1;
  157. }
  158.  
  159. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  160. {
  161.     if(Bomb[vehicleid] == 1)
  162.     {
  163.         GameTextForPlayer(playerid, "{FF0000}<!> {EEEEEE}This Car has a Bomb already (Chat Introductions).", 2, 1);
  164.         SendClientMessage(playerid, -1, "{FF0000}<!> {EEEEEE}Do not press Space (Handbrake) or Do not exit the Vehicle !");
  165.     }
  166.     return 1;
  167. }
  168.  
  169. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  170. {
  171.     if(IsPlayerInAnyVehicle(playerid) && Bomb[GetPlayerVehicleID(playerid)] == 1)
  172.     {
  173.         if(newkeys & KEY_HANDBRAKE)
  174.         {
  175.             if(BombExplodeja[GetPlayerVehicleID(playerid)] != 16)
  176.             {
  177.                 new Float:x, Float:y, Float:z;
  178.                 GetVehiclePos(GetPlayerVehicleID(playerid), x, y, z);
  179.                 CreateExplosion(x, y, z, 5, 10.0);
  180.                 SetPlayerHealth(playerid, 0);
  181.                 SetPlayerArmour(playerid, 0);
  182.                 Bomb[GetPlayerVehicleID(playerid)] = 0;
  183.             }
  184.         }
  185.     }
  186.     return 1;
  187. }
  188.  
  189. forward BombVeh(playerid);
  190. public BombVeh(playerid)
  191. {
  192.     Bomb[VehicleLo[playerid]] = 1;
  193.     return 1;
  194. }
  195.  
  196. forward BombCount(playerid);
  197. public BombCount(playerid)
  198. {
  199.     new Float:x, Float:y, Float:z;
  200.     GetVehiclePos(GetPlayerVehicleID(playerid), x, y, z);
  201.     CreateExplosion(x, y, z, 5, 10.0);
  202.     SetPlayerHealth(playerid, 0);
  203.     SetPlayerArmour(playerid, 0);
  204.     Bomb[GetPlayerVehicleID(playerid)] = 0;
  205.     return 1;
  206. }
  207.  
  208. AntiDeAMX()
  209. {
  210.     new a[][] =
  211.     {
  212.         "Unarmed (Fist)",
  213.         "Brass Knuckles"
  214.     };
  215.     #pragma unused a
  216. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement