01.06.2020, 08:47
(
Last edited by Filbert; 01/06/2020 at 09:22 AM.
)
No i didnt, should i really use it and cant use setplayerhealth?
EDIT: So, i've tried it without adding anything in the OnPlayerDamage(), and the SetPlayerHealth is working, so there should be something wrong with my code.. but idk what it is
EDIT: So, i've tried it without adding anything in the OnPlayerDamage(), and the SetPlayerHealth is working, so there should be something wrong with my code.. but idk what it is
pawn Code:
public OnPlayerDamage(&playerid, &Float:amount, &issuerid, &weaponid, &bodypart)
{
if(PlayerInfo[playerid][God] == 1 || OnFly[playerid] == true) return 0;
if(PlayerInfo[issuerid][HitSound] == 1) SetDamageSounds(0, 17802);
if(PlayerInfo[playerid][team] == PlayerInfo[issuerid][team] && InDuel[playerid] == 0 && InDuel[issuerid] == 0 && InDM[playerid] == 0 && InDM[issuerid] == 0 && !IsPlayerInEvent(playerid) && !IsPlayerInEvent(issuerid))
{
GameTextForPlayer(issuerid, "~<~ ~r~Team killing is not allowed ~>~", 1000, 5);
return 0;
}
if(event_type == TDM && p_team[issuerid] == p_team[playerid] && InDuel[playerid] == 0 && InDuel[issuerid] == 0 && InDM[playerid] == 0 && InDM[issuerid] == 0)
{
GameTextForPlayer(issuerid, "~<~ ~r~Team killing is not allowed ~>~", 1000, 5);
return 0;
}
return 1;
}