20.05.2018, 13:38
Sure
Код:
public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid, bodypart) { if(issuerid != INVALID_PLAYER_ID && weaponid == 34 && bodypart == 9) { SetPlayerHealth(playerid, 0); GameTextForPlayer(issuerid,"~r~Headshot",2000,3) && GameTextForPlayer(playerid,"~r~Headshot",2000,3); PlayerPlaySound(playerid, 17802, 0.0, 0.0, 0.0) && PlayerPlaySound(issuerid, 17802, 0.0, 0.0, 0.0); } if(issuerid != INVALID_PLAYER_ID && playerData[issuerid][isInDM]) { return 0; } if(issuerid != INVALID_PLAYER_ID && playerData[issuerid][isInCVR]) { return 0; } if(issuerid != INVALID_PLAYER_ID && playerData[issuerid][isinFREEFORALL]) { return 0; } if(issuerid != INVALID_PLAYER_ID && playerData[issuerid][isInEvent]) { return 0; } if(issuerid != INVALID_PLAYER_ID && playerData[issuerid][isInDuel]) { return 0; } if (playerData[playerid][isInDM]) { return 0; } if (playerData[playerid][isInCVR]) { return 0; } if (playerData[playerid][isinFREEFORALL]) { return 0; } if (playerData[playerid][isInEvent]) { return 0; } if (playerData[playerid][isInDuel]) { return 0; } if(issuerid != INVALID_PLAYER_ID) { if(playerData[issuerid][playerHitmarker]) { new string[128]; format(string, sizeof(string), "%0.2f damage", amount); PlayerTextDrawSetString(issuerid, playerData[issuerid][playerHitmarkerTD], string); SetTimerEx("hideHitmarkerTD", 2000, false, "i", issuerid); PlayerPlaySound(issuerid, 17802, 0.0, 0.0, 0.0); } if(playerData[issuerid][playerClass] == CLASS_CIVILIAN || playerData[issuerid][playerClass] == CLASS_FIREFIGHTER || playerData[issuerid][playerClass] == CLASS_MEDIC) { if(playerData[playerid][playerClass] == CLASS_ARMY || playerData[playerid][playerClass] == CLASS_POLICE || playerData[playerid][playerClass] == CLASS_CIA || playerData[playerid][playerClass] == CLASS_FBI || playerData[playerid][playerClass] == CLASS_SECRETSERVICE) { if(playerData[issuerid][playerWantedLevel] == 0) { if(playerData[playerid][playerJailTime] <= 0) { givePlayerWanted(issuerid, 6); sendWantedMessage(issuerid, 6); newPlayerColour(issuerid); } } } } else if(playerData[issuerid][playerClass] == CLASS_POLICE || playerData[issuerid][playerClass] == CLASS_ARMY || playerData[issuerid][playerClass] == CLASS_CIA || playerData[issuerid][playerClass] == CLASS_FBI || playerData[issuerid][playerClass] == CLASS_SECRETSERVICE) { if(playerData[playerid][playerClass] == CLASS_CIVILIAN || playerData[playerid][playerClass] == CLASS_FIREFIGHTER || playerData[playerid][playerClass] == CLASS_MEDIC) { if (playerData[playerid][playerWantedLevel] == 0) { new Float:theirHealth; GetPlayerHealth(playerid, theirHealth); SetPlayerHealth(playerid, theirHealth - 0); } } } else if (playerData[issuerid][playerAdminDuty]) { GameTextForPlayer(issuerid, "You're AoD! Do not harm players!", 3000, 4); } } return 1; }