SHARE
TWEET

Untitled

a guest Jan 27th, 2009 262 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /* ===[INCLUDES]=== */
  2. #include <a_samp>
  3.  
  4. /* ===[DEFINES]=== */
  5. #define COLOR_GREEN 0x33AA33AA
  6. #define COLOR_RED 0xFF0000AA
  7.  
  8. /* ===[VARIABLES]=== */
  9. new pClip[MAX_PLAYERS];
  10.  
  11. /* ===[CALLBACKS]=== */
  12. public OnFilterScriptInit()
  13. {
  14.         print("\n--------------------------------------");
  15.         print("NoClip by Mike - Loaded");
  16.         print("--------------------------------------\n");
  17.         return 1;
  18. }
  19.  
  20. public OnFilterScriptExit()
  21. {
  22.         print("\n--------------------------------------");
  23.         print("NoClip by Mike - Unloaded");
  24.         print("--------------------------------------\n");
  25.         return 1;
  26. }
  27.  
  28. public OnPlayerConnect(playerid)
  29. {
  30.     pClip[playerid] = 0;
  31.         return 1;
  32. }
  33.  
  34. public OnPlayerCommandText(playerid, cmdtext[])
  35. {
  36.         if (strcmp("/noclip", cmdtext, true) == 0)
  37.         {
  38.                 if(pClip[playerid] == 0)
  39.                 {
  40.                     pClip[playerid] = 1;
  41.                     SendClientMessage(playerid,COLOR_GREEN,"No-clip on!");
  42.                 }
  43.                 else
  44.                 {
  45.                     pClip[playerid] = 0;
  46.                     SendClientMessage(playerid,COLOR_RED,"No-clip off!");
  47.                 }
  48.                 return 1;
  49.         }
  50.         return 0;
  51. }
  52.  
  53. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  54. {
  55.         if (newkeys & KEY_FIRE && DoesPlayerHaveLauncher(playerid) && pClip[playerid] == 1)
  56.         {
  57.                 new type;
  58.                 type = GetPlayerWeapon(playerid);
  59.                 if(type == 35) GivePlayerWeapon(playerid,35,1000);
  60.                 if(type == 36) GivePlayerWeapon(playerid,36,1000);
  61.         }
  62.         return 1;
  63. }
  64.  
  65. stock DoesPlayerHaveLauncher(playerid)
  66. {
  67.         new pWep;
  68.         pWep = GetPlayerWeapon(playerid);
  69.         if(pWep == 35 || pWep == 36)
  70.         {
  71.             return 1;
  72.         }
  73.         return 0;
  74. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top