SetPlayerHealth problem with weapon-config -
CopKing123 - 16.04.2020
Hello everyone,
I have installed weapon-config in my script lately, it looks like everything else is working except for the Fall Damage and the SetPlayerHealth for some reason, I have a command /kill and it just returns "Unknown command", if SetPlayerHealth gets removed from it, it will work, but what's the point of having a /kill cmd without it lol.
If anyone could help/has any ideas on how to fix this, please give me a reply. Thank you
EDIT: I have searched weapon-config section but I didn't see anyone naming a fix to that
Re: SetPlayerHealth problem with weapon-config -
David (Sabljak) - 16.04.2020
Did you put OnPlayerDamage
and remove OnPlayerGiveDamage & OnPlayerTakeDamage
Re: SetPlayerHealth problem with weapon-config -
CopKing123 - 16.04.2020
Yes I removed that, I have OnPlayerDamage, I realised that weapon-config doesn't let you SetPlayerHealth 0.0, it blocks it, from the include.
Re: SetPlayerHealth problem with weapon-config -
David (Sabljak) - 16.04.2020
It's working for me, by default... what's with fall damage?
Re: SetPlayerHealth problem with weapon-config -
CopKing123 - 16.04.2020
Oh nevermind. I had some bugs in OnPlayerDamage, but now I fixed it. However, thank you David.
Re: SetPlayerHealth problem with weapon-config -
Filbert - 01.06.2020
Quote:
Originally Posted by CopKing123
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