26.07.2016, 11:19
(
Последний раз редактировалось Logic_; 26.07.2016 в 17:16.
)
Nice work copying xd from my release that got removed xd
anyways, heres my code.
EDIT: This is a out-dated version, I have optimized my script very much.
anyways, heres my code.
PHP код:
public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid, bodypart)
{
// Headshot System
if(issuerid != INVALID_PLAYER_ID && weaponid == 34 && bodypart == 9)
{
SetPlayerHealth(playerid, 0.0);
GameTextForPlayer(playerid, "~r~HEADSHOT", 3000, 3);
GameTextForPlayer(issuerid, "~g~HEADSHOT", 3000, 3);
new Float:x, Float:y, Float:z, Float:fDistance, hsMessage[90], KName[MAX_PLAYER_NAME], PName[MAX_PLAYER_NAME];
GetPlayerPos(playerid, x, y, z);
fDistance = GetPlayerDistanceFromPoint(issuerid, x, y, z);
GetPlayerName(issuerid, KName, MAX_PLAYER_NAME);
GetPlayerName(playerid, PName, MAX_PLAYER_NAME);
format(hsMessage, sizeof(hsMessage), "%s has Headshotted %s from the distance of %0.2f", KName, PName, fDistance);
SendClientMessageToAll(0xFCFC18AA, hsMessage);