[FilterScript] Easy custom damage + damage sound
#1

Custom Damage + Damage Sound

Hello everyone,

I have a simple custom damage system i have, thought id just share it with you guys because why not!
original code creator in here:
https://sampforum.blast.hk/showthread.php?tid=330005

pawn Код:
#define FILTERSCRIPT

#include <a_samp>

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" CUSTOM DAMAGE BY VOXEL");
    print("--------------------------------------\n");
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}

#else

main()
{
    print("\n----------------------------------");
    print(" Blank Gamemode by your name here");
    print("----------------------------------\n");
}

#endif
//CUSTOM DAMAGE
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
    new Float:HP;
    GetPlayerHealth(playerid, HP);
    if(weaponid == 24) SetPlayerHealth(playerid, HP-51);//DesertEagle
    if(weaponid == 22) SetPlayerHealth(playerid, HP-35);//Colt45
    if(weaponid == 23) SetPlayerHealth(playerid, HP-30);//SilencedColt
    if(weaponid == 31) SetPlayerHealth(playerid, HP-25);//M4
    if(weaponid == 30) SetPlayerHealth(playerid, HP-35);//AK
    if(weaponid == 29) SetPlayerHealth(playerid, HP-30);//MP5
    if(weaponid == 34) SetPlayerHealth(playerid, HP-100);//SniperRifle
    if(weaponid == 33) SetPlayerHealth(playerid, HP-50);//CountryRifle
    if(weaponid == 25) SetPlayerHealth(playerid, HP-40);//PumpShotgun
    if(weaponid == 27) SetPlayerHealth(playerid, HP-25);//Spaz12
    //SOUND
    if(issuerid != INVALID_PLAYER_ID) PlayerPlaySound(issuerid,17802,0.0,0.0,0.0), PlayerPlaySound(playerid,17802,0.0,0.0,0.0);
    return 1;
}
Reply


Messages In This Thread
Easy custom damage + damage sound - by Voxel - 30.09.2013, 14:45
Re: Easy custom damage - by Nofear192 - 30.09.2013, 14:47
Re: Easy custom damage - by Voxel - 30.09.2013, 14:48
Re: Easy custom damage + damage sound - by Nofear192 - 30.09.2013, 14:50
Re: Easy custom damage + damage sound - by Voxel - 30.09.2013, 14:58
Re: Easy custom damage + damage sound - by Team_PRO - 30.09.2013, 15:04
Re: Easy custom damage + damage sound - by Nofear192 - 30.09.2013, 15:11
Re: Easy custom damage + damage sound - by Voxel - 30.09.2013, 15:16
Re: Easy custom damage + damage sound - by Nofear192 - 30.09.2013, 15:19
Re: Easy custom damage + damage sound - by Team_PRO - 30.09.2013, 15:20
Re: Easy custom damage + damage sound - by Voxel - 30.09.2013, 15:21
Re: Easy custom damage + damage sound - by DaRk_RaiN - 30.09.2013, 15:40
Re: Easy custom damage + damage sound - by Voxel - 30.09.2013, 15:55
Re : Easy custom damage + damage sound - by Matnix - 30.09.2013, 15:57
Re: Re : Easy custom damage + damage sound - by Voxel - 30.09.2013, 16:07

Forum Jump:


Users browsing this thread: 3 Guest(s)