OnPlayerTakeDamage question
#4

Did you make sure the issuer's VIP level is higher or equal than 2? Also, here's my OnPlayerTakeDamage from a DM server I did a couple of weeks ago:

pawn Код:
public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid)
{
    if(issuerid != INVALID_PLAYER_ID)
    {
        if(weaponid == 34)
        {
            SetPlayerHealth(playerid, 0.0); // comparing mine and your code, I have this as a float, you don't.. try that.. crazy answer but might work.
        }
        new string[200];
        GetPlayerName(issuerid, sendername, sizeof(sendername));
        GetPlayerName(playerid, receivername, sizeof(receivername));
        format(string, sizeof(string), "~n~~n~~n~~n~~n~~n~~n~~r~SHOT BY ~w~%s~n~~y~HP -%.0f", sendername, amount);
        GameTextForPlayer(playerid, string, 1750, 3);
        format(string, sizeof(string), "~n~~n~~n~~n~~n~~n~~n~~g~HIT ~w~%s~n~~y~HP -%.0f", receivername, amount);
        GameTextForPlayer(issuerid, string, 1750, 3);
    }
    return 1;
}
You might wanna use some cool stuff in there , it includes the fact that it will kill someone if the weapon was a sniper.
Reply


Messages In This Thread
OnPlayerTakeDamage question - by Patrick - 22.09.2013, 12:52
Re: OnPlayerTakeDamage question - by JimmyCh - 22.09.2013, 12:56
Re: OnPlayerTakeDamage question - by Patrick - 22.09.2013, 13:04
Re: OnPlayerTakeDamage question - by DanishHaq - 22.09.2013, 13:07
Re: OnPlayerTakeDamage question - by Patrick - 22.09.2013, 13:17
Re: OnPlayerTakeDamage question - by GoldZoroGrab - 22.09.2013, 13:43
Re: OnPlayerTakeDamage question - by DanishHaq - 22.09.2013, 13:46
Re: OnPlayerTakeDamage question - by Patrick - 22.09.2013, 13:52

Forum Jump:


Users browsing this thread: 2 Guest(s)