[FilterScript] Damage Control/Adjusting System
#18

Quote:
Originally Posted by AF1_CLAN
Посмотреть сообщение
Nice script, looks like my unreleased one except I have more functions. However, as this is just a 'filterscript' as you say, then you can remove the unnecessary things out and not make it look like it's a huge script and people will eventually add what they want to it.

Just a shorter one here with corrections. It can be shorter but I won't get into details:

Код:
//Made By NoFeAr adjusting damage System

#include <a_samp>
#invelude <zcmd>

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
	print("\n--------------------------------------");
	print("Made By NoFeAr");
	print("--------------------------------------\n");
	return 1;
}

public OnFilterScriptExit()
{
	print("\n--------------------------------------");
	print("NoFeAr Filterscript Unloaded");
	print("--------------------------------------\n");
	return 1;
}

#else

main()
{
	print("\n----------------------------------");
	print("Made by NoFeAr");
	print("----------------------------------\n");
}

#endif

/* Since it is not a gamemode, but a filterscript then this is not needed.
public OnGameModeInit()
{
	return 1;
}

public OnGameModeExit()
{
	return 1;
}
*/

/* un-comment this if it is not defined via your gamemode.
public OnPlayerRequestClass(playerid, classid)
{
	SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
	SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
	SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
	return 1;
}
*/

public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
if(issuerid != INVALID_PLAYER_ID)
{
new Float: health;
GetPlayerHealth(playerid, health); //You defined this twice, one was -4 and -6
if(weaponid == 0)
SetPlayerHealth(playerid,health-4);
if(weaponid == 1)
SetPlayerHealth(playerid,health-5);
if(weaponid == 2)
SetPlayerHealth(playerid,health-5);
if(weaponid == 3)
SetPlayerHealth(playerid,health-7);
if(weaponid == 4)
SetPlayerHealth(playerid,health-5);
if(weaponid == 5)
SetPlayerHealth(playerid,health-5);
if(weaponid == 6)
SetPlayerHealth(playerid,health-5);
if(weaponid == 7)
SetPlayerHealth(playerid,health-8);
if(weaponid == 8)
SetPlayerHealth(playerid,health-20);
if(weaponid == 9)
SetPlayerHealth(playerid,health-5);
if(weaponid == 10)
SetPlayerHealth(playerid,health-5);
if(weaponid == 11)
SetPlayerHealth(playerid,health-5);
if(weaponid == 12)
SetPlayerHealth(playerid,health-5);
if(weaponid == 13)
SetPlayerHealth(playerid,health-5);
if(weaponid == 14)
SetPlayerHealth(playerid,health-5);
if(weaponid == 15)
SetPlayerHealth(playerid,health-35);
if(weaponid == 16)
SetPlayerHealth(playerid,health-4);
if(weaponid == 17)
SetPlayerHealth(playerid,health-9);
if(weaponid == 18)
SetPlayerHealth(playerid,health-10);
if(weaponid == 22)
SetPlayerHealth(playerid,health-10);
if(weaponid == 23)
SetPlayerHealth(playerid,health-45);
if(weaponid == 24)
SetPlayerHealth(playerid,health-25);
if(weaponid == 25)
SetPlayerHealth(playerid,health-30);
if(weaponid == 26)
SetPlayerHealth(playerid,health-27);
if(weaponid == 27)
SetPlayerHealth(playerid,health-20);
if(weaponid == 28)
SetPlayerHealth(playerid,health-20);
if(weaponid == 29)
SetPlayerHealth(playerid,health-20);
if(weaponid == 30)
SetPlayerHealth(playerid,health-25);
if(weaponid == 31)
SetPlayerHealth(playerid,health-20);
if(weaponid == 32)
SetPlayerHealth(playerid,health-50);
if(weaponid == 33)
SetPlayerHealth(playerid,health-50);
if(weaponid == 34)
SetPlayerHealth(playerid,health-80);
if(weaponid == 35)
SetPlayerHealth(playerid,health-80);
if(weaponid == 36)
SetPlayerHealth(playerid,health-15);
if(weaponid == 37)
SetPlayerHealth(playerid,health-99);
if(weaponid == 38)
SetPlayerHealth(playerid,health-75);
if(weaponid == 39)
SetPlayerHealth(playerid,health-75);
if(weaponid == 40)
SetPlayerHealth(playerid,health-5);
if(weaponid == 41)
SetPlayerHealth(playerid,health-9);
if(weaponid == 42)
SetPlayerHealth(playerid,health-0);
if(weaponid == 43)
SetPlayerHealth(playerid,health-0);
if(weaponid == 44)
SetPlayerHealth(playerid,health-0);
if(weaponid == 45)
SetPlayerHealth(playerid,health-0);
if(weaponid == 46)
SetPlayerHealth(playerid,health-300);
if(weaponid == 47)
SetPlayerHealth(playerid,health-15);
if(weaponid == 49)
SetPlayerHealth(playerid,health-95);
if(weaponid == 50)
SetPlayerHealth(playerid,health-80);
if(weaponid == 51)
SetPlayerHealth(playerid,health-50);
if(weaponid == 53)
SetPlayerHealth(playerid,health-300);
if(weaponid == 54)
SetPlayerHealth(playerid,health-0);
if(weaponid == 200)
SetPlayerHealth(playerid,health-0);
if(weaponid == 201)
SetPlayerHealth(playerid,health);
}
return 1;
}
Also, you defined this function twice so I removed one out:

Код:
if(weaponid == 0)
SetPlayerHealth(playerid,health-4);
if(weaponid == 0)
SetPlayerHealth(playerid,health-6);
Goodluck!
Thanks Bro! I'm Learning Scripting Still so idk Much But I everyday watch more then 15 Tutiorls

I will improve Myself
Reply


Messages In This Thread
Damage Control/Adjusting System - by Nofear192 - 30.09.2013, 13:14
Re: Damage Control/Adjusting System - by Konstantinos - 30.09.2013, 13:23
Re: Damage Control/Adjusting System - by Nofear192 - 30.09.2013, 13:25
Re: Damage Control/Adjusting System - by Excel™ - 30.09.2013, 13:25
Re: Damage Control/Adjusting System - by Nofear192 - 30.09.2013, 13:27
Re: Damage Control/Adjusting System - by Konstantinos - 30.09.2013, 13:28
Re: Damage Control/Adjusting System - by Nofear192 - 30.09.2013, 13:29
Re: Damage Control/Adjusting System - by Team_PRO - 30.09.2013, 13:52
Re: Damage Control/Adjusting System - by Nofear192 - 30.09.2013, 13:53
Re: Damage Control/Adjusting System - by JimmyCh - 30.09.2013, 17:38
Re: Damage Control/Adjusting System - by Nofear192 - 30.09.2013, 17:38
Re: Damage Control/Adjusting System - by boomerboom - 30.09.2013, 17:44
Re: Damage Control/Adjusting System - by Nofear192 - 30.09.2013, 17:45
Re: Damage Control/Adjusting System - by efrim123 - 30.09.2013, 21:00
Re: Damage Control/Adjusting System - by Pottus - 30.09.2013, 22:40
Re: Damage Control/Adjusting System - by Nofear192 - 01.10.2013, 11:12
Re: Damage Control/Adjusting System - by AF1_CLAN - 01.10.2013, 18:08
Re: Damage Control/Adjusting System - by Nofear192 - 01.10.2013, 18:22
Re: Damage Control/Adjusting System - by qazwsx - 04.10.2013, 06:16
Re: Damage Control/Adjusting System - by Nofear192 - 04.10.2013, 06:19

Forum Jump:


Users browsing this thread: 4 Guest(s)