Guest User

Système de Tazer réaliste

a guest
Jun 21st, 2013
722
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.59 KB | None | 0 0
  1. // This is a comment
  2. // uncomment the line below if you want to write a filterscript
  3. #define FILTERSCRIPT
  4. #define COLOR_PURPLE 0xB462F6F6
  5. #define COLOR_BLUE 0x2641FEAA
  6.  
  7. #pragma tabsize 0
  8. #include <a_samp>
  9. #include <OPSP>
  10. new Vatazer = 0;
  11.  
  12. #if defined FILTERSCRIPT
  13.  
  14. /*public OnFilterScriptInit()
  15. {
  16.     return 1;
  17. }*/
  18.  
  19. /*public OnFilterScriptExit()
  20. {
  21.     return 1;
  22. }*/
  23.  
  24. public OnPlayerShootPlayer(Shooter,Target,Float:HealthLost,Float:ArmourLost)
  25. {
  26.     if(Vatazer == 1)
  27.     {
  28.         if(GetPlayerWeapon(Shooter) == 0)
  29.         {
  30.              ApplyAnimation(Target, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
  31.              SendClientMessage(Target, COLOR_BLUE,"Vous avez été tazer");
  32.         }
  33.     }
  34.     return 1;
  35. }
  36.  
  37. public OnPlayerCommandText(playerid, cmdtext[])
  38. {
  39.     if(strcmp(cmdtext, "/tazer", true) ==0 || strcmp(cmdtext, "/ta", true) ==0)
  40.     {
  41.         if(IsPlayerConnected(playerid))
  42.         {
  43.             //if(gTeam[playerid] == 2  || IsACop(playerid))
  44.             //{
  45.                 //if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2)
  46.                 //{
  47.                     SetPlayerAttachedObject(playerid,1,18642,5,0.053999,0.029000,-0.039999,0.000000,0.000000,0.000000,1.000000,1.000000,1.000000);
  48.                     SendClientMessage(playerid, COLOR_BLUE, "Vous avez sorti votre tazer");
  49.                     Vatazer = 1;
  50.                     return 1;
  51.                 //}
  52.             //}
  53.         }
  54.     }
  55.     if(strcmp(cmdtext, "/etazer", true) == 0)
  56.     {
  57.         RemovePlayerAttachedObject(playerid, 1);
  58.         SendClientMessage(playerid, COLOR_BLUE, "Vous avez rangé votre tazer");
  59.         Vatazer = 0;
  60.         return 1;
  61.     }
  62.     return 1;
  63. }
  64. #endif
Advertisement
Add Comment
Please, Sign In to add comment