10.07.2015, 13:31
Код:
public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid, bodypart) { if(playerid != INVALID_PLAYER_ID && weaponid == 34 && bodypart == 9) { if(AntiSK[playerid] == 1 || IsPlayerPaused(playerid) || PlayerInfo[playerid][OnDuty] == 1) //. { SetPlayerHealth(damagedid, 100.0); SetPlayerArmour(damagedid, 100.0); } else if(AntiSK[playerid] == 0 || PlayerInfo[playerid][OnDuty] == 0) //. { new str[256], str2[256], vName[24], pName[24]; GetPlayerName(damagedid, vName, 24); GetPlayerName(playerid, pName, 24); format(str, 256, "%s has killed you with a headshot from a Sniper Rifle! Get your revenge!!", pName); format(str2, 256, "You have killed %s by a headshot! Good job! You get +2 score and $5000.", vName); GivePlayerScore(playerid, 2); GivePlayerMoney(playerid, 5000); SendClientMessage(damagedid, COLOR_ORANGE, str); SendClientMessage(playerid, COLOR_ORANGE, str2); SetPlayerArmour(damagedid, 0.0); SetPlayerHealth(damagedid, 0.0); } } return 1; }