Function OnPlayerDeath(playerid, killerid, reason)
{
if(IsPlayerInFrac(killerid,8))
{
if(PlayerInfo[playerid][pContract] >= 1)
{
new stringa[200];
GameTextForPlayer(killerid, "~r~Auftrag erledigt !", 4000, 4);
GivePlayerMoney(killerid,PlayerInfo[playerid][pContract]);
GameTextForPlayer(playerid, "~r~Auftrags-Kill !", 4000, 4);
format(stringa, sizeof(stringa), "||>>|| Hitman %s hat %s gekillt. Und bekam die %d$ ||<<||",SpielerName(killerid),SpielerName(playerid),PlayerInfo[playerid][pContract]);
PlayerInfo[playerid][pContract] = 0;
SendFamilyMessage(8,COLOR_YELLOW,stringa);
}
}
if(GetPVarInt(playerid,"modcheck") == 1)
{
SetPlayerPos(playerid,-672.1529,962.2229,12.1328);
SpawnPlayer(playerid);
}
if(IsACop(killerid))
{
if(WantedLevel[playerid] >= 1)
{
GivePlayerMoney(playerid,-WantedLevel[playerid]*1000);
PlayerInfo[killerid][pGehalt] += WantedLevel[playerid]*500;
ResetPlayerWeapons(playerid);
new string[200];
if(PlayerInfo[killerid][pMember]==1||PlayerInfo[killerid][pLeader]==1)
{
format(string, sizeof(string), "INFO: Officer %s hat den Verbrecher %s getötet", SpielerName(killerid), SpielerName(playerid));
OOCNews(COLOR_RED, string);
}
else if(PlayerInfo[killerid][pMember]==2||PlayerInfo[killerid][pLeader]==2)
{
format(string, sizeof(string), "INFO: Agent %s hat den Verbrecher %s getötet", SpielerName(killerid), SpielerName(playerid));
OOCNews(COLOR_RED, string);
}
else if(PlayerInfo[killerid][pMember]==3||PlayerInfo[killerid][pLeader]==3)
{
format(string, sizeof(string), "INFO: Soldat %s hat den Verbrecher %s getötet", SpielerName(killerid), SpielerName(playerid));
OOCNews(COLOR_RED, string);
}
else if(PlayerInfo[killerid][pMember]==22||PlayerInfo[killerid][pLeader]==22)
{
format(string, sizeof(string), "INFO: SWAT Agent %s hat den Verbrecher %s getötet", SpielerName(killerid), SpielerName(playerid));
OOCNews(COLOR_RED, string);
}
if(LSPDZellen == 0)//zelle1
{
SetPlayerInterior(playerid, 0);
UnFreezePlayer(playerid);
PlayerCuffed[playerid] = 0;
SetPlayerPos(playerid,227.3844,111.5490,999);
LSPDZellen += 1;
}
if(LSPDZellen == 1)//zelle2
{
SetPlayerInterior(playerid, 0);
UnFreezePlayer(playerid);
PlayerCuffed[playerid] = 0;
SetPlayerPos(playerid,223.5090,111.4179,999);
LSPDZellen += 1;
}
if(LSPDZellen == 2)//zelle3
{
SetPlayerInterior(playerid, 0);
UnFreezePlayer(playerid);
PlayerCuffed[playerid] = 0;
SetPlayerPos(playerid,219.5361,111.3571,999);
LSPDZellen += 1;
}
if(LSPDZellen == 3)//Zelle4
{
SetPlayerInterior(playerid, 0);
UnFreezePlayer(playerid);
PlayerCuffed[playerid] = 0;
SetPlayerPos(playerid,215.5814,111.1412,999);
LSPDZellen += 1;
}
if(PlayerInfo[playerid][pMember] == 2)
{
if(LSPDZellen == 0)//zelle1
{
SetPlayerInterior(playerid, 0);
UnFreezePlayer(playerid);
PlayerCuffed[playerid] = 0;
SetPlayerPos(playerid,227.3844,111.5490,999);
LSPDZellen += 1;
}
if(LSPDZellen == 1)//zelle2
{
SetPlayerInterior(playerid, 0);
UnFreezePlayer(playerid);
PlayerCuffed[playerid] = 0;
SetPlayerPos(playerid,223.5090,111.4179,999);
LSPDZellen += 1;
}
if(LSPDZellen == 2)//zelle3
{
SetPlayerInterior(playerid, 0);
UnFreezePlayer(playerid);
PlayerCuffed[playerid] = 0;
SetPlayerPos(playerid,219.5361,111.3571,999);
LSPDZellen += 1;
}
if(LSPDZellen == 3)//Zelle4
{
SetPlayerInterior(playerid, 0);
UnFreezePlayer(playerid);
PlayerCuffed[playerid] = 0;
SetPlayerPos(playerid,215.5814,111.1412,999);
LSPDZellen += 1;
}
}
else
{
if(LSPDZellen == 0)//zelle1
{
SetPlayerInterior(playerid, 0);
UnFreezePlayer(playerid);
PlayerCuffed[playerid] = 0;
SetPlayerPos(playerid,264.8299,86.5835,1001.0391);
LSPDZellen += 1;
}
if(LSPDZellen == 1)//zelle2
{
SetPlayerInterior(playerid, 0);
UnFreezePlayer(playerid);
PlayerCuffed[playerid] = 0;
SetPlayerPos(playerid,264.4675,82.0742,1001.0391);
LSPDZellen += 1;
}
if(LSPDZellen == 2)//zelle3
{
SetPlayerInterior(playerid, 0);
UnFreezePlayer(playerid);
PlayerCuffed[playerid] = 0;
SetPlayerPos(playerid,265.2794,77.6027,1001.0391);
LSPDZellen += 1;
}
}
PlayerInfo[playerid][pJailTime] = WantedLevel[playerid] * 240;
new spr[100];
format(spr,sizeof(spr),"Du wurdest für %d Minuten und einer Geldstrafe von %d$ eingesperrt",WantedLevel[playerid] * 4,WantedLevel[playerid] * 1000);
SendClientMessage(playerid,COLOR_LIGHTBLUE,spr);
PlayerInfo[playerid][pJailed] = 1;
PlayerInfo[playerid][pArrested] += 1;
SetPlayerInterior(playerid, 6);
SetPlayerFree(playerid,playerid, "Verhaftet");
WantedPoints[playerid] = 0;
WantedLevel[playerid] = 0;
SetPlayerWantedLevel(playerid,0);
}
if(OfflineFlucht[playerid] == 1 && WantedLevel[playerid] > 0)
{
SendClientMessage(playerid,COLOR_LIGHTRED, "* Du wurdest Eingesperrt weil du Offline-Flucht begangen hast!");
SendClientMessage(playerid,COLOR_LIGHTRED, "* Pro WantedLevel 5 Minuten + 30 Minuten Strafe!");
new sendername[MAX_PLAYER_NAME],string[100];
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "*[Auto-Jail] %s wurde wegen Offline-Flucht eignesperrt.", sendername);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) && IsADChatter(i))
{
SendClientMessage(i,COLOR_ALLDEPT,string);
}
}
OfflineFlucht[playerid] = 0;
ResetPlayerWeapons(playerid);
new wlevel = WantedLevel[playerid];
PlayerInfo[playerid][pJailed] = 1;
PlayerInfo[playerid][pJailTime] = (wlevel*300)+1800;
SetPlayerInterior(playerid, 3);
if(PlayerInfo[playerid][pMember] == 2)
{
if(LSPDZellen == 0)//zelle1
{
SetPlayerInterior(playerid, 0);
UnFreezePlayer(playerid);
PlayerCuffed[playerid] = 0;
SetPlayerPos(playerid,227.3844,111.5490,999);
LSPDZellen += 1;
}
if(LSPDZellen == 1)//zelle2
{
SetPlayerInterior(playerid, 0);
UnFreezePlayer(playerid);
PlayerCuffed[playerid] = 0;
SetPlayerPos(playerid,223.5090,111.4179,999);
LSPDZellen += 1;
}
if(LSPDZellen == 2)//zelle3
{
SetPlayerInterior(playerid, 0);
UnFreezePlayer(playerid);
PlayerCuffed[playerid] = 0;
SetPlayerPos(playerid,219.5361,111.3571,999);
LSPDZellen += 1;
}
if(LSPDZellen == 3)//Zelle4
{
SetPlayerInterior(playerid, 0);
UnFreezePlayer(playerid);
PlayerCuffed[playerid] = 0;
SetPlayerPos(playerid,215.5814,111.1412,999);
LSPDZellen += 1;
}
}
else
{
if(LSPDZellen == 0)//zelle1
{
SetPlayerInterior(playerid, 0);
UnFreezePlayer(playerid);
PlayerCuffed[playerid] = 0;
SetPlayerPos(playerid,264.8299,86.5835,1001.0391);
LSPDZellen += 1;
}
if(LSPDZellen == 1)//zelle2
{
SetPlayerInterior(playerid, 0);
UnFreezePlayer(playerid);
PlayerCuffed[playerid] = 0;
SetPlayerPos(playerid,264.4675,82.0742,1001.0391);
LSPDZellen += 1;
}
if(LSPDZellen == 2)//zelle3
{
SetPlayerInterior(playerid, 0);
UnFreezePlayer(playerid);
PlayerCuffed[playerid] = 0;
SetPlayerPos(playerid,265.2794,77.6027,1001.0391);
LSPDZellen += 1;
}
}
WantedPoints[playerid] = 0;
SetPlayerWantedLevel(playerid,0);
WantedLevel[playerid] = 0;
}
else if(OfflineFlucht[playerid] == 1 && WantedLevel[playerid] == 0)
{
SendClientMessage(playerid,COLOR_LIGHTRED, "* Du wurdest eingesperrt weil du Offline-Flucht begangen hast!");
new sendername[MAX_PLAYER_NAME],string[100];
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "*[Auto-Jail] %s wurde wegen Offline-Flucht eingesperrt.", sendername);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) && IsADChatter(i))
{
SendClientMessage(i,COLOR_ALLDEPT,string);
}
}
OfflineFlucht[playerid] = 0;
ResetPlayerWeapons(playerid);
PlayerInfo[playerid][pJailed] = 1;
PlayerInfo[playerid][pJailTime] = 300;
SetPlayerInterior(playerid, 0);
if(PlayerInfo[playerid][pMember] == 2)
{
if(LSPDZellen == 0)//zelle1
{
SetPlayerInterior(playerid, 0);
UnFreezePlayer(playerid);
PlayerCuffed[playerid] = 0;
SetPlayerPos(playerid,227.3844,111.5490,999);
LSPDZellen += 1;
}
if(LSPDZellen == 1)//zelle2
{
SetPlayerInterior(playerid, 0);
UnFreezePlayer(playerid);
PlayerCuffed[playerid] = 0;
SetPlayerPos(playerid,223.5090,111.4179,999);
LSPDZellen += 1;
}
if(LSPDZellen == 2)//zelle3
{
SetPlayerInterior(playerid, 0);
UnFreezePlayer(playerid);
PlayerCuffed[playerid] = 0;
SetPlayerPos(playerid,219.5361,111.3571,999);
LSPDZellen += 1;
}
if(LSPDZellen == 3)//Zelle4
{
SetPlayerInterior(playerid, 0);
UnFreezePlayer(playerid);
PlayerCuffed[playerid] = 0;
SetPlayerPos(playerid,215.5814,111.1412,999);
LSPDZellen += 1;
}
}
else
{
if(LSPDZellen == 0)//zelle1
{
SetPlayerInterior(playerid, 0);
UnFreezePlayer(playerid);
PlayerCuffed[playerid] = 0;
SetPlayerPos(playerid,264.8299,86.5835,1001.0391);
LSPDZellen += 1;
}
if(LSPDZellen == 1)//zelle2
{
SetPlayerInterior(playerid, 0);
UnFreezePlayer(playerid);
PlayerCuffed[playerid] = 0;
SetPlayerPos(playerid,264.4675,82.0742,1001.0391);
LSPDZellen += 1;
}
if(LSPDZellen == 2)//zelle3
{
SetPlayerInterior(playerid, 0);
UnFreezePlayer(playerid);
PlayerCuffed[playerid] = 0;
SetPlayerPos(playerid,265.2794,77.6027,1001.0391);
LSPDZellen += 1;
}
}
WantedPoints[playerid] = 0;
SetPlayerWantedLevel(playerid,0);
WantedLevel[playerid] = 0;
}
else if(OfflineFlucht[playerid] == 2 && WantedLevel[playerid] > 0)
{
SendClientMessage(playerid,COLOR_LIGHTRED, "* Du wurdest Eingesperrt weil du Gecuffed einen Crash hattest!");
SendClientMessage(playerid,COLOR_LIGHTRED, "* Pro WantedLevel 5 Minuten!");
new sendername[MAX_PLAYER_NAME],string[100];
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "*[Auto-Jail] %s wurde wegen Exe-Crash eingesperrt.", sendername);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) && IsADChatter(i))
{
SendClientMessage(i,COLOR_ALLDEPT,string);
}
}
OfflineFlucht[playerid] = 0;
ResetPlayerWeapons(playerid);
new wlevel = WantedLevel[playerid];
PlayerInfo[playerid][pJailed] = 1;
PlayerInfo[playerid][pJailTime] = wlevel*300;
SetPlayerInterior(playerid, 0);
if(PlayerInfo[playerid][pMember] == 2)
{
if(LSPDZellen == 0)//zelle1
{
SetPlayerInterior(playerid, 0);
UnFreezePlayer(playerid);
PlayerCuffed[playerid] = 0;
SetPlayerPos(playerid,227.3844,111.5490,999);
LSPDZellen += 1;
}
if(LSPDZellen == 1)//zelle2
{
SetPlayerInterior(playerid, 0);
UnFreezePlayer(playerid);
PlayerCuffed[playerid] = 0;
SetPlayerPos(playerid,223.5090,111.4179,999);
LSPDZellen += 1;
}
if(LSPDZellen == 2)//zelle3
{
SetPlayerInterior(playerid, 0);
UnFreezePlayer(playerid);
PlayerCuffed[playerid] = 0;
SetPlayerPos(playerid,219.5361,111.3571,999);
LSPDZellen += 1;
}
if(LSPDZellen == 3)//Zelle4
{
SetPlayerInterior(playerid, 0);
UnFreezePlayer(playerid);
PlayerCuffed[playerid] = 0;
SetPlayerPos(playerid,215.5814,111.1412,999);
LSPDZellen += 1;
}
}
else
{
if(LSPDZellen == 0)//zelle1
{
SetPlayerInterior(playerid, 0);
UnFreezePlayer(playerid);
PlayerCuffed[playerid] = 0;
SetPlayerPos(playerid,264.8299,86.5835,1001.0391);
LSPDZellen += 1;
}
if(LSPDZellen == 1)//zelle2
{
SetPlayerInterior(playerid, 0);
UnFreezePlayer(playerid);
PlayerCuffed[playerid] = 0;
SetPlayerPos(playerid,264.4675,82.0742,1001.0391);
LSPDZellen += 1;
}
if(LSPDZellen == 2)//zelle3
{
SetPlayerInterior(playerid, 0);
UnFreezePlayer(playerid);
PlayerCuffed[playerid] = 0;
SetPlayerPos(playerid,265.2794,77.6027,1001.0391);
LSPDZellen += 1;
}
}
WantedPoints[playerid] = 0;
SetPlayerWantedLevel(playerid,0);
WantedLevel[playerid] = 0;
}
new stern = WantedLevel[playerid];
SetPlayerWantedLevel(playerid,stern);
WantedPoints[playerid] = stern * 2;
KHSperre[playerid] = 1;
SetTimerEx("KHSP",60000,0,"i",playerid);
return 1;
//E:
if(strcmp(cmd, "/arrest", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(gTeam[playerid] == 2 || IsACop(playerid) || PlayerInfo[playerid][pMember] == 12 || PlayerInfo[playerid][pLeader] == 12 || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3)
{
if(OnDuty[playerid] != 1 && PlayerInfo[playerid][pMember] == 1)
{
SendClientMessage(playerid, COLOR_GREY, " Du bist nicht im Dienst!");
return 1;
}
if(IsPlayerInRangeOfPoint(playerid,6.0,-1589.8398,715.9842,-5.2422) || IsPlayerInRangeOfPoint(playerid,3.0,215.6246,113.8847,999.0156) || IsPlayerInRangeOfPoint(playerid,3.0,1564.6660,-1694.4382,5.8906))
{
// Jail spot
new suspect = GetClosestPlayer(playerid);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Benutze: /arrest (ID / Name)");
return 1;
}
if(IsACop(suspect))
{
SendClientMessage(playerid, COLOR_GRAD2, " Du kannst keinen Beamten einsperren!");
return 1;
}
if(IsPlayerConnected(suspect))
{
if(GetDistanceBetweenPlayers(playerid,suspect) < 5)
{
GetPlayerName(suspect, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
if(WantedLevel[suspect] < 1)
{
SendClientMessage(playerid, COLOR_GREY, " Der Spieler ist nicht gesucht!");
return 1;
}
GivePlayerMoney(suspect,-WantedLevel[suspect]*750);
GivePlayerMoney(playerid,WantedLevel[suspect]*750);
PlayerInfo[playerid][pGehalt] += WantedLevel[suspect]*2000;
ResetPlayerWeapons(suspect);
if(PlayerInfo[playerid][pMember]==1||PlayerInfo[playerid][pLeader]==1)
{
format(string, sizeof(string), "< < < Officer %s hat den Verbrecher %s eingesperrt > > >", SpielerName(playerid), SpielerName(suspect));
OOCNews(COLOR_RED, string);
}
else if(PlayerInfo[playerid][pMember]==2||PlayerInfo[playerid][pLeader]==2)
{
format(string, sizeof(string), "< < < Agent %s hat den Verbrecher %s eingesperrt > > >", SpielerName(playerid), SpielerName(suspect));
OOCNews(COLOR_RED, string);
}
else if(PlayerInfo[playerid][pMember]==3||PlayerInfo[playerid][pLeader]==3)
{
format(string, sizeof(string), "< < < Soldat %s hat den Verbrecher %s eingesperrt > > >", SpielerName(playerid), SpielerName(suspect));
OOCNews(COLOR_RED, string);
}
else if(PlayerInfo[playerid][pMember]==22||PlayerInfo[playerid][pLeader]==22)
{
format(string, sizeof(string), "< < < SWAT Agent %s hat den Verbrecher %s eingesperrt > > >", SpielerName(playerid), SpielerName(suspect));
OOCNews(COLOR_RED, string);
}
if(PlayerInfo[playerid][pMember] == 2)
{
LSPDZellen += 1;
if(LSPDZellen == 0)//zelle1
{
SetPlayerPos(suspect,227.3844,111.5490,999);
}
if(LSPDZellen == 1)//zelle2
{
SetPlayerPos(suspect,223.5090,111.4179,999);
}
if(LSPDZellen == 2)//zelle3
{
SetPlayerPos(suspect,219.5361,111.3571,999);
}
if(LSPDZellen == 3)//Zelle4
{
SetPlayerPos(suspect,215.5814,111.1412,999);
LSPDZellen = 0;
}
}
else
{
LSPDZellen += 1;
if(LSPDZellen == 0)//zelle1
{
SetPlayerPos(suspect,264.8299,86.5835,1001.0391);
}
if(LSPDZellen == 1)//zelle2
{
SetPlayerPos(suspect,264.4675,82.0742,1001.0391);
}
if(LSPDZellen == 2)//zelle3
{
SetPlayerPos(suspect,265.2794,77.6027,1001.0391);
LSPDZellen = 0;
}
}
PlayerInfo[suspect][pJailTime] = WantedLevel[suspect] * 240;
new spr[145];
format(spr,sizeof(spr),"Du wurdest für %d Minuten und einer Geldstrafe von %d$ eingesperrt",WantedLevel[suspect] * 4,WantedLevel[suspect] * 2000);
SendClientMessage(playerid,COLOR_LIGHTBLUE,spr);
PlayerInfo[suspect][pJailed] = 1;
PlayerInfo[suspect][pArrested] += 1;
UnFreezePlayer(suspect);
PlayerCuffed[suspect] = 0;
SetPlayerInterior(suspect, 10);
SetPlayerFree(suspect,playerid, "Verhaftet");
WantedPoints[suspect] = 0;
WantedLevel[suspect] = 0;
SetPlayerWantedLevel(suspect,0);
//distance
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Niemand zum Verhaften in deiner Nähe.");
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Du bist kein Beamter !");
return 1;
}
}
return 1;
}
}
if(strcmp(cmd, "/einsperren", true) == 0)
{
if(IsACop(playerid))
{
if(OnDuty[playerid] != 1 && PlayerInfo[playerid][pMember] == 1)
{
SendClientMessage(playerid, COLOR_GRAD1, "Du bist nicht im Dienst!");
return 1;
}
if(IsPlayerInRangeOfPoint(playerid, 6.0, 195.3785,158.2065,1003.0234))
{
new suspect = GetClosestPlayer(playerid);
if(IsACop(suspect))
{
SendClientMessage(playerid, COLOR_GRAD2, " Du kannst keinen Beamten einsperren!");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GOLD, "____________________________|Einsperren|____________________________");
SendClientMessage(playerid, COLOR_WHITE, "Benutzung: /einsperren [Aktion]");
SendClientMessage(playerid, COLOR_WHITE, "Verfügbare Aktion: normal, stellen");
return 1;
}
if(strcmp(tmp, "normal", true) == 0)
{
if(IsPlayerConnected(suspect))
{
if(GetDistanceBetweenPlayers(playerid,suspect) < 5)
{
moneys = WantedLevel[suspect] * 3000;
new time = WantedLevel[suspect] * 360;
GetPlayerName(suspect, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
if(WantedLevel[suspect] < 1)
{
SendClientMessage(playerid, COLOR_GREY, "Der Spieler ist nicht gesucht!");
return 1;
}
GivePlayerMoney(playerid, moneys/2);
FraktionsKasse[0] += moneys/2;
format(string, sizeof(string), "* Du hast %s eingesperrt für %d$ und %d Sekunden!", giveplayer,moneys, time);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
GivePlayerMoney(suspect, -moneys);
format(string, sizeof(string), "* Du wurdest von %s für %d Sekunden und für %d$ eingesperrt", sendername, time, moneys);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
ResetPlayerWeapons(suspect);
if(PlayerInfo[playerid][pMember]==1||PlayerInfo[playerid][pLeader]==1)
{
format(string, sizeof(string), "< < Officer %s hat den Verdächtigen %s eingesperrt > > >", sendername, giveplayer);
OOCNews(COLOR_LIGHTRED, string);
}
else if(PlayerInfo[playerid][pMember]==2||PlayerInfo[playerid][pLeader]==2)
{
format(string, sizeof(string), "< < FBI Beamter %s hat den Verdächtigen %s eingesperrt > > >", sendername, giveplayer);
OOCNews(COLOR_LIGHTRED, string);
}
else if(PlayerInfo[playerid][pMember]==3||PlayerInfo[playerid][pLeader]==3)
{
format(string, sizeof(string), "< < < Soldat %s hat den Verdächtigen %s eingesperrt > > >", sendername, giveplayer);
OOCNews(COLOR_LIGHTRED, string);
}
if(PlayerInfo[playerid][pMember] == 2)
{
if(LSPDZellen == 0)//zelle1
{
SetPlayerInterior(playerid, 0);
UnFreezePlayer(playerid);
PlayerCuffed[playerid] = 0;
SetPlayerPos(playerid,227.3844,111.5490,999);
LSPDZellen += 1;
}
if(LSPDZellen == 1)//zelle2
{
SetPlayerInterior(playerid, 0);
UnFreezePlayer(playerid);
PlayerCuffed[playerid] = 0;
SetPlayerPos(playerid,223.5090,111.4179,999);
LSPDZellen += 1;
}
if(LSPDZellen == 2)//zelle3
{
SetPlayerInterior(playerid, 0);
UnFreezePlayer(playerid);
PlayerCuffed[playerid] = 0;
SetPlayerPos(playerid,219.5361,111.3571,999);
LSPDZellen += 1;
}
if(LSPDZellen == 3)//Zelle4
{
SetPlayerInterior(playerid, 0);
UnFreezePlayer(playerid);
PlayerCuffed[playerid] = 0;
SetPlayerPos(playerid,215.5814,111.1412,999);
LSPDZellen += 1;
}
else
{
if(LSPDZellen == 0)//zelle1
{
SetPlayerInterior(playerid, 0);
UnFreezePlayer(playerid);
PlayerCuffed[playerid] = 0;
SetPlayerPos(playerid,264.8299,86.5835,1001.0391);
LSPDZellen += 1;
}
if(LSPDZellen == 1)//zelle2
{
SetPlayerInterior(playerid, 0);
UnFreezePlayer(playerid);
PlayerCuffed[playerid] = 0;
SetPlayerPos(playerid,264.4675,82.0742,1001.0391);
LSPDZellen += 1;
}
if(LSPDZellen == 2)//zelle3
{
SetPlayerInterior(playerid, 0);
UnFreezePlayer(playerid);
PlayerCuffed[playerid] = 0;
SetPlayerPos(playerid,265.2794,77.6027,1001.0391);
LSPDZellen += 1;
}
}
PlayerInfo[suspect][pJailTime] = time;
PlayerInfo[suspect][pJailed] = 1;
PlayerInfo[suspect][pArrested] += 1;
SetPlayerInterior(suspect, 3);
WantedPoints[suspect] = 0;
WantedLevel[suspect] = 0;
SetPlayerWantedLevel(suspect,0);
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "Spieler nicht in der Nähe!");
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "Spieler ist nicht online!");
}
}
else if(strcmp(tmp, "stellen", true) == 0)
{
if(IsPlayerConnected(suspect))
{
if(GetDistanceBetweenPlayers(playerid,suspect) < 5)
{
moneys = WantedLevel[suspect] * 2000;
new time = WantedLevel[suspect] * 240;
GetPlayerName(suspect, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
if(WantedLevel[suspect] < 1)
{
SendClientMessage(playerid, COLOR_GREY, "Der Spieler ist nicht gesucht!");
return 1;
}
GivePlayerMoney(playerid, moneys/2);
FraktionsKasse[0] += moneys/2;
format(string, sizeof(string), "* Du hast %s eingesperrt für %d$ und %d Sekunden!", giveplayer,moneys, time);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
GivePlayerMoney(suspect, -moneys);
format(string, sizeof(string), "* Du wurdest von %s für %d Sekunden und für %d$ eingesperrt", sendername, time, moneys);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
ResetPlayerWeapons(suspect);
if(PlayerInfo[playerid][pMember]==1||PlayerInfo[playerid][pLeader]==1)
{
format(string, sizeof(string), "< < < Officer %s hat den Verdächtigen %s eingesperrt > > >", sendername, giveplayer);
OOCNews(COLOR_LIGHTRED, string);
}
else if(PlayerInfo[playerid][pMember]==2||PlayerInfo[playerid][pLeader]==2)
{
format(string, sizeof(string), "< < < FBI Beamter %s hat den Verdächtigen %s eingesperrt > > >", sendername, giveplayer);
OOCNews(COLOR_LIGHTRED, string);
}
else if(PlayerInfo[playerid][pMember]==3||PlayerInfo[playerid][pLeader]==3)
{
format(string, sizeof(string), "< < < Soldat %s hat den Verdächtigen %s eingesperrt > > >", sendername, giveplayer);
OOCNews(COLOR_LIGHTRED, string);
}
if(PlayerInfo[playerid][pMember] == 2)
{
if(LSPDZellen == 0)//zelle1
{
SetPlayerInterior(playerid, 0);
UnFreezePlayer(playerid);
PlayerCuffed[playerid] = 0;
SetPlayerPos(playerid,227.3844,111.5490,999);
LSPDZellen += 1;
}
if(LSPDZellen == 1)//zelle2
{
SetPlayerInterior(playerid, 0);
UnFreezePlayer(playerid);
PlayerCuffed[playerid] = 0;
SetPlayerPos(playerid,223.5090,111.4179,999);
LSPDZellen += 1;
}
if(LSPDZellen == 2)//zelle3
{
SetPlayerInterior(playerid, 0);
UnFreezePlayer(playerid);
PlayerCuffed[playerid] = 0;
SetPlayerPos(playerid,219.5361,111.3571,999);
LSPDZellen += 1;
}
if(LSPDZellen == 3)//Zelle4
{
SetPlayerInterior(playerid, 0);
UnFreezePlayer(playerid);
PlayerCuffed[playerid] = 0;
SetPlayerPos(playerid,215.5814,111.1412,999);
LSPDZellen += 1;
}
else
{
if(LSPDZellen == 0)//zelle1
{
SetPlayerInterior(playerid, 0);
UnFreezePlayer(playerid);
PlayerCuffed[playerid] = 0;
SetPlayerPos(playerid,264.8299,86.5835,1001.0391);
LSPDZellen += 1;
}
if(LSPDZellen == 1)//zelle2
{
SetPlayerInterior(playerid, 0);
UnFreezePlayer(playerid);
PlayerCuffed[playerid] = 0;
SetPlayerPos(playerid,264.4675,82.0742,1001.0391);
LSPDZellen += 1;
}
if(LSPDZellen == 2)//zelle3
{
SetPlayerInterior(playerid, 0);
UnFreezePlayer(playerid);
PlayerCuffed[playerid] = 0;
SetPlayerPos(playerid,265.2794,77.6027,1001.0391);
LSPDZellen += 1;
}
}
PlayerInfo[suspect][pJailTime] = time;
PlayerInfo[suspect][pJailed] = 1;
PlayerInfo[suspect][pArrested] += 1;
SetPlayerInterior(suspect, 3);
WantedPoints[suspect] = 0;
WantedLevel[suspect] = 0;
SetPlayerWantedLevel(suspect,0);
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "Spieler nicht in der Nähe!");
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "Spieler ist nicht online!");
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "Du bist nicht an den Zellen!");
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "Du bist kein Cop!");
}
return 1;
}
}