public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid){
if(respawnzeit[playerid] != 0 && dmarena[playerid] == 0)
{
SendClientMessage(issuerid, COLOR_ORANGE,"Im Krankenhaus verliert der Spieler kein Leben.");
SetPlayerHealth(playerid, amount);
return 1;
}
if(weaponid == 54 || weaponid == 37)
{
Leben[playerid]-=amount;
}
new string[128];
if(PlayerInfo[issuerid][Team] == 18 && weaponid == 34 && PlayerInfo[playerid][wantedlvl] >= 10 && PlayerInfo[issuerid][pRank] > 15 && PlayerInfo[playerid][SpielerDesktop] != 1){
GiveEhre(PlayerInfo[issuerid][Team], 1);
SendClientMessage(issuerid, COLOR_ORANGE,"Du hast einen Flüchtigen getötet. Nach dem Krankenhaus kommt er automatisch in den Knast!");
PlayerInfo[playerid][verhaftet] = 1;
PlayerInfo[playerid][knast] = PlayerInfo[playerid][wantedlvl]*170;
knastding[playerid] = 1;
new geldas = PlayerInfo[playerid][wantedlvl]*1100;
GivePlayerEuro(issuerid, geldas);
format(string, sizeof(string), "Flüchtling %s getötet", PlayerName(playerid));
MoneyLog(-1, issuerid, "wanted", -1, geldas, string, 1);
serverSettings[sStaatsbank] -= geldas;
format(string, sizeof(string), "Du bekommst %d Euro für das Töten eines Flüchtigen", geldas);
SendClientMessage(issuerid, COLOR_GREEN, string);
PlayerInfo[playerid][kau] = 0;
format(string, sizeof(string), "UPDATE `server_user` SET `kau` = '0' WHERE `id` = '%d'", PlayerInfo[playerid][Spielerzid]);
mysql_query(string);
SetPlayerHealth(playerid, -5);
}
if(issuerid != INVALID_PLAYER_ID && IsPlayerInAnyVehicle(playerid))
{
if(Ruestung[playerid] >0)
{
Ruestung[playerid]-=amount;
}
else
{
Leben[playerid]-=amount;
}
format(string, sizeof(string), "LOST: -%.0f HP", amount);
SetPlayerChatBubble(playerid, string, COLOR_RED, 10.0, 1900);
PlayerPlaySound(issuerid,17802,0.0,0.0,0.0);
}
if(issuerid != INVALID_PLAYER_ID)
{
new Float: x_man, Float: y_man, Float:z_man;
GetPlayerPos(issuerid, x_man, y_man, z_man);
new Float: fDistance = GetPlayerDistanceFromPoint(playerid, x_man, y_man, z_man);
switch(weaponid)
{
case 22: // Colt 25mm
{
if(fDistance > 34) return 0;
}
case 23: // Silenced 9mm
{
if(fDistance > 34) return 0;
}
case 24: // Desert Deagle
{
if(fDistance > 34) return 0;
}
case 25: // Shotgun (die normale - die schwache - die langsame)
{
if(fDistance > 34) return 0;
}
case 26: // Sawn-Off-Shotgun
{
if(fDistance > 34) return 0;
}
case 27: // Combat-Shotgun
{
if(fDistance > 34) return 0;
}
case 28: // Micro UZI (SMG)
{
if(fDistance > 34) return 0;
}
case 29: // MP5
{
if(fDistance > 34) return 0;
}
case 30: // AK-47
{
if(fDistance > 65) return 0;
}
case 31: // M4
{
if(fDistance > 65) return 0;
}
case 32: // Tec9
{
if(fDistance > 34) return 0;
}
case 33: // Country Rifle
{
if(fDistance > 105) return 0;
}
case 34: // Sniper
{
if(fDistance > 150) return 0;
}
default:
{
format(string, sizeof(string), "LOST: -%.0f HP", amount);
SetPlayerChatBubble(playerid, string, COLOR_RED, 10.0, 1900);
PlayerPlaySound(issuerid,17802,0.0,0.0,0.0);
if(Ruestung[playerid] >0)
{
Ruestung[playerid]-=amount;
}
else
{
Leben[playerid]-=amount;
}
}
}
SetPlayerHealth(playerid, Leben[playerid]+amount);
}
if(weaponid == 50 ||weaponid == 49)return 1;
if(weaponid == 34 || weaponid == 23)
{
if(issuerid != INVALID_PLAYER_ID && PlayerInfo[issuerid][Team] == 21 && PlayerInfo[playerid][kopfgeld] !=0&& PlayerInfo[playerid][spawnschutz]==0)
{
SendClientMessage(playerid, COLOR_YELLOW, "=> Du wurdest von der Hitman Agency getötet.");
format(string, sizeof(string), "=> Auf dich war ein Kopfgeld in Höhe von %d Euro ausgesetzt.", PlayerInfo[playerid][kopfgeld]);
SendClientMessage(playerid, COLOR_YELLOW, string);
format(string, sizeof(string), "=> %s [ID: %d] hat %s [ID: %d] für %d Euro abgeschlachtet. (Ein Schwein mehr down!)", PlayerName(issuerid, 1), issuerid, PlayerName(playerid), playerid, PlayerInfo[playerid][kopfgeld]);
SendHitmanMessage(COLOR_YELLOW, string);
format(string, sizeof(string), "=> Du hast den Auftrag %s [ID: %d] durchgeführt und hast %d Euro bekommen.", PlayerName(playerid), playerid, (PlayerInfo[playerid][kopfgeld] / 2));
SendClientMessage(issuerid, COLOR_YELLOW, string);
UpdateSpieler("hitmanstop", 8, playerid);
PlayerInfo[playerid][hitmanstop] = 8;
GivePlayerEuro(issuerid, (PlayerInfo[playerid][kopfgeld] / 2));
PlayerInfo[playerid][kopfgeld] = 0;
SetPlayerHealthk(playerid, -5);
}
}
if(weaponid == 31 && issuerid != INVALID_PLAYER_ID)
{
if(IsPlayerInAnyVehicle(issuerid))
{
if(GetVehicleModel(GetPlayerVehicleID(issuerid)) == 447 ||GetVehicleModel(GetPlayerVehicleID(issuerid)) == 476)
{
if(aduty[playerid] == 1 && PlayerInfo[playerid][ALevel] !=0)
{
return 1;
}
if(Ruestung[playerid] >0)
{
Ruestung[playerid]-=amount;
}
else
{
Leben[playerid]-=amount;
}
}
}
}
if(issuerid == INVALID_PLAYER_ID && weaponid != 54 && weaponid != 37)
{
Leben[playerid]=Leben[playerid]-amount;
SetPlayerHealthk(playerid, Leben[playerid]);
}
if(amount >=2){
if(dmarena[playerid] == 0 && PlayerInfo[playerid][knast]==0 && PlayerInfo[playerid][isingw] == 0){
if(GetPlayerWeapon(issuerid) == weaponid){
for(new i = 0; i < MAX_PLAYERS; i ++) {
if(IsPlayerConnected(i)) {
if(PlayerInfo[i][ALevel] !=0 && PlayerInfo[i][smdmeldungen] == 1 && PlayerInfo[playerid][Team] == 0){
format(string, sizeof(string), "[SDM] Name: [%s][ID: %d][Lvl. %d] verletzt [%s][ID: %d][Lvl. %d][%.2f HP] mit der Waffe: %s [SDM]",
PlayerName(issuerid),issuerid, PlayerInfo[issuerid][xLevel], PlayerName(playerid), playerid, PlayerInfo[playerid][xLevel], amount, WeaponName(weaponid));
SendClientMessage(i, COLOR_YELLOW, string);
printf(string);
}
}
}
}
}
}
if(amount >=2){
if(PlayerInfo[playerid][xLevel] <=3 && dmarena[playerid] == 0 && PlayerInfo[playerid][wantedlvl] == 0 && PlayerInfo[playerid][knast]==0){
if(GetPlayerWeapon(issuerid) == weaponid){
for(new i = 0; i < MAX_PLAYERS; i ++) {
if(IsPlayerConnected(i)) {
if(PlayerInfo[i][ALevel] !=0 && PlayerInfo[i][smdmeldungen] == 1 && PlayerInfo[playerid][Team] == 0){
format(string, sizeof(string), "[SDM-M]: %s (ID: %d) verletzt den Spieler %s (ID: %d)", PlayerName(issuerid), issuerid, PlayerName(playerid), playerid);
SendClientMessage(i, COLOR_RED, string);
}
}
}
}
}
}
return 1;
}
Alles anzeigen
So das hier ist das wunderbare stück. Die Fraktion Vagos hat die ID 5