Advertisement
J4Rr3x

Lanciagranate

Jun 8th, 2015
530
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.26 KB | None | 0 0
  1. // = ======================================= =
  2. // = Lanciagranate                           =
  3. // = ======================================= =
  4. // = Author: Cristian 'J4Rr3x' Cosenza       =
  5. // = Date: 08/06/2015                        =
  6. // = ======================================= =
  7.  
  8. //-----------------------------------------------------------------
  9. #include <a_samp>
  10.  
  11. //-----------------------------------------------------------------
  12. #define EXPLOSION_RADIUS    (3.0)
  13.  
  14. //-----------------------------------------------------------------
  15. #if defined FILTERSCRIPT
  16. public OnFilterScriptInit()
  17. {
  18.     print("=========================================");
  19.     print(" = Lanciagrnate                        =");
  20.     print("=========================================");
  21.     return 1;
  22. }
  23. public OnFilterScriptExit() { return 1; }
  24. #else
  25. main() { }
  26. #endif
  27.  
  28. public OnPlayerConnect(playerid)
  29. {
  30.     SetPVarInt(playerid, "g_HasGrenadeLauncher", 0);
  31.     return 1;
  32. }
  33.  
  34. public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
  35. {
  36.     if(!GetPlayerAmmo(playerid) && GetPlayerWeapon(playerid) == WEAPON_SHOTGSPA)
  37.         SetPVarInt(playerid, "g_HasGrenadeLauncher", 0);
  38.  
  39.     if(GetPlayerWeapon(playerid) == WEAPON_SHOTGSPA && GetPVarInt(playerid, "g_HasGrenadeLauncher"))
  40.         CreateExplosion(fX, fY, fZ, 1, 5.0);
  41.     return 1;
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement