Share Pastebin
Guest
Public paste!

Bomb c4

By: a guest | Jun 27th, 2009 | Syntax: None | Size: 1.26 KB | Hits: 225 | Expires: Never
Copy text to clipboard
  1. #include <a_samp>
  2.  
  3. #define FILTERSCRIPT
  4. #if defined FILTERSCRIPT
  5.  
  6. forward C4(playerid);
  7. forward Anim(playerid);
  8. forward Pack(playerid);
  9. new Float:BX, Float:BY, Float:BZ;
  10. new Loaded[MAX_PLAYERS];
  11.  
  12. public OnFilterScriptInit()
  13. {
  14.         print("Bomba c4 by [AGD]MAIKEL");
  15.         return 1;
  16. }
  17.  
  18. public OnFilterScriptExit()
  19. {
  20.         return 1;
  21. }
  22.  
  23. #endif
  24.  
  25. public C4(playerid)
  26. {
  27.         CreateExplosion(BX,BY,BZ,7,2);
  28. }
  29.  
  30. public Anim(playerid)
  31. {
  32.         SendClientMessage(playerid, 0xFFFFFFFFF, "Acabas de Plantar la Bomba C4, Explotara en 5 segundos mas");
  33.         SetTimer("C4",5000,false);
  34. }
  35.  
  36. public Pack(playerid)
  37. {
  38.         CreateObject(1279, BX,BY,BZ,0,0,0);
  39.         SetTimer("Anim",3000,false);
  40. }
  41.  
  42. stock PreloadAnimLib(playerid, animlib[])
  43. {
  44. ApplyAnimation(playerid,animlib,"null",0.0,0,0,0,0,0);
  45. }
  46.  
  47. public OnPlayerCommandText(playerid, cmdtext[])
  48. {
  49.         if (strcmp("/plantarc4", cmdtext, true) == 0)
  50.         {
  51.             GetPlayerPos(playerid,BX,BY,BZ);
  52.             ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
  53.                 SetTimer("Pack",1000,false);
  54.                 return 1;
  55.         }
  56.         return 0;
  57. }
  58.  
  59. public OnPlayerSpawn(playerid)
  60. {
  61.         if(!Loaded[playerid])
  62.         {
  63.         PreloadAnimLib(playerid,"BOMBER");
  64.         Loaded[playerid] = 1;
  65.         }
  66.         return 1;
  67. }
  68.  
  69. public OnPlayerConnect(playerid)
  70. {
  71.     Loaded[playerid] = 0;
  72.         return 1;
  73. }