Advertisement
Guest User

simples fs 0.3z samp

a guest
May 31st, 2014
478
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 3.74 KB | None | 0 0
  1. #define FILTERSCRIPT
  2.  
  3. #include <a_samp>
  4.  
  5. #undef MAX_VEHICLES
  6. #define MAX_VEHICLES  (1000) //defina o seu MAX_VEHICLES aqui...
  7. #define COLOR_AZUZIN 0x33CCFFAA
  8. #define SCM SendClientMessage
  9.  
  10. new vehexplodidoporarma[MAX_VEHICLES];//evitar o bug do SetVehicleHealth
  11.  
  12. public OnFilterScriptInit()
  13. {
  14.     print("\n-------------[By DoN_ReNaTo]------------");
  15.     print(" Simples fs com funções 0.3z Carregado");
  16.     print("-------------[By DoN_ReNaTo]------------\n");
  17.     return 1;
  18. }
  19.  
  20. public OnFilterScriptExit()
  21. {
  22.     print("\n-------------[By DoN_ReNaTo]------------");
  23.     print(" Simples fs com funções 0.3z Descarregado");
  24.     print("-------------[By DoN_ReNaTo]------------\n");
  25.     return 1;
  26. }
  27.  
  28. public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
  29. {
  30.     new Float:lataria;
  31.     if(hittype == BULLET_HIT_TYPE_VEHICLE && weaponid >= 22 && weaponid <= 24) // Pistolas
  32.     {
  33.        GetVehicleHealth(hitid, lataria);
  34.        SetVehicleHealth(hitid, lataria-60);
  35.        if(lataria <= 250){vehexplodidoporarma[hitid] = 1;}
  36.     }
  37.     if(hittype == BULLET_HIT_TYPE_VEHICLE && weaponid >= 25 && weaponid <= 27) // Shotguns
  38.     {
  39.        GetVehicleHealth(hitid, lataria);
  40.        SetVehicleHealth(hitid, lataria-150);
  41.        if(lataria <= 250){vehexplodidoporarma[hitid] = 1;}
  42.     }
  43.     if(hittype == BULLET_HIT_TYPE_VEHICLE && weaponid >= 28 && weaponid <= 29 || weaponid == 32) // Metralhas
  44.     {
  45.        GetVehicleHealth(hitid, lataria);
  46.        SetVehicleHealth(hitid, lataria-40);
  47.        if(lataria <= 250){vehexplodidoporarma[hitid] = 1;}
  48.     }
  49.     if(hittype == BULLET_HIT_TYPE_VEHICLE && weaponid >= 30 && weaponid <= 31) // Assaults
  50.     {
  51.        GetVehicleHealth(hitid, lataria);
  52.        SetVehicleHealth(hitid, lataria-50);
  53.        if(lataria <= 250){vehexplodidoporarma[hitid] = 1;}
  54.     }
  55.     if(hittype == BULLET_HIT_TYPE_VEHICLE && weaponid >= 33 && weaponid <= 34) // Snipers
  56.     {
  57.        GetVehicleHealth(hitid, lataria);
  58.        SetVehicleHealth(hitid, lataria-120);
  59.        if(lataria <= 250){vehexplodidoporarma[hitid] = 1;}
  60.     }
  61.     if(hittype == BULLET_HIT_TYPE_VEHICLE && weaponid == 38) // Minigun... bazuca, explosivos e etc não são chamadas antes que alguem pergunte '-'
  62.     {
  63.        GetVehicleHealth(hitid, lataria);
  64.        SetVehicleHealth(hitid, lataria-800);
  65.        if(lataria <= 250){vehexplodidoporarma[hitid] = 1;}
  66.     }
  67.     return 1;
  68. }
  69.  
  70. public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart)
  71. {
  72.     if(issuerid != INVALID_PLAYER_ID && weaponid >= 33 && weaponid <= 34 && bodypart == 9)
  73.     {
  74.         SetPlayerHealth(playerid, 0.0);
  75.         GameTextForPlayer(playerid, "~y~Tomou um ~r~Head Shot ~y~de Sniper!!!", 3000, 3);
  76.         GameTextForPlayer(issuerid, "~r~Head Shot!!!", 3000, 3);
  77.         SCM(playerid,COLOR_AZUZIN,"Voou pedaço do seu cerebro para todo lado.");
  78.     }
  79.     if(issuerid != INVALID_PLAYER_ID && weaponid == 24 && bodypart == 9)
  80.     {
  81.         SetPlayerHealth(playerid, 0.0);
  82.         GameTextForPlayer(playerid, "~y~Tomou um ~r~Head Shot ~y~de Eagle!!!", 3000, 3);
  83.         GameTextForPlayer(issuerid, "~r~Head Shot!!!", 3000, 3);
  84.         SCM(playerid,COLOR_AZUZIN,"Voou pedaço do seu cerebro para todo lado.");
  85.     }
  86.     if(issuerid != INVALID_PLAYER_ID && weaponid >= 25 && weaponid <= 27 && bodypart == 9)
  87.     {
  88.         SetPlayerHealth(playerid, 0.0);
  89.         GameTextForPlayer(playerid, "~y~Tomou um ~r~Head Shot ~y~de Escopeta!!!", 3000, 3);
  90.         GameTextForPlayer(issuerid, "~r~Head Shot!!!", 3000, 3);
  91.         SCM(playerid,COLOR_AZUZIN,"Voou pedaço do seu cerebro para todo lado.");
  92.     }
  93.     return 1;
  94. }
  95.  
  96. public OnVehicleStreamIn(vehicleid, forplayerid)
  97. {
  98.     if(vehexplodidoporarma[vehicleid] == 1)
  99.     {
  100.        SetVehicleHealth(vehicleid, 1000);
  101.        vehexplodidoporarma[vehicleid] = 0;
  102.     }
  103.     return 1;
  104. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement