- Автор темы
- #1
всем привет, в одном из слитых модов арз, который я взял под основу, нашел баг
суть заключается в том, что если я убью какого-то игрока, то будет считаться, что он помер сам(это отображается в киллисте, не засчитываются фраги на капте и битве за притон)
могу предположить, что какой-то баг в этой части мода, если нет, то подскажите в какой может находиться
суть заключается в том, что если я убью какого-то игрока, то будет считаться, что он помер сам(это отображается в киллисте, не засчитываются фраги на капте и битве за притон)
могу предположить, что какой-то баг в этой части мода, если нет, то подскажите в какой может находиться
public OnPlayerDeath(playerid, killerid, reason)
{
if killerid != INVALID_PLAYER_ID *then
return true;
if IsPlayerLogged{playerid} *then
{
if(IsPlayerInRangeOfPoint(killerid, 230, 2474.6790,-1510.5870,24.0000))
if PritonState *then
if IsAtGang(playerid) && IsAtGang(killerid) *then
if PI[playerid][pMember] != PI[killerid][pMember] *then
PritonKills[PI[killerid][pMember]]++;
deltarget(playerid);
_ResetGun(playerid);
StopAudioStreamForPlayer(playerid);
CheckBed(playerid);
SkladEntered[playerid] = -1;
SkladEntered2[playerid] = -1;
//
if IsValidDynamicArea(area_boombox[playerid]) *then DestroyDynamicArea(area_boombox[playerid]);
if(selfi{playerid})
{
selfi{playerid} = false;
TextDrawHideForPlayer(playerid, StopAnimation);
}
if(PI[playerid][pLastGun] > 0)
{
if(!IsPlayerInAnyVehicle(playerid))
{
new Float:x, Float:y, Float:z, Float:eagle;
GetPlayerPos(playerid, x, y, z);
GetPlayerFacingAngle(playerid, eagle);
new idgun;
switch(PI[playerid][pLastGun])
{
case 3: idgun = 334;
case 4: idgun = 335;
case 5: idgun = 336;
case 6: idgun = 337;
case 8: idgun = 339;
case 17: idgun = 343;
case 22: idgun = 346;
case 23: idgun = 347;
case 24: idgun = 348;
case 25: idgun = 349;
case 28: idgun = 352;
case 29: idgun = 353;
case 30: idgun = 355;
case 31: idgun = 356;
case 32: idgun = 372;
case 33: idgun = 357;
case 34: idgun = 358;
case 42: idgun = 366;
case 43: idgun = 367;
case 46: idgun = 371;
default:
{
PI[playerid][pLastGun] =
PI[playerid][pLastAmmo] = 0;
}
}
if(idgun > 0)
{
new idobject = -1;
for(new i; i < MAX_DGUNS; i++)
{
if(dguns == -1)
{
idobject = i;
break;
}
}
if(idobject == -1)
{
new min1 = Global_Time;
for(new i; i < MAX_DGUNS; i++)
{
if(dguntime < min1)
{
min1 = dguntime;
idobject = i;
}
}
DestroyDynamicObject(dguns[idobject]);
}
dguntime[idobject] = Global_Time;
dpatrons[idobject] = PI[playerid][pLastAmmo];
dgunn[idobject] = PI[playerid][pLastGun];
dguns[idobject] = CreateDynamicObject(idgun, x, y, z - 0.97, 96, 110, eagle, GetPlayerVirtualWorld(playerid));
PI[playerid][pLastGun] =
PI[playerid][pLastAmmo] = 0;
}
}
}
if(pTemp[playerid][pDeathCar] != INVALID_VEHICLE_ID && GetPlayerState(playerid) != PLAYER_STATE_SPECTATING)
{
pTemp[playerid][pDeathCar] = INVALID_VEHICLE_ID;
ExitCar(playerid);
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X, Y, Z);
UpdatePlayerPos(playerid, X, Y, Z);
CallTimeOutFunction("PlayerSpawn", 2000, false, "i", playerid);
}
Smoke[playerid] =
pSportZal[playerid] =
SellGzone[playerid] =
SellPGzone[playerid] =
addskate[playerid] =
Vnedren[playerid] = 0;
UpdatePlayerArmour(playerid, 0);
UpdatePlayerHealth(playerid, 15);
SetFullness(playerid, 40);
new job = PlayerJob[playerid], injob = InJob[playerid];
if ( (job == 17 || job == 18 || job == 19 || job == 20) && (injob == 1 || injob == 3) ) InJob[playerid] = 0, SCM(playerid, COLOR_GREY, !"[Информация] {FFFFFF}Вы забыли забрать свою зарплату, не забудьте вернутся что бы забрать ее!");
if job == JOB_PIZZA *then InJobs[playerid] = 0, NumInc_CP[playerid] = -1;
if !(GotoInfo[playerid][gtGoID] == INVALID_PLAYER_ID) *then CheckPlayerGoCuff(GotoInfo[playerid][gtGoID]);
if(GotoInfo[playerid][gtID] != INVALID_PLAYER_ID)
{
Cuffed[GotoInfo[playerid][gtID]] = false;
CuffedTime[GotoInfo[playerid][gtID]] = 0;
TogglePlayerControllable(GotoInfo[playerid][gtID], true);
SetPlayerSpecialAction(GotoInfo[playerid][gtID], 0);
ClearAnimationsEx(GotoInfo[playerid][gtID]);
SCM(GotoInfo[playerid][gtID], COLOR_GREY, !"[Ошибка]{FFFFFF} Вы были выпущены с конвоя.");
CheckPlayerGoCuff(GotoInfo[playerid][gtID]);
CheckPlayerGoCuff(playerid);
}
if(PI[playerid][pMaskON] > 0)
{
PI[playerid][pMaskON] = 0;
if(TeamDuty{playerid}) SetPlayerColor(playerid, TeamColors[GetTeamID(playerid)]);
else SetPlayerColor(playerid, 0xFFFFFF80);
}
gunmute[playerid] = Global_Time + 5;
if IsTextDrawVisibleForPlayer(playerid, Boxmenu0) *then
TextDrawHideForPlayer(playerid, Boxmenu0),
TextDrawHideForPlayer(playerid, Boxmenu1),
TextDrawHideForPlayer(playerid, Boxmenu2),
TextDrawHideForPlayer(playerid, Boxmenu3),
TextDrawHideForPlayer(playerid, ButtonLeft),
TextDrawHideForPlayer(playerid, ButtonRight),
TextDrawHideForPlayer(playerid, ButtonCancel),
TextDrawHideForPlayer(playerid, ButtonSelect),
TextDrawHideForPlayer(playerid, boxaccept),
TextDrawHideForPlayer(playerid, boxcancel);
if IsTextDrawVisibleForPlayer(playerid, BoxTaxi1) *then
TextDrawHideForPlayer(playerid, BoxTaxi1),
TextDrawHideForPlayer(playerid, BoxTaxi2),
TextDrawHideForPlayer(playerid, Taximonitor),
TextDrawHideForPlayer(playerid, TaxiServ),
TextDrawHideForPlayer(playerid, TaxiDol),
PlayerTextDrawHide(playerid, TaxiDraw[playerid]);
if IsPlayerTextDrawVisible(playerid, InfoText[playerid]) *then
DestroyPlayerTD(playerid, InfoText[playerid]);
if(!PI[playerid][pJailTime] && !PI[playerid][pDemorgan] && !IsAtGang(playerid))
{
if(!GetPlayerInterior(playerid) && !Int_GetPlayerData(playerid, "DeathReturn"))
{
new kolvo = 0;
GetPlayerPos(playerid, DeathPos[playerid][0], DeathPos[playerid][1], DeathPos[playerid][2]);
SetPVarInt(playerid, "DeathReturn", 30);
DeathTimer[playerid] = CallTimeOutFunction("DeathRP", 1000, true, "dd", playerid, kolvo);
}
else
BackToBolka(playerid);
}
if(Merrit[0] != 0 && (Merrit[1] == playerid || Merrit[2] == playerid || Merrit[3] == playerid))
{
Merrit[0] =
Merrit[1] =
Merrit[2] =
Merrit[3] = 0;
ProxDetector(25, playerid, !"Свадьба была сорвана!", COLOR_ME);
}
if !(killerid == INVALID_PLAYER_ID) *then
{
for new i; i < 8; i++ do
AksSlot[playerid][2] = AksSlot[playerid][2] >= 5 ? AksSlot[playerid][2] - 5 : 0;
if(IsPlayerInRangeOfPoint(playerid, 110.0, 2760.7742, -2447.1958, 13.5360) && IsPlayerInRangeOfPoint(killerid, 110.0, 2760.7742, -2447.1958, 13.5360) ||
IsPlayerInRangeOfPoint(playerid, 190.0, 255.7347, 1837.5056, 17.6991) && IsPlayerInRangeOfPoint(killerid, 190.0, 255.7347, 1837.5056, 17.6991) ||
IsPlayerInRangeOfPoint(playerid, 250.0, -1368.9514, 499.1776, 11.1953) && IsPlayerInRangeOfPoint(killerid, 250.0, -1368.9514, 499.1776, 11.1953) ) if(IsAtGang(playerid) && IsAArmy(killerid))
{
GiveMoney(killerid, GLS[18]);
if(PI[playerid][pMoney] > GLS[18]) GiveMoney(playerid, -GLS[18]);
SCM(killerid, COLOR_VALIK, !"[Информация] {FFFFFF}Вы получили премию за пойманого бандита!");
}
if(IsACop(killerid) && PI[playerid][pWanted] > 0)
{
if(ProxDetectorS(30.0, playerid, killerid, 1))
{
PlayerPlaySound(playerid, 1058, 0.0, 0.0, 0.0);
if(PI[playerid][pMember] != 3) {
PI[playerid][pJailTime] = PI[playerid][pWanted] * 300;
SetOldWanted(playerid, 300);
}
else {
PI[playerid][pJailTime] = PI[playerid][pWanted] * 800;
SetOldWanted(playerid, 800);
}
PI[playerid][pBailPrice] = PI[playerid][pWanted] * 300;
if(GetCount(playerid, 525) >0 || GetCount(playerid, 553) > 0) SCM(playerid, COLOR_RED, !"[Информация] {FFFFFF}У вас отобрали наркотики и патроны!");
_ResetGun(playerid);
PI[playerid][pWanted] =
DeleteItem(playerid, 525, GetCount(playerid, 525));
DeleteItem(playerid, 553, GetCount(playerid, 553));
SetPlayerWantedLevel(playerid, 0);
PlayerSpawn(playerid);
//
if !IsPlayerInRangeOfPoint(playerid, 10.0, -456.2372,2173.8435,1601.0908) *then
{
new jrand = random(2);
SetSpawnInfoEx(playerid, GetPlayerSkin(playerid), JailPos[jrand][0], JailPos[jrand][1], JailPos[jrand][2], 0.0);
PI[playerid][pPrison] = jrand+1;
switch PI[playerid][pPrison] do {
case 1: SetPlayerVirtualWorld(playerid, 2);
case 2,3: SetPlayerVirtualWorld(playerid, PI[playerid][pPrison]+2);
}
SetPlayerInterior(playerid, 11);
}
else SetSpawnInfoEx(playerid, GetPlayerSkin(playerid), JailPos[2][0], JailPos[2][1], JailPos[2][2], 0.0);
//
SCMF(playerid, COLOR_RED, ">> Вы были посажены в тюрьму на %d минут.", (PI[playerid][pJailTime] / 60));
TogglePlayerControllable(playerid, true);
}
}
if((CaptureTime[0] > 0 || CaptureTime[1] > 0) && ((GetTeamID(playerid) == CaptureAtac && GetTeamID(killerid) == CaptureDef) || (GetTeamID(playerid) == CaptureDef && GetTeamID(killerid) == CaptureAtac)))
{
if(GetTeamID(playerid) == CaptureAtac && GetTeamID(killerid) == CaptureDef) CaptureDefKill ++;
if(GetTeamID(playerid) == CaptureDef && GetTeamID(killerid) == CaptureAtac) CaptureAtacKill ++;
foreach(new i: Player)
{
if(GetTeamID(i) == CaptureDef || GetTeamID(i) == CaptureAtac)
{
SendDeathMessageToPlayer(i, killerid, playerid, reason);
f(global_str, 130,"~y~kills~n~~n~~g~%s:~w~ %i~n~~r~%s:~w~ %i",GetGangName(CaptureDef),CaptureDefKill,GetGangName(CaptureAtac),CaptureAtacKill);
TextDrawSetString(Kapture,global_str);
if(GetTeamID(i)==CaptureAtac || GetTeamID(i)==CaptureDef) TextDrawShowForPlayer(i, Kapture);
else TextDrawHideForPlayer(i, Kapture);
}
}
}
if(BizWarState == 2 && ((GetTeamID(playerid) == BizAtack && GetTeamID(killerid) == BizDeff) || (GetTeamID(playerid) == BizDeff && GetTeamID(killerid) == BizAtack)))
{
if(GetTeamID(playerid) == BizAtack && GetTeamID(killerid) == BizDeff) BizDeffkill ++;
if(GetTeamID(playerid) == BizDeff && GetTeamID(killerid) == BizAtack) BizAtakkill ++;
foreach(new i: Player)
{
if(GetTeamID(i) == BizDeff || GetTeamID(i) == BizAtack) SendDeathMessageToPlayer(i, killerid, playerid, reason);
}
}
/*
if(!IsACop(killerid) && !IsAArmy(killerid) && JailTSR[killerid] == -1)
{
if(!IsPlayerInRangeOfPoint(playerid, 100, -518.5075, -92.3690, 62.2983) && !IsPlayerInRangeOfPoint(playerid, r_wanted, position_unjail[0], position_unjail[1], position_unjail[2]))
{
if(GetPlayerGangZone(killerid) > 0) return 1;
if(PI[killerid][pZKP] > 1) PI[killerid][pZKP] --;
if(PI[killerid][pWanted] < 6) {
PI[killerid][pWanted] += 1;
SetPlayerWantedLevel(killerid, PI[killerid][pWanted]);
}
SuspectPlayer(playerid, 3);
SCM(killerid, COLOR_RED, !"[Информация] {FFFFFF}Вы были объявлены в розыск! Причина: {FF6347}нападение/убийство");
f(global_str, 100, "Ваш текущий уровень розыска: {FF6347}%d", PI[killerid][pWanted]);
SCM(killerid, COLOR_WHITE, global_str);
f(global_str, 256, "Внимание! {FFFFFF}%s[%d] {FF6347}был(а) объявлен(a) в розыск! Причина: {FFFFFF}убийство{FF6347} | Уровень розыска: {FFFFFF}%d.", PN(killerid), killerid, PI[killerid][pWanted]);
SendCopsMessage(COLOR_RED, global_str);
}
} */
if !(RCzone[killerid] == -1) && GetVehicleModel(GetPlayerVehicleID(killerid)) == 464 *then
RC_KillTimer[killerid] = Global_Time + 18000,
SCM(killerid, COLOR_OLDRED, "При использовании транспорта на радио управления запрещено причинять вред!"),
SaveMasiveTimer(killerid),
ResetRC(killerid);
}
foreach(Admin, i)
{
if ACTIVEpanel[8] *then
SendDeathMessageToPlayer(i, killerid, playerid, reason);
}
}
return 1;
}
{
if killerid != INVALID_PLAYER_ID *then
return true;
if IsPlayerLogged{playerid} *then
{
if(IsPlayerInRangeOfPoint(killerid, 230, 2474.6790,-1510.5870,24.0000))
if PritonState *then
if IsAtGang(playerid) && IsAtGang(killerid) *then
if PI[playerid][pMember] != PI[killerid][pMember] *then
PritonKills[PI[killerid][pMember]]++;
deltarget(playerid);
_ResetGun(playerid);
StopAudioStreamForPlayer(playerid);
CheckBed(playerid);
SkladEntered[playerid] = -1;
SkladEntered2[playerid] = -1;
//
if IsValidDynamicArea(area_boombox[playerid]) *then DestroyDynamicArea(area_boombox[playerid]);
if(selfi{playerid})
{
selfi{playerid} = false;
TextDrawHideForPlayer(playerid, StopAnimation);
}
if(PI[playerid][pLastGun] > 0)
{
if(!IsPlayerInAnyVehicle(playerid))
{
new Float:x, Float:y, Float:z, Float:eagle;
GetPlayerPos(playerid, x, y, z);
GetPlayerFacingAngle(playerid, eagle);
new idgun;
switch(PI[playerid][pLastGun])
{
case 3: idgun = 334;
case 4: idgun = 335;
case 5: idgun = 336;
case 6: idgun = 337;
case 8: idgun = 339;
case 17: idgun = 343;
case 22: idgun = 346;
case 23: idgun = 347;
case 24: idgun = 348;
case 25: idgun = 349;
case 28: idgun = 352;
case 29: idgun = 353;
case 30: idgun = 355;
case 31: idgun = 356;
case 32: idgun = 372;
case 33: idgun = 357;
case 34: idgun = 358;
case 42: idgun = 366;
case 43: idgun = 367;
case 46: idgun = 371;
default:
{
PI[playerid][pLastGun] =
PI[playerid][pLastAmmo] = 0;
}
}
if(idgun > 0)
{
new idobject = -1;
for(new i; i < MAX_DGUNS; i++)
{
if(dguns == -1)
{
idobject = i;
break;
}
}
if(idobject == -1)
{
new min1 = Global_Time;
for(new i; i < MAX_DGUNS; i++)
{
if(dguntime < min1)
{
min1 = dguntime;
idobject = i;
}
}
DestroyDynamicObject(dguns[idobject]);
}
dguntime[idobject] = Global_Time;
dpatrons[idobject] = PI[playerid][pLastAmmo];
dgunn[idobject] = PI[playerid][pLastGun];
dguns[idobject] = CreateDynamicObject(idgun, x, y, z - 0.97, 96, 110, eagle, GetPlayerVirtualWorld(playerid));
PI[playerid][pLastGun] =
PI[playerid][pLastAmmo] = 0;
}
}
}
if(pTemp[playerid][pDeathCar] != INVALID_VEHICLE_ID && GetPlayerState(playerid) != PLAYER_STATE_SPECTATING)
{
pTemp[playerid][pDeathCar] = INVALID_VEHICLE_ID;
ExitCar(playerid);
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X, Y, Z);
UpdatePlayerPos(playerid, X, Y, Z);
CallTimeOutFunction("PlayerSpawn", 2000, false, "i", playerid);
}
Smoke[playerid] =
pSportZal[playerid] =
SellGzone[playerid] =
SellPGzone[playerid] =
addskate[playerid] =
Vnedren[playerid] = 0;
UpdatePlayerArmour(playerid, 0);
UpdatePlayerHealth(playerid, 15);
SetFullness(playerid, 40);
new job = PlayerJob[playerid], injob = InJob[playerid];
if ( (job == 17 || job == 18 || job == 19 || job == 20) && (injob == 1 || injob == 3) ) InJob[playerid] = 0, SCM(playerid, COLOR_GREY, !"[Информация] {FFFFFF}Вы забыли забрать свою зарплату, не забудьте вернутся что бы забрать ее!");
if job == JOB_PIZZA *then InJobs[playerid] = 0, NumInc_CP[playerid] = -1;
if !(GotoInfo[playerid][gtGoID] == INVALID_PLAYER_ID) *then CheckPlayerGoCuff(GotoInfo[playerid][gtGoID]);
if(GotoInfo[playerid][gtID] != INVALID_PLAYER_ID)
{
Cuffed[GotoInfo[playerid][gtID]] = false;
CuffedTime[GotoInfo[playerid][gtID]] = 0;
TogglePlayerControllable(GotoInfo[playerid][gtID], true);
SetPlayerSpecialAction(GotoInfo[playerid][gtID], 0);
ClearAnimationsEx(GotoInfo[playerid][gtID]);
SCM(GotoInfo[playerid][gtID], COLOR_GREY, !"[Ошибка]{FFFFFF} Вы были выпущены с конвоя.");
CheckPlayerGoCuff(GotoInfo[playerid][gtID]);
CheckPlayerGoCuff(playerid);
}
if(PI[playerid][pMaskON] > 0)
{
PI[playerid][pMaskON] = 0;
if(TeamDuty{playerid}) SetPlayerColor(playerid, TeamColors[GetTeamID(playerid)]);
else SetPlayerColor(playerid, 0xFFFFFF80);
}
gunmute[playerid] = Global_Time + 5;
if IsTextDrawVisibleForPlayer(playerid, Boxmenu0) *then
TextDrawHideForPlayer(playerid, Boxmenu0),
TextDrawHideForPlayer(playerid, Boxmenu1),
TextDrawHideForPlayer(playerid, Boxmenu2),
TextDrawHideForPlayer(playerid, Boxmenu3),
TextDrawHideForPlayer(playerid, ButtonLeft),
TextDrawHideForPlayer(playerid, ButtonRight),
TextDrawHideForPlayer(playerid, ButtonCancel),
TextDrawHideForPlayer(playerid, ButtonSelect),
TextDrawHideForPlayer(playerid, boxaccept),
TextDrawHideForPlayer(playerid, boxcancel);
if IsTextDrawVisibleForPlayer(playerid, BoxTaxi1) *then
TextDrawHideForPlayer(playerid, BoxTaxi1),
TextDrawHideForPlayer(playerid, BoxTaxi2),
TextDrawHideForPlayer(playerid, Taximonitor),
TextDrawHideForPlayer(playerid, TaxiServ),
TextDrawHideForPlayer(playerid, TaxiDol),
PlayerTextDrawHide(playerid, TaxiDraw[playerid]);
if IsPlayerTextDrawVisible(playerid, InfoText[playerid]) *then
DestroyPlayerTD(playerid, InfoText[playerid]);
if(!PI[playerid][pJailTime] && !PI[playerid][pDemorgan] && !IsAtGang(playerid))
{
if(!GetPlayerInterior(playerid) && !Int_GetPlayerData(playerid, "DeathReturn"))
{
new kolvo = 0;
GetPlayerPos(playerid, DeathPos[playerid][0], DeathPos[playerid][1], DeathPos[playerid][2]);
SetPVarInt(playerid, "DeathReturn", 30);
DeathTimer[playerid] = CallTimeOutFunction("DeathRP", 1000, true, "dd", playerid, kolvo);
}
else
BackToBolka(playerid);
}
if(Merrit[0] != 0 && (Merrit[1] == playerid || Merrit[2] == playerid || Merrit[3] == playerid))
{
Merrit[0] =
Merrit[1] =
Merrit[2] =
Merrit[3] = 0;
ProxDetector(25, playerid, !"Свадьба была сорвана!", COLOR_ME);
}
if !(killerid == INVALID_PLAYER_ID) *then
{
for new i; i < 8; i++ do
AksSlot[playerid][2] = AksSlot[playerid][2] >= 5 ? AksSlot[playerid][2] - 5 : 0;
if(IsPlayerInRangeOfPoint(playerid, 110.0, 2760.7742, -2447.1958, 13.5360) && IsPlayerInRangeOfPoint(killerid, 110.0, 2760.7742, -2447.1958, 13.5360) ||
IsPlayerInRangeOfPoint(playerid, 190.0, 255.7347, 1837.5056, 17.6991) && IsPlayerInRangeOfPoint(killerid, 190.0, 255.7347, 1837.5056, 17.6991) ||
IsPlayerInRangeOfPoint(playerid, 250.0, -1368.9514, 499.1776, 11.1953) && IsPlayerInRangeOfPoint(killerid, 250.0, -1368.9514, 499.1776, 11.1953) ) if(IsAtGang(playerid) && IsAArmy(killerid))
{
GiveMoney(killerid, GLS[18]);
if(PI[playerid][pMoney] > GLS[18]) GiveMoney(playerid, -GLS[18]);
SCM(killerid, COLOR_VALIK, !"[Информация] {FFFFFF}Вы получили премию за пойманого бандита!");
}
if(IsACop(killerid) && PI[playerid][pWanted] > 0)
{
if(ProxDetectorS(30.0, playerid, killerid, 1))
{
PlayerPlaySound(playerid, 1058, 0.0, 0.0, 0.0);
if(PI[playerid][pMember] != 3) {
PI[playerid][pJailTime] = PI[playerid][pWanted] * 300;
SetOldWanted(playerid, 300);
}
else {
PI[playerid][pJailTime] = PI[playerid][pWanted] * 800;
SetOldWanted(playerid, 800);
}
PI[playerid][pBailPrice] = PI[playerid][pWanted] * 300;
if(GetCount(playerid, 525) >0 || GetCount(playerid, 553) > 0) SCM(playerid, COLOR_RED, !"[Информация] {FFFFFF}У вас отобрали наркотики и патроны!");
_ResetGun(playerid);
PI[playerid][pWanted] =
DeleteItem(playerid, 525, GetCount(playerid, 525));
DeleteItem(playerid, 553, GetCount(playerid, 553));
SetPlayerWantedLevel(playerid, 0);
PlayerSpawn(playerid);
//
if !IsPlayerInRangeOfPoint(playerid, 10.0, -456.2372,2173.8435,1601.0908) *then
{
new jrand = random(2);
SetSpawnInfoEx(playerid, GetPlayerSkin(playerid), JailPos[jrand][0], JailPos[jrand][1], JailPos[jrand][2], 0.0);
PI[playerid][pPrison] = jrand+1;
switch PI[playerid][pPrison] do {
case 1: SetPlayerVirtualWorld(playerid, 2);
case 2,3: SetPlayerVirtualWorld(playerid, PI[playerid][pPrison]+2);
}
SetPlayerInterior(playerid, 11);
}
else SetSpawnInfoEx(playerid, GetPlayerSkin(playerid), JailPos[2][0], JailPos[2][1], JailPos[2][2], 0.0);
//
SCMF(playerid, COLOR_RED, ">> Вы были посажены в тюрьму на %d минут.", (PI[playerid][pJailTime] / 60));
TogglePlayerControllable(playerid, true);
}
}
if((CaptureTime[0] > 0 || CaptureTime[1] > 0) && ((GetTeamID(playerid) == CaptureAtac && GetTeamID(killerid) == CaptureDef) || (GetTeamID(playerid) == CaptureDef && GetTeamID(killerid) == CaptureAtac)))
{
if(GetTeamID(playerid) == CaptureAtac && GetTeamID(killerid) == CaptureDef) CaptureDefKill ++;
if(GetTeamID(playerid) == CaptureDef && GetTeamID(killerid) == CaptureAtac) CaptureAtacKill ++;
foreach(new i: Player)
{
if(GetTeamID(i) == CaptureDef || GetTeamID(i) == CaptureAtac)
{
SendDeathMessageToPlayer(i, killerid, playerid, reason);
f(global_str, 130,"~y~kills~n~~n~~g~%s:~w~ %i~n~~r~%s:~w~ %i",GetGangName(CaptureDef),CaptureDefKill,GetGangName(CaptureAtac),CaptureAtacKill);
TextDrawSetString(Kapture,global_str);
if(GetTeamID(i)==CaptureAtac || GetTeamID(i)==CaptureDef) TextDrawShowForPlayer(i, Kapture);
else TextDrawHideForPlayer(i, Kapture);
}
}
}
if(BizWarState == 2 && ((GetTeamID(playerid) == BizAtack && GetTeamID(killerid) == BizDeff) || (GetTeamID(playerid) == BizDeff && GetTeamID(killerid) == BizAtack)))
{
if(GetTeamID(playerid) == BizAtack && GetTeamID(killerid) == BizDeff) BizDeffkill ++;
if(GetTeamID(playerid) == BizDeff && GetTeamID(killerid) == BizAtack) BizAtakkill ++;
foreach(new i: Player)
{
if(GetTeamID(i) == BizDeff || GetTeamID(i) == BizAtack) SendDeathMessageToPlayer(i, killerid, playerid, reason);
}
}
/*
if(!IsACop(killerid) && !IsAArmy(killerid) && JailTSR[killerid] == -1)
{
if(!IsPlayerInRangeOfPoint(playerid, 100, -518.5075, -92.3690, 62.2983) && !IsPlayerInRangeOfPoint(playerid, r_wanted, position_unjail[0], position_unjail[1], position_unjail[2]))
{
if(GetPlayerGangZone(killerid) > 0) return 1;
if(PI[killerid][pZKP] > 1) PI[killerid][pZKP] --;
if(PI[killerid][pWanted] < 6) {
PI[killerid][pWanted] += 1;
SetPlayerWantedLevel(killerid, PI[killerid][pWanted]);
}
SuspectPlayer(playerid, 3);
SCM(killerid, COLOR_RED, !"[Информация] {FFFFFF}Вы были объявлены в розыск! Причина: {FF6347}нападение/убийство");
f(global_str, 100, "Ваш текущий уровень розыска: {FF6347}%d", PI[killerid][pWanted]);
SCM(killerid, COLOR_WHITE, global_str);
f(global_str, 256, "Внимание! {FFFFFF}%s[%d] {FF6347}был(а) объявлен(a) в розыск! Причина: {FFFFFF}убийство{FF6347} | Уровень розыска: {FFFFFF}%d.", PN(killerid), killerid, PI[killerid][pWanted]);
SendCopsMessage(COLOR_RED, global_str);
}
} */
if !(RCzone[killerid] == -1) && GetVehicleModel(GetPlayerVehicleID(killerid)) == 464 *then
RC_KillTimer[killerid] = Global_Time + 18000,
SCM(killerid, COLOR_OLDRED, "При использовании транспорта на радио управления запрещено причинять вред!"),
SaveMasiveTimer(killerid),
ResetRC(killerid);
}
foreach(Admin, i)
{
if ACTIVEpanel[8] *then
SendDeathMessageToPlayer(i, killerid, playerid, reason);
}
}
return 1;
}