27.05.2018, 03:48
PHP код:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart)
{
if(issuerid != INVALID_PLAYER_ID && (weaponid == 24 || weaponid == 34) && bodypart == 9)
{
new string[100], headshota[24], pname[24];
GetPlayerName(playerid, headshota, sizeof(headshota));
GetPlayerName(issuerid, pname, sizeof(pname));
format(string, sizeof(string), "%s(%i) was shoot to the head by %s(%i)", headshota,playerid, pname);
SendClientMessageToAll(COLOR_SILVER,string);
GameTextForPlayer(issuerid,"~r~Headshot",2000,3);
PlayerPlaySound(issuerid, 17802, 0.0, 0.0, 0.0);
GameTextForPlayer(playerid,"~r~Headshot",2000,3);
PlayerPlaySound(playerid, 17802, 0.0, 0.0, 0.0);
SetPlayerHealth(playerid, 0.0);
}
return 1;
}