01.06.2020, 10:42
Quote:
Oh nevermind. I had some bugs in OnPlayerDamage, but now I fixed it. However, thank you David.
|
pawn Code:
public OnPlayerDamage(&playerid, &Float:amount, &issuerid, &weaponid, &bodypart)
{
if(PlayerInfo[issuerid][HitSound] == 1) SetDamageSounds(0, 17802);
if(PlayerInfo[playerid][God] == 1 || OnFly[playerid] == true) return 0;
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;
}
pawn Code:
if(PlayerInfo[playerid][God] == 1 || OnFly[playerid] == true) return 0;
But if i add my full OnPlayerDamage() codes, it returns unknown cmd and couldnt take the fall dmg
Hope you'll help, thanks