pastebin - collaborative debugging

pastebin is a collaborative debugging tool allowing you to share and modify code snippets while chatting on IRC, IM or a message board.

This site is developed to XHTML and CSS2 W3C standards. If you see this paragraph, your browser does not support those standards and you need to upgrade. Visit WaSP for a variety of options.

pastebin - collaborative debugging tool View Help


Posted by Bomb c4 on Sun 28 Jun 00:41
report abuse | View followups from Anonymous and C4 | download | new post

  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. }

Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.

Syntax highlighting:

To highlight particular lines, prefix each line with @@


Remember me so that I can delete my post