16.12.2011, 08:57
(
Last edited by [FAT]Klabauter[LST]; 20/02/2014 at 07:45 AM.
)
Hi,
This is my first script. Insanely simple and small thanks to OnPlayerGiveDamage.
I took the opportunity to make the Country Rifle a lot more powerful and fun by making the bullets explode.
Sorry about the poor video quality, but you will get the idea.
http://*********/qxGi8tn0Ks0
Thanks Riddick94 
I took your advice and updated the script.
BIG update Feb. 20, 2014: ROFL i can't help but add the 0.3z version
This is my first script. Insanely simple and small thanks to OnPlayerGiveDamage.
I took the opportunity to make the Country Rifle a lot more powerful and fun by making the bullets explode.

Sorry about the poor video quality, but you will get the idea.
http://*********/qxGi8tn0Ks0
PHP Code:
// Explosive ammo for country rifle by Klabauter_Mann
// Please do not remove the credits or claim this script as your own
// You must use SA:MP 0.3d Pawno to compile this script
// Only for SA:MP 0.3d servers
#include <a_samp>
public OnFilterScriptInit()
{
print("\n-------------------------------------------------");
print(" Explosive ammo for country rifle by Klabauter_Mann");
print("-------------------------------------------------\n");
return true;
}
public OnPlayerConnect(playerid)
{
SendClientMessage(playerid, 0xC071FFFF, "This server is using Explosive Country Rifle Ammo");
SendClientMessage(playerid, 0xC071FFFF, "Made by Klabauter_Mann");
return true;
}
public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid)
{
if(GetPlayerWeapon(playerid) == 33)
{
incindiary(damagedid);
}
return true;
}
stock incindiary(playerid)
{
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
return CreateExplosion(x, y, z, 12, 1);
}

I took your advice and updated the script.
BIG update Feb. 20, 2014: ROFL i can't help but add the 0.3z version

PHP Code:
#include <a_samp>
public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
{
if(!IsPlayerConnected(playerid)) return 0;
if(weaponid == 33)
{
new Float:fOriginX, Float:fOriginY, Float:fOriginZ, Float:fHitPosX, Float:fHitPosY, Float:fHitPosZ;
GetPlayerLastShotVectors(playerid, fOriginX, fOriginY, fOriginZ, fHitPosX, fHitPosY, fHitPosZ);
CreateExplosion(fHitPosX, fHitPosY, fHitPosZ, 12, 1);
}
return 1;
}