Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define FILTERSCRIPT
- #include <a_samp>
- #undef MAX_VEHICLES
- #define MAX_VEHICLES (1000) //defina o seu MAX_VEHICLES aqui...
- #define COLOR_AZUZIN 0x33CCFFAA
- #define SCM SendClientMessage
- new vehexplodidoporarma[MAX_VEHICLES];//evitar o bug do SetVehicleHealth
- public OnFilterScriptInit()
- {
- print("\n-------------[By DoN_ReNaTo]------------");
- print(" Simples fs com funções 0.3z Carregado");
- print("-------------[By DoN_ReNaTo]------------\n");
- return 1;
- }
- public OnFilterScriptExit()
- {
- print("\n-------------[By DoN_ReNaTo]------------");
- print(" Simples fs com funções 0.3z Descarregado");
- print("-------------[By DoN_ReNaTo]------------\n");
- return 1;
- }
- public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
- {
- new Float:lataria;
- if(hittype == BULLET_HIT_TYPE_VEHICLE && weaponid >= 22 && weaponid <= 24) // Pistolas
- {
- GetVehicleHealth(hitid, lataria);
- SetVehicleHealth(hitid, lataria-60);
- if(lataria <= 250){vehexplodidoporarma[hitid] = 1;}
- }
- if(hittype == BULLET_HIT_TYPE_VEHICLE && weaponid >= 25 && weaponid <= 27) // Shotguns
- {
- GetVehicleHealth(hitid, lataria);
- SetVehicleHealth(hitid, lataria-150);
- if(lataria <= 250){vehexplodidoporarma[hitid] = 1;}
- }
- if(hittype == BULLET_HIT_TYPE_VEHICLE && weaponid >= 28 && weaponid <= 29 || weaponid == 32) // Metralhas
- {
- GetVehicleHealth(hitid, lataria);
- SetVehicleHealth(hitid, lataria-40);
- if(lataria <= 250){vehexplodidoporarma[hitid] = 1;}
- }
- if(hittype == BULLET_HIT_TYPE_VEHICLE && weaponid >= 30 && weaponid <= 31) // Assaults
- {
- GetVehicleHealth(hitid, lataria);
- SetVehicleHealth(hitid, lataria-50);
- if(lataria <= 250){vehexplodidoporarma[hitid] = 1;}
- }
- if(hittype == BULLET_HIT_TYPE_VEHICLE && weaponid >= 33 && weaponid <= 34) // Snipers
- {
- GetVehicleHealth(hitid, lataria);
- SetVehicleHealth(hitid, lataria-120);
- if(lataria <= 250){vehexplodidoporarma[hitid] = 1;}
- }
- if(hittype == BULLET_HIT_TYPE_VEHICLE && weaponid == 38) // Minigun... bazuca, explosivos e etc não são chamadas antes que alguem pergunte '-'
- {
- GetVehicleHealth(hitid, lataria);
- SetVehicleHealth(hitid, lataria-800);
- if(lataria <= 250){vehexplodidoporarma[hitid] = 1;}
- }
- return 1;
- }
- public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart)
- {
- if(issuerid != INVALID_PLAYER_ID && weaponid >= 33 && weaponid <= 34 && bodypart == 9)
- {
- SetPlayerHealth(playerid, 0.0);
- GameTextForPlayer(playerid, "~y~Tomou um ~r~Head Shot ~y~de Sniper!!!", 3000, 3);
- GameTextForPlayer(issuerid, "~r~Head Shot!!!", 3000, 3);
- SCM(playerid,COLOR_AZUZIN,"Voou pedaço do seu cerebro para todo lado.");
- }
- if(issuerid != INVALID_PLAYER_ID && weaponid == 24 && bodypart == 9)
- {
- SetPlayerHealth(playerid, 0.0);
- GameTextForPlayer(playerid, "~y~Tomou um ~r~Head Shot ~y~de Eagle!!!", 3000, 3);
- GameTextForPlayer(issuerid, "~r~Head Shot!!!", 3000, 3);
- SCM(playerid,COLOR_AZUZIN,"Voou pedaço do seu cerebro para todo lado.");
- }
- if(issuerid != INVALID_PLAYER_ID && weaponid >= 25 && weaponid <= 27 && bodypart == 9)
- {
- SetPlayerHealth(playerid, 0.0);
- GameTextForPlayer(playerid, "~y~Tomou um ~r~Head Shot ~y~de Escopeta!!!", 3000, 3);
- GameTextForPlayer(issuerid, "~r~Head Shot!!!", 3000, 3);
- SCM(playerid,COLOR_AZUZIN,"Voou pedaço do seu cerebro para todo lado.");
- }
- return 1;
- }
- public OnVehicleStreamIn(vehicleid, forplayerid)
- {
- if(vehexplodidoporarma[vehicleid] == 1)
- {
- SetVehicleHealth(vehicleid, 1000);
- vehexplodidoporarma[vehicleid] = 0;
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement