05.08.2011, 18:59
(
Последний раз редактировалось KoczkaHUN; 05.08.2011 в 19:45.
)
Hi all,
Today I saw the new natives for pawn. I played a bit with OnUnoccupiedVehicleUpdate, and I did this.
It could be useful for someone, or not - decide it yourself. You can edit the defines to change the damage caused by weapons.
Okay, but.. erm... what the hell is it?
It let's you kill a car which doesn't come with a driver.
What weapons can I use to kill a car?
Pistols, machine guns, RPGs, Shotguns, and Minigun.
I am strong. Can I box down the car?
Yes, you can, but just if you are very strong.
Is this only for cars?
No. It's for all vehicles.
Okay, but.. erm... how can I use it?
You edit the defines for your needs, compile the script, then load as a filterscript. That's all.
Editing the damage values is more than suggested, because they might not be correct for your needs.
Okay, but.. erm... why they aren't correct?
Because I was too lazy to determine the best values.
F*** you! I don't want to use it! It's totally useless!
Why are you still here?
pwn Code:
Credits:
I don't take any credits for it. Use, edit, sell if you want.
Known bugs:
Not yet.
Updates:
If I find a bug, or somebody sends me a good define set with usable damages, I will update.
Videos:
[ame]http://www.youtube.com/watch?v=VibVaD9otCQ[/ame]
[ame]http://www.youtube.com/watch?v=2sEn868Akco[/ame]
Today I saw the new natives for pawn. I played a bit with OnUnoccupiedVehicleUpdate, and I did this.
It could be useful for someone, or not - decide it yourself. You can edit the defines to change the damage caused by weapons.
Okay, but.. erm... what the hell is it?
It let's you kill a car which doesn't come with a driver.
What weapons can I use to kill a car?
Pistols, machine guns, RPGs, Shotguns, and Minigun.
I am strong. Can I box down the car?
Yes, you can, but just if you are very strong.
Is this only for cars?
No. It's for all vehicles.
Okay, but.. erm... how can I use it?
You edit the defines for your needs, compile the script, then load as a filterscript. That's all.
Editing the damage values is more than suggested, because they might not be correct for your needs.
Okay, but.. erm... why they aren't correct?
Because I was too lazy to determine the best values.
F*** you! I don't want to use it! It's totally useless!
Why are you still here?
pwn Code:
pawn Код:
#define FILTERSCRIPT
#include <a_samp>
#define VEHICLE_DMG_DEFAULT 25.0
#define VEHICLE_DMG_COLT45 50.0
#define VEHICLE_DMG_SILENCED 50.0
#define VEHICLE_DMG_DEAGLE 75.0
#define VEHICLE_DMG_SHOTGUN 75.0
#define VEHICLE_DMG_SAWEDOFF 78.0
#define VEHICLE_DMG_SHOTGSPA 80.0
#define VEHICLE_DMG_UZI 35.0
#define VEHICLE_DMG_MP5 60.0
#define VEHICLE_DMG_AK47 80.0
#define VEHICLE_DMG_M4 80.0
#define VEHICLE_DMG_TEC9 40.0
#define VEHICLE_DMG_RIFLE 75.0
#define VEHICLE_DMG_ROCKETLAUNCHER 150.0
#define VEHICLE_DMG_HEATSEEKER 150.0
#define VEHICLE_DMG_MINIGUN 200.0
#define DecreaseVehHP(%1) if (vhp > %1) SetVehicleHealth(vehicleid, vhp - %1)
public OnFilterScriptInit()
{
print("\n- Vehicle Killer Filterscript loaded -");
return 1;
}
public OnFilterScriptExit()
{
print("\n- Vehicle Killer Filterscript unloaded -");
return 1;
}
public OnUnoccupiedVehicleUpdate(vehicleid, playerid, passenger_seat)
{
if (passenger_seat != 0) return;
new cm = GetPlayerCameraMode(playerid);
if (cm != 53 && cm != 51) return;
new keys, tmp;
GetPlayerKeys(playerid, keys, tmp, tmp);
if (!(keys & KEY_FIRE)) return;
new Float:vhp; GetVehicleHealth(vehicleid, vhp);
switch (GetPlayerWeapon(playerid))
{
case WEAPON_COLT45: DecreaseVehHP(VEHICLE_DMG_COLT45);
case WEAPON_SILENCED: DecreaseVehHP(VEHICLE_DMG_SILENCED);
case WEAPON_DEAGLE: DecreaseVehHP(VEHICLE_DMG_DEAGLE);
case WEAPON_SHOTGUN: DecreaseVehHP(VEHICLE_DMG_SHOTGUN);
case WEAPON_SAWEDOFF: DecreaseVehHP(VEHICLE_DMG_SAWEDOFF);
case WEAPON_SHOTGSPA: DecreaseVehHP(VEHICLE_DMG_SHOTGSPA);
case WEAPON_UZI: DecreaseVehHP(VEHICLE_DMG_UZI);
case WEAPON_MP5: DecreaseVehHP(VEHICLE_DMG_MP5);
case WEAPON_AK47: DecreaseVehHP(VEHICLE_DMG_AK47);
case WEAPON_M4: DecreaseVehHP(VEHICLE_DMG_M4);
case WEAPON_TEC9: DecreaseVehHP(VEHICLE_DMG_TEC9);
case WEAPON_RIFLE: DecreaseVehHP(VEHICLE_DMG_RIFLE);
case WEAPON_ROCKETLAUNCHER: DecreaseVehHP(VEHICLE_DMG_ROCKETLAUNCHER);
case WEAPON_HEATSEEKER: DecreaseVehHP(VEHICLE_DMG_HEATSEEKER);
case WEAPON_MINIGUN: DecreaseVehHP(VEHICLE_DMG_MINIGUN);
default: DecreaseVehHP(VEHICLE_DMG_DEFAULT);
}
}
I don't take any credits for it. Use, edit, sell if you want.
Known bugs:
Not yet.
Updates:
If I find a bug, or somebody sends me a good define set with usable damages, I will update.
Videos:
[ame]http://www.youtube.com/watch?v=VibVaD9otCQ[/ame]
[ame]http://www.youtube.com/watch?v=2sEn868Akco[/ame]