12.02.2017, 10:44
This include don't detect godmode of s0b3it.
Code (in blank gamemode):
Test in-game: https://youtu.be/Xvw_XJKD1oo
And another problem of the include is that by default if you have (legal) armor to do damage the player does not subtract, you have to program that function in the callback OnPlayerDamage, as I showed in the code.
Code (in blank gamemode):
Code:
// ** ETC code... public OnGameModeInit() { SetGameModeText("blank gamemode"); UsePlayerPedAnims(); AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 270.1425, false, false, false, false, -1, -1); SetVehiclePassengerDamage(true); SetDisableSyncBugs(true); return true; } public OnPlayerDamage(&playerid, &Float:amount, &issuerid, &weapon, &bodypart) { SendClientMessage(playerid, -1, "OnPlayerDamage called"); new Float:MP; GetPlayerArmour(playerid, MP); if(MP > amount) { SetPlayerArmour(playerid, MP - amount); return false; } else if(MP > 0) SetPlayerArmour(playerid, 0.0); return true; }
And another problem of the include is that by default if you have (legal) armor to do damage the player does not subtract, you have to program that function in the callback OnPlayerDamage, as I showed in the code.