Exploding Bullets for Country Rifle (0.3d) NOW FOR 0.3z -
[FAT]Klabauter[LST] - 16.12.2011
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
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);
}
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
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;
}
Re : Exploding Bullets for Country Rifle (0.3d) -
BigBaws - 16.12.2011
Good idea Keep it up :d
Re : Exploding Bullets for Country Rifle (0.3d) -
mehdi-jumper - 16.12.2011
Very nice !!!

I'll do it for all weapons
+1 rep!
Re: Exploding Bullets for Country Rifle (0.3d) -
davve95 - 16.12.2011
Very awsome good job

+1 for idea
Re: Exploding Bullets for Country Rifle (0.3d) -
Riddick94 - 16.12.2011
Some lines and code are not needed:
pawn 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);
}
Re: Exploding Bullets for Country Rifle (0.3d) -
Lorenc_ - 16.12.2011
How to kill yourself, use this.
EDIT: means that the code fails.
Re: Exploding Bullets for Country Rifle (0.3d) - XFlawless - 16.12.2011
Quote:
Originally Posted by Lorenc_
How to kill yourself, use this.
|
+1
@author: Learn how float values and CreateExplosion Works.
Have you even tested the code ?
Re: Exploding Bullets for Country Rifle (0.3d) -
PrawkC - 16.12.2011
Code looks fine? What are you guys getting at.
Re: Exploding Bullets for Country Rifle (0.3d) - XFlawless - 16.12.2011
Quote:
Originally Posted by PrawkC
Code looks fine? What are you guys getting at.
|
See the CODE properly.
Re: Exploding Bullets for Country Rifle (0.3d) -
Niko_boy - 16.12.2011
Quote:
Originally Posted by XFlawless
+1
Have you even tested the code ?
|
LooooooooL he has tested the script thats why he made a video lol :P
@author hmm since it use OnPlayerGiveDamage thats why explosion occur only when it touches the character ,
I am not sure if it gonna wrk with LagShot?
btw nice idea