Advertisement
Guest User

CopTools.inc

a guest
Jan 29th, 2011
4,614
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <a_samp>
  2.  
  3. /*
  4. //////////////////////////////
  5. //////////CopTools////////////
  6. //////////by Geso/////////////
  7. //////////////////////////////
  8.  
  9. These functions can be used with i.e.:
  10.  
  11. public OnPlayerCommandText(playerid, cmdtext[])
  12. {
  13.     if (strcmp("/arm", cmdtext, true, 10) == 0)
  14.     {
  15.         PutRiotShieldOnArm(playerid);
  16.         return 1;
  17.     }
  18.     if (strcmp("/back", cmdtext, true, 10) == 0)
  19.     {
  20.         PutRiotShieldOnBack(playerid);
  21.         return 1;
  22.     }
  23.     if (strcmp("/light", cmdtext, true, 10) == 0)
  24.     {
  25.         GiveFlashLight(playerid);
  26.         return 1;
  27.     }
  28.     if (strcmp("/tazer", cmdtext, true, 10) == 0)
  29.     {
  30.         GiveTazer(playerid);
  31.         return 1;
  32.     }
  33.     if (strcmp("/removeitems", cmdtext, true, 10) == 0)
  34.     {
  35.             if(IsPlayerAttachedObjectSlotUsed(playerid,1)) RemovePlayerAttachedObject(playerid,1);
  36.             if(IsPlayerAttachedObjectSlotUsed(playerid,2)) RemovePlayerAttachedObject(playerid,2);
  37.         return 1;
  38.     }
  39.     return 0;
  40. }
  41. */
  42.  
  43. RemoveItems(playerid)
  44. {
  45.             if(IsPlayerAttachedObjectSlotUsed(playerid,1)) RemovePlayerAttachedObject(playerid,1);
  46.             if(IsPlayerAttachedObjectSlotUsed(playerid,2)) RemovePlayerAttachedObject(playerid,2);
  47. }
  48.  
  49. PutRiotShieldOnBack(playerid)
  50. {
  51.         if(IsPlayerAttachedObjectSlotUsed(playerid,1)) RemovePlayerAttachedObject(playerid,1);
  52.         SetPlayerAttachedObject(playerid, 1 , 18637, 1, 0, -0.1, 0.18, 90, 0, 272, 1, 1, 1);
  53. }
  54.  
  55. PutRiotShieldOnArm(playerid)
  56. {
  57.         if(IsPlayerAttachedObjectSlotUsed(playerid,1)) RemovePlayerAttachedObject(playerid,1);
  58.         SetPlayerAttachedObject(playerid, 1, 18637, 4, 0.3, 0, 0, 0, 170, 270, 1, 1, 1);
  59. }
  60.  
  61. GiveFlashLight(playerid)
  62. {
  63.         if(IsPlayerAttachedObjectSlotUsed(playerid,2)) RemovePlayerAttachedObject(playerid,2);
  64.         SetPlayerAttachedObject(playerid, 2,18641, 5, 0.1, 0.02, -0.05, 0, 0, 0, 1, 1, 1);
  65. }
  66.  
  67. GiveTazer(playerid)
  68. {
  69.         if(IsPlayerAttachedObjectSlotUsed(playerid,2)) RemovePlayerAttachedObject(playerid,2);
  70.         SetPlayerAttachedObject(playerid, 2,18642, 5, 0.12, 0.02, -0.05, 0, 0, 45,1,1,1);
  71. }
Advertisement
RAW Paste Data Copied
Advertisement