13.10.2009, 13:52
I have no Death list on my server...
I realy don't know how to solve this problem(
I've just try to add something like that
{
SendDeathMessage(killerid, playerid, reason);
return 1;
}
to my public OnPlayerDeath, but it doesn't work
Please, help me...
here is my poor public
I realy don't know how to solve this problem(
I've just try to add something like that
{
SendDeathMessage(killerid, playerid, reason);
return 1;
}
to my public OnPlayerDeath, but it doesn't work
Please, help me...
here is my poor public
Код:
public OnPlayerDeath(playerid, killerid, reason) { if(IsPlayerConnected(killerid)) { if(IsACop(killerid)) { if(WantedLevel[playerid] >=1) { SendClientMessage(killerid, COLOR_YELLOW,"*Приступник был посажен в тюрьму"); PlayerInfo[playerid][pJailTime] = (WantedLevel[playerid])*(600); PlayerInfo[playerid][pJailed] = 1; PlayerInfo[playerid][pWantedDeaths] += 1; SetPlayerInterior(playerid, 6); SetPlayerPos(playerid, 264.6288,77.5742,1001.0391); return 1; } } } new name[MAX_PLAYER_NAME]; //new dmessage[128]; //new deathreason[20]; new playercash; new victimteam; new Float:px,Float:py,Float:pz; new killerteam; victimteam = gTeam[playerid]; killerteam = gTeam[killerid]; gPlayerSpawned[playerid] = 0; GetPlayerName(playerid, name, sizeof(name)); PlayerInfo[playerid][pLocal] = 255; GetPlayerPos(playerid, px, py, pz); if(killerid != 255) { if(GetPlayerState(killerid) == 2) { SendClientMessage(killerid, COLOR_YELLOW, "Drive-By(ДБ) убийство, не повторяйте это, иначе вы будите наказаны!"); return 1; } } if(reason == 38) { new kstring[128]; new kickname[MAX_PLAYER_NAME]; if(IsPlayerConnected(killerid)) { GetPlayerName(killerid, kickname, sizeof(kickname)); format(string, 256, "AdmWarning: [%d]%s убил игрока с менигана, он читер",killerid,kickname); ABroadCast(COLOR_YELLOW,string,1); printf("%s", kstring); } } if (gPlayerCheckpointStatus[playerid] > 4 && gPlayerCheckpointStatus[playerid] < 11) { DisablePlayerCheckpoint(playerid); gPlayerCheckpointStatus[playerid] = CHECKPOINT_NONE; } new caller = Mobile[playerid]; if(caller != 255) { if(caller < 255) { SendClientMessage(caller, COLOR_GRAD2, " Жизьни закончились...."); CellTime[caller] = 0; CellTime[playerid] = 0; Mobile[caller] = 255; } Mobile[playerid] = 255; CellTime[playerid] = 0; } ClearCrime(playerid); if(PlayerPaintballing[playerid] != 0) { PlayerPaintballKills[killerid] ++; if(PlayerPaintballKills[killerid] > PaintballWinnerKills) { new killer[MAX_PLAYER_NAME]; PaintballWinner = killerid; PaintballWinnerKills = PlayerPaintballKills[killerid]; GetPlayerName(killerid, killer, sizeof(killer)); for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { if(PlayerPaintballing[i] != 0) { format(string, sizeof(string), "* %s лидирует с %d убийствами.",killer,PaintballWinnerKills); SendClientMessage(i, COLOR_WHITE, string); } } } } return 1; } if(GettingCK[playerid] < 999 || OnCK[playerid] < 999) { if(IsPlayerConnected(killerid)) { if(GettingCK[killerid] < 999 || OnCK[playerid] < 999) { new killer[MAX_PLAYER_NAME]; new dier[MAX_PLAYER_NAME]; GetPlayerName(playerid, dier, sizeof(dier)); GetPlayerName(killerid, killer, sizeof(killer)); format(string, sizeof(string), "* %s Убийство героя, вы несможете больше играть под этим героем.MoveObject(CreatePlayerObject(SetPlayerObjectPos(GetPlayerObjectPos(SetPlayerObjectRot(AttachObjectToPlayer(AttachPlayerObjectToPlayer(SpawnPlayer())))))))",killer); SendClientMessage(playerid, COLOR_LIGHTRED, string); format(string, sizeof(string), "** %s был убит %s **",killer,dier); CKLog(string); PlayerInfo[playerid][pCK] = 1; if(GettingCK[playerid] < 999) { GettingCK[playerid] = 999; } else if(OnCK[playerid] < 999) { OnCK[playerid] = 999; } if(GettingCK[killerid] < 999) { GettingCK[killerid] = 999; } else if(OnCK[killerid] < 999) { OnCK[killerid] = 999; } KickPlayer[playerid] = 1; } } } if(PlayerInfo[playerid][pHeadValue] > 0) { if(IsPlayerConnected(killerid)) { if(gTeam[killerid] == 10 || PlayerInfo[killerid][pLeader] == 8) { if(GoChase[killerid] == playerid) { ConsumingMoney[killerid] = 1; new killer[MAX_PLAYER_NAME]; GetPlayerName(killerid, killer, sizeof(killer)); SafeGivePlayerMoney (killerid, PlayerInfo[playerid][pHeadValue]); format(string,128,"<< Хитман %s выполнил контракт на %s и получил $%d >>",killer,name,PlayerInfo[playerid][pHeadValue]); SendFamilyMessage(8, COLOR_YELLOW, string); PlayerInfo[playerid][pHeadValue] = 0; GotHit[playerid] = 0; GetChased[playerid] = 999; GoChase[killerid] = 999; } } } } if(victimteam >= 4) { if(IsPlayerConnected(killerid)) { //new killer[MAX_PLAYER_NAME]; //GetPlayerName(killerid, killer, sizeof(killer)); new slice = 100; //$100 playercash = GetPlayerMoney(playerid); if(gTeam[killerid] != 2) { WantedPoints[killerid] += 10; } //+ 2 wanted points if(SafeTime[playerid] <= 0) { if(gTeam[killerid] != gTeam[playerid]) { if(GetPlayerState(killerid) == 1) { PlayerInfo[killerid][pKills] = PlayerInfo[killerid][pKills] + 2; } else { PlayerInfo[killerid][pKills]++; } PlayerInfo[playerid][pKills]--; } } /*if (strlen(deathreason) > 0)// patch { if (((gTeam[killerid]) == 1) || ((gTeam[killerid]) == 3 && civnokill) || gTeam[killerid] == gTeam[playerid])//med kill criminal { format(string, sizeof(string), ".: %s murdered %s. (%s) :.", killer, name, deathreason); } else { format(string, sizeof(string), ".: %s murdered %s. (%s) for $%d :.", killer, name, deathreason, slice); } } else { if (((gTeam[killerid]) == 1) || ((gTeam[killerid]) == 3 && civnokill || gTeam[killerid] == gTeam[playerid])) { format(string, sizeof(string), ".: %s murdered %s :.", killer, name); } else { format(string, sizeof(string), ".: %s murdered %s for $%d :.", killer, name, slice); } }*/ if (((gTeam[killerid]) == 1) || ((gTeam[killerid]) == 3 && civnokill) || (gTeam[killerid] == gTeam[playerid] && gTeam[playerid] != 4)) { slice = 0; } if (((gTeam[killerid]) != 4) && ((gTeam[killerid]) == gTeam[playerid]))//no team kill { slice = 0; } if (playercash > 0) { SafeGivePlayerMoney (playerid, -slice); } else { slice = slice+500; } SafeGivePlayerMoney (killerid, slice); //GameTextForPlayer(playerid, dmessage, 5000, 2); PlayerPlaySound(killerid, 1083, 0.0, 0.0, 0.0); if (((gTeam[killerid]) == 3) && reason != 49) { SetPlayerCriminal(killerid,255, "Убийство"); } else if (((gTeam[killerid]) == 3) && reason == 49) { SetPlayerCriminal(killerid,255, "Нарушение и побег"); } } } else if (victimteam == 2) { if(IsPlayerConnected(killerid)) { //new killer[MAX_PLAYER_NAME]; //GetPlayerName(killerid, killer, sizeof(killer)); // Cop kill PlayerInfo[playerid][pKills]--; if (gTeam[killerid] == 2)//cops kill cop { //format(string,128,".: Officer %s murdered Officer %s (%s) and was sued for $%d :.",killer,name,deathreason,suecost); PlayerPlaySound(killerid, 1084, 0.0, 0.0, 0.0); SafeGivePlayerMoney (killerid, -suecost); SafeGivePlayerMoney (playerid, suecost+100);//+100pays hospital bill } else { //format(string,128,".: %s murdered Officer %s (%s) :.",killer,name,deathreason); } if (gTeam[killerid] >= 3) { WantedPoints[killerid] += 0; //+ 10 wanted points if(reason != 49) { SetPlayerCriminal(killerid,255, "*Убийство полицейского"); } else if (reason == 49) { SetPlayerCriminal(killerid,255, "Нарушение и побег"); } } if(gTeam[killerid] >= 5 && SafeTime[playerid] <= 0) { if(GetPlayerState(killerid) == 1) { PlayerInfo[killerid][pKills] = PlayerInfo[killerid][pKills]+2; } else { PlayerInfo[killerid][pKills]++; } WantedPoints[killerid]+=0; } //BroadCast(COLOR_RED, string); } } else if (victimteam == 3) { if(IsPlayerConnected(killerid)) { //new killer[MAX_PLAYER_NAME]; //GetPlayerName(killerid, killer, sizeof(killer)); // Civ kill if ((gTeam[killerid]) == 2)//cops kill civ { if(WantedLevel[playerid] < 1) { //format(string,128,".: Officer %s murdered %s (%s) and was sued for $%d :.",killer,name,deathreason,suecost); PlayerPlaySound(killerid, 1084, 0.0, 0.0, 0.0); SafeGivePlayerMoney (killerid, -suecost); SafeGivePlayerMoney (playerid, suecost+100);//+100pays hospital bill } } else { //format(string,128,".: %s murdered %s (%s) :.",killer,name,deathreason); WantedPoints[killerid] += 0; } if (((gTeam[killerid]) >= 3 || (gTeam[killerid]) == 1) && reason != 49) { SetPlayerCriminal(killerid,255, "*Убийство гражданского"); } else if (((gTeam[killerid]) >= 3 || (gTeam[killerid]) == 1) && reason == 49) { SetPlayerCriminal(killerid,255, "Нарушение и побег"); } //BroadCast(COLOR_RED, string); } } else if (victimteam == 1) { if(IsPlayerConnected(killerid)) { //new killer[MAX_PLAYER_NAME]; //GetPlayerName(killerid, killer, sizeof(killer)); // Civ kill if ((gTeam[killerid]) == 2)//cops kill civ { //format(string,128,".: Officer %s murdered Paramedic %s (%s) and was sued for $%d :.",killer,name,deathreason,suecost); PlayerPlaySound(killerid, 1084, 0.0, 0.0, 0.0); SafeGivePlayerMoney (killerid, -suecost); SafeGivePlayerMoney (playerid, suecost+100);//+100pays hospital bill } else if ((gTeam[killerid]) == 1)//med kill civ { //format(string,128,".: Paramedic %s murdered %s (%s) and was sued for $%d :.",killer,name,deathreason,suecost); PlayerPlaySound(killerid, 1084, 0.0, 0.0, 0.0); SafeGivePlayerMoney (killerid, -suecost); SafeGivePlayerMoney (playerid, suecost+100);//+100pays hospital bill } else { //format(string,128,".: %s murdered %s (%s) :.",killer,name,deathreason); } if (((gTeam[killerid]) == 4) && reason != 49) { SetPlayerCriminal(killerid,255, "Убийство полицейского"); } else if (((gTeam[killerid]) == 3) && reason == 49) { SetPlayerCriminal(killerid,255, "Нарушение и побег"); } //BroadCast(COLOR_RED, string); } } if (victimteam >= 3 && WantedPoints[playerid] > 0 && killerteam == 2) { SetPlayerFree(playerid,killerid, "Был убит"); } killerid = INVALID_PLAYER_ID; SetPlayerColor(playerid,COLOR_GRAD2); return 1; }