16.10.2013, 03:06
Hello, I tried to do a script like that:
But does not it work, how it should be the code really?.
pawn Code:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
if(issuerid != INVALID_PLAYER_ID)
{
if(IsPlayerRNPC(playerid))
{
new string[20];
new Float:Health;
GetPlayerHealth(playerid, Health);
SetPlayerHealth(playerid, Health-10);
format(string, sizeof(string), "~w~RNPC HEALTH: ~r~%0.2f~w~.", Health);
GameTextForPlayer(issuerid, string, 2000, 3);
}
}
return 1;
}