06.03.2012, 17:08
Ok so I am trying to make a system so if you are using god mode from so be it, then you will still loose hp when shot, but it isn't working, anyone know why?
pawn Код:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
if(issuerid != INVALID_PLAYER_ID) { //Remove this if statement if you want EVERYTHING to do no damage (falls, explosions, ect still will)
GivePlayerHealth( playerid, amount);
if(GetPlayerWeapon(issuerid) == 24)
{
GivePlayerHealth(playerid, -46);
}
}
return true;
}