SetPlayerHealth problem with weapon-config
#6

Quote:
Originally Posted by CopKing123
View Post
Oh nevermind. I had some bugs in OnPlayerDamage, but now I fixed it. However, thank you David.
Ey man, how did you fix it? I'm facing the same problem, fall damage and i couldnt use SetPlayerHealth.. it returns an unknown cmd. Here's my codes..

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;
}
If i just use the
pawn Code:
if(PlayerInfo[playerid][God] == 1 || OnFly[playerid] == true) return 0;
only, i can take the fall damage, but still unknown command with SetPlayerHealth.
But if i add my full OnPlayerDamage() codes, it returns unknown cmd and couldnt take the fall dmg

Hope you'll help, thanks
Reply


Messages In This Thread
SetPlayerHealth problem with weapon-config - by CopKing123 - 16.04.2020, 17:37
Re: SetPlayerHealth problem with weapon-config - by David (Sabljak) - 16.04.2020, 18:43
Re: SetPlayerHealth problem with weapon-config - by CopKing123 - 16.04.2020, 18:57
Re: SetPlayerHealth problem with weapon-config - by David (Sabljak) - 16.04.2020, 21:27
Re: SetPlayerHealth problem with weapon-config - by CopKing123 - 16.04.2020, 23:02
Re: SetPlayerHealth problem with weapon-config - by Filbert - 01.06.2020, 10:42

Forum Jump:


Users browsing this thread: 3 Guest(s)