weapon-config and /kill problem
#4

Quote:
Originally Posted by Adamoneoone
View Post
Did you try using DamagePlayer?
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

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;
}
Reply


Messages In This Thread
weapon-config and /kill problem - by Filbert - 31.05.2020, 14:32
Re: weapon-config and /kill problem - by Filbert - 01.06.2020, 08:27
Re: weapon-config and /kill problem - by Adamoneoone - 01.06.2020, 08:38
Re: weapon-config and /kill problem - by Filbert - 01.06.2020, 08:47

Forum Jump:


Users browsing this thread: 2 Guest(s)