01.10.2013, 18:22
Quote:
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; } Код:
if(weaponid == 0) SetPlayerHealth(playerid,health-4); if(weaponid == 0) SetPlayerHealth(playerid,health-6); |
I will improve Myself