Guest User

Untitled

a guest
Jun 18th, 2013
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.48 KB | None | 0 0
  1. /* FILTERSCRIPT UTILE POUR LES SERVEURS ROLEPLAY ! */
  2. #define FILTERSCRIPT
  3.  
  4. #include <a_samp>
  5.  
  6. #if defined FILTERSCRIPT
  7.  
  8. public OnFilterScriptInit()
  9. {
  10.     print("\n--------------------------------------");
  11.     print(" Dégat d'arme réaliste by Arth pour forum.sa-mp.com");
  12.     print("--------------------------------------\n");
  13.     return 1;
  14. }
  15.  
  16. public OnFilterScriptExit()
  17. {
  18.     return 1;
  19. }
  20.  
  21. #else
  22.  
  23. #endif
  24.  
  25. public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
  26. {
  27.     new Float:hp,Float:ap,Float:dg;
  28.     GetPlayerArmour(playerid,ap);
  29.     GetPlayerHealth(playerid,hp);
  30.     if (weaponid==24) dg=51.0;
  31.     if (weaponid==0) dg=15.0;
  32.     if (weaponid==2) dg=25.0;
  33.     if (weaponid==3) dg=25.0;
  34.     if (weaponid==4) dg=35.0;
  35.     if (weaponid==5) dg=25.0;
  36.     if (weaponid==15) dg=25.0;
  37.     if (weaponid==17) dg=10.0;
  38.     if (weaponid==22) dg=35.0;
  39.     if (weaponid==23) dg=35.0;
  40.     if (weaponid==25) dg=65.0;
  41.     if (weaponid==26) dg=65.0;
  42.     if (weaponid==27) dg=65.0;
  43.     if (weaponid==28) dg=20.0;
  44.     if (weaponid==29) dg=27.0;
  45.     if (weaponid==30) dg=45.0;
  46.     if (weaponid==31) dg=45.0;
  47.     if (weaponid==32) dg=20.0;
  48.     if (weaponid==33) dg=70.0;
  49.     if (weaponid==34) dg=125.0;
  50.     if (weaponid==41) dg=15.0;
  51.     if (weaponid==9) dg=50.0;
  52.     if (weaponid==1) dg=20.0;
  53.     if (hp+ap<=dg)
  54.     {
  55.     SetPlayerArmour(playerid,0.0);
  56.     SetPlayerHealth(playerid,0.0);
  57.     }
  58.     else
  59.     {
  60.     ap-=dg;
  61.     if (ap<0.0)
  62.     {
  63.         SetPlayerHealth(playerid,hp+ap);
  64.         ap=0.0;
  65.     }
  66.     SetPlayerArmour(playerid,ap);
  67.     }
  68.     return 1;
  69. }
Advertisement
Add Comment
Please, Sign In to add comment