Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //=================================ARREST=======================================
- 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] == 0)
- {
- SendClientMessage(playerid, COLOR_GREY, " Du bist nicht im Dienst!");
- return 1;
- }
- if(IsPlayerInRangeOfPoint(playerid,8.0, 193.7325,178.9158,1003.0234))
- {
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_GRAD2, "Benutze: /arrest [Kaution]");
- return 1;
- }
- new usw;
- usw = strval(tmp);
- if(usw < 0 || usw > 1) { SendClientMessage(playerid, COLOR_GREY, " Die Möglichkeit einer Kaution kann entweder mit 0 abgelehnt-, oder mit 1 erlaubt werden !"); return 1; }
- new suspect = GetClosestPlayer(playerid);
- 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;
- }
- format(string, sizeof(string), "* Du hast %s eingesperrt für $%d!", giveplayer,moneys);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
- GivePlayerMoney(suspect, -moneys);
- format(string, sizeof(string), "Eingesperrt von %s ~n~ fuer $%d", sendername, moneys);
- GameTextForPlayer(suspect, string, 5000, 5);
- 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), "<< Officer %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);
- }
- else if(PlayerInfo[playerid][pMember]==21||PlayerInfo[playerid][pLeader]==21)
- {
- format(string, sizeof(string), "<< FBI-Agent %s hat den Verdächtigen %s eingesperrt >>", sendername, giveplayer);
- OOCNews(COLOR_LIGHTRED, string);
- }
- if(IsPlayerConnected(suspect))
- {
- new kosten;
- kosten = WantedLevel[suspect] * 2000;
- PlayerInfo[suspect][pJailTime] = WantedLevel[suspect] * 350;
- if(usw == 1)
- {
- JailPrice[suspect] = WantedLevel[suspect] * 7000;
- format(string, sizeof(string), "Du bist für %d Sekunden eingesperrt. Kaution: $%d", PlayerInfo[suspect][pJailTime], JailPrice[suspect]);
- SendClientMessage(suspect, COLOR_LIGHTBLUE, string);
- GivePlayerMoney(suspect,-kosten);
- }
- else
- {
- JailPrice[suspect] = 0;
- format(string, sizeof(string), "Du bist für %d Sekunden eingesperrt. Kaution: nicht möglich", PlayerInfo[suspect][pJailTime]);
- SendClientMessage(suspect, COLOR_LIGHTBLUE, string);
- GivePlayerMoney(suspect,-kosten);
- }
- PlayerInfo[suspect][pJailed] = 1;
- PlayerInfo[suspect][pArrested] += 1;
- SetPlayerInterior(suspect, 3);
- SetPlayerPos(suspect,198.0667,174.7601,1003.0234);
- SetPlayerFree(suspect,playerid, "Verhaftet");
- WantedPoints[suspect] = 0;
- WantedLevel[suspect] = 0;
- SetPlayerWantedLevel(suspect,0);
- }
- }
- 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;
- }
- //===============================SUSPECT========================================
- if(strcmp(cmd, "/suspect", true) == 0 || strcmp(cmd, "/su", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- new x_job[128];
- if(OnDuty[playerid]==0)
- {
- SendClientMessage(playerid, COLOR_GREY, "Du bist kein Beamter!");
- return 1;
- }
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_GRAD2, "Verwendung: (/su)spect [Playerid] [kürzel]");
- return 1;
- }
- x_job = strtok(cmdtext, idx);
- if(!strlen(x_job ))
- {
- SendClientMessage(playerid, COLOR_GRAD1, " /suspect [Playerid/Name] [kürzel]");
- return 1;
- }
- new turnmes[128];
- new turned[MAX_PLAYER_NAME];
- GetPlayerName(playerid, turned, sizeof(turned));
- new points = WantedPoints[playerid];
- giveplayerid = ReturnUser(tmp);
- tmp = strtok(cmdtext, idx);
- if (gTeam[playerid] == 2 || IsACop(playerid))
- {
- if(IsPlayerConnected(giveplayerid))
- {
- if(giveplayerid != INVALID_PLAYER_ID)
- {
- for(new i = 0; i <MAX_PLAYERS; i++)
- {
- GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
- GetPlayerName(playerid, sendername, sizeof(sendername));
- if(WantedLevel[giveplayerid] >= 6)
- {
- SendClientMessage(playerid,COLOR_GRAD2,"Der Spieler hat schon 6 Wanteds");
- return 1;
- }
- else if(strcmp(x_job,"drive",true) == 0)
- {
- format(turnmes,sizeof(turnmes), "Officer %s hat dich des Falschfahrens überführt!", sendername);
- SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, turnmes);
- SetPlayerWantedLevel(giveplayerid,points+1);
- WantedPoints[giveplayerid] += 1;
- WantedLevel[giveplayerid]+=1;
- format(turnmes, sizeof(turnmes), "%s hat %s des Falschfahrens überführt!",sendername,giveplayer);
- SendRadioMessage(1,COLOR_LIGHTBLUE, turnmes);
- SendRadioMessage(2,COLOR_LIGHTBLUE, turnmes);
- SendRadioMessage(3,COLOR_LIGHTBLUE, turnmes);
- SendRadioMessage(21,COLOR_LIGHTBLUE, turnmes);
- }
- else if(strcmp(x_job,"flucht",true) == 0)
- {
- format(string,sizeof(string), "Officer %s hat dich der Flucht überführt!", sendername);
- SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
- SetPlayerWantedLevel(giveplayerid,points+2);
- WantedPoints[giveplayerid] += 2;
- WantedLevel[giveplayerid]+=2;
- format(turnmes, sizeof(turnmes), "%s hat %s der Flucht überführt!",sendername,giveplayer);
- SendRadioMessage(1,COLOR_LIGHTBLUE, turnmes);
- SendRadioMessage(2,COLOR_LIGHTBLUE, turnmes);
- SendRadioMessage(3,COLOR_LIGHTBLUE, turnmes);
- SendRadioMessage(21,COLOR_LIGHTBLUE, turnmes);
- }
- else if(strcmp(x_job,"attack",true) == 0)
- {
- format(string,sizeof(string), "Officer %s hat dich des Angriffes überführt!", sendername);
- SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
- SetPlayerWantedLevel(giveplayerid,points+1);
- WantedPoints[giveplayerid] += 1;
- WantedLevel[giveplayerid]+=1;
- format(turnmes, sizeof(turnmes), "%s hat %s des Angriffes überführt!",sendername,giveplayer);
- SendRadioMessage(1,COLOR_LIGHTBLUE, turnmes);
- SendRadioMessage(2,COLOR_LIGHTBLUE, turnmes);
- SendRadioMessage(3,COLOR_LIGHTBLUE, turnmes);
- SendRadioMessage(21,COLOR_LIGHTBLUE, turnmes);
- }
- else if(strcmp(x_job,"kill",true) == 0)
- {
- format(string,sizeof(string), "Officer %s hat dich des Mordes überführt!", sendername);
- SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
- SetPlayerWantedLevel(giveplayerid,points+2);
- WantedPoints[giveplayerid] += 2;
- WantedLevel[giveplayerid]+=2;
- format(turnmes, sizeof(turnmes), "%s hat %s des Mordes überführt!",sendername,giveplayer);
- SendRadioMessage(1,COLOR_LIGHTBLUE, turnmes);
- SendRadioMessage(2,COLOR_LIGHTBLUE, turnmes);
- SendRadioMessage(3,COLOR_LIGHTBLUE, turnmes);
- SendRadioMessage(21,COLOR_LIGHTBLUE, turnmes);
- }
- else if(strcmp(x_job,"insult",true) == 0)
- {
- format(string,sizeof(string), "Officer %s hat dich der Beleidigung überführt!", sendername);
- SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
- SetPlayerWantedLevel(giveplayerid,points+1);
- WantedPoints[giveplayerid] += 1;
- WantedLevel[giveplayerid]+=1;
- format(turnmes, sizeof(turnmes), "%s hat %s der Beleidigung überführt!",sendername,giveplayer);
- SendRadioMessage(1,COLOR_LIGHTBLUE, turnmes);
- SendRadioMessage(2,COLOR_LIGHTBLUE, turnmes);
- SendRadioMessage(3,COLOR_LIGHTBLUE, turnmes);
- SendRadioMessage(21,COLOR_LIGHTBLUE, turnmes);
- }
- else if(strcmp(x_job,"damage",true) == 0)
- {
- format(string,sizeof(string), "Officer %s hat dich der Beschädigung eines Fahrzeuges überführt!", sendername);
- SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
- SetPlayerWantedLevel(giveplayerid,points+1);
- WantedLevel[giveplayerid]+=1;
- WantedPoints[giveplayerid] += 1;
- format(turnmes, sizeof(turnmes), "%s hat %s der Beschädigung eines Fahrzeuges überführt!",sendername,giveplayer);
- SendRadioMessage(1,COLOR_LIGHTBLUE, turnmes);
- SendRadioMessage(2,COLOR_LIGHTBLUE, turnmes);
- SendRadioMessage(3,COLOR_LIGHTBLUE, turnmes);
- SendRadioMessage(21,COLOR_LIGHTBLUE, turnmes);
- }
- else if(strcmp(x_job,"decar",true) == 0)
- {
- format(string,sizeof(string), "Officer %s hat dich der Zerstörung eines Fahrzeuges überführt!", sendername);
- SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
- SetPlayerWantedLevel(giveplayerid,points+2);
- WantedLevel[giveplayerid]+=2;
- WantedPoints[giveplayerid] += 2;
- format(turnmes, sizeof(turnmes), "%s hat %s der Zerstörung eines Fahrzeuges überführt!",sendername,giveplayer);
- SendRadioMessage(1,COLOR_LIGHTBLUE, turnmes);
- SendRadioMessage(2,COLOR_LIGHTBLUE, turnmes);
- SendRadioMessage(3,COLOR_LIGHTBLUE, turnmes);
- SendRadioMessage(21,COLOR_LIGHTBLUE, turnmes);
- }
- else if(strcmp(x_job,"car",true) == 0)
- {
- format(string,sizeof(string), "Officer %s hat dich des fahrens ohne Führerschein überführt!", sendername);
- SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
- SetPlayerWantedLevel(giveplayerid,points+1);
- WantedLevel[giveplayerid]+=1;
- WantedPoints[giveplayerid] += 1;
- format(turnmes, sizeof(turnmes), "%s hat %s des fahrens ohne Führerschein überführt!",sendername,giveplayer);
- SendRadioMessage(1,COLOR_LIGHTBLUE, turnmes);
- SendRadioMessage(2,COLOR_LIGHTBLUE, turnmes);
- SendRadioMessage(3,COLOR_LIGHTBLUE, turnmes);
- SendRadioMessage(21,COLOR_LIGHTBLUE, turnmes);
- }
- else if(strcmp(x_job,"bike",true) == 0)
- {
- format(string,sizeof(string), "Officer %s hat dich des fahrens ohne Führerschein überführt!", sendername);
- SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
- SetPlayerWantedLevel(giveplayerid,points+1);
- WantedLevel[giveplayerid]+=1;
- WantedPoints[giveplayerid] += 1;
- format(turnmes, sizeof(turnmes), "%s hat %s des fahrens ohne Führerschein überführt!",sendername,giveplayer);
- SendRadioMessage(1,COLOR_LIGHTBLUE, turnmes);
- SendRadioMessage(2,COLOR_LIGHTBLUE, turnmes);
- SendRadioMessage(3,COLOR_LIGHTBLUE, turnmes);
- SendRadioMessage(21,COLOR_LIGHTBLUE, turnmes);
- }
- else if(strcmp(x_job,"lkw",true) == 0)
- {
- format(string,sizeof(string), "Officer %s hat dich des fahrens ohne Führerschein überführt!", sendername);
- SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
- SetPlayerWantedLevel(giveplayerid,points+1);
- WantedLevel[giveplayerid]+=1;
- WantedPoints[giveplayerid] += 1;
- format(turnmes, sizeof(turnmes), "%s hat %s des fahrens ohne Führerschein überführt!",sendername,giveplayer);
- SendRadioMessage(1,COLOR_LIGHTBLUE, turnmes);
- SendRadioMessage(2,COLOR_LIGHTBLUE, turnmes);
- SendRadioMessage(3,COLOR_LIGHTBLUE, turnmes);
- SendRadioMessage(21,COLOR_LIGHTBLUE, turnmes);
- }
- else if(strcmp(x_job,"fly",true) == 0)
- {
- format(string,sizeof(string), "Officer %s hat dich des fliegens ohne Flugschein überführt!", sendername);
- SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
- SetPlayerWantedLevel(giveplayerid,points+1);
- WantedPoints[giveplayerid] += 1;
- WantedLevel[giveplayerid]+=1;
- format(turnmes, sizeof(turnmes), "%s hat %s des fliegens ohne Flugschein überführt!",sendername,giveplayer);
- SendRadioMessage(1,COLOR_LIGHTBLUE, turnmes);
- SendRadioMessage(2,COLOR_LIGHTBLUE, turnmes);
- SendRadioMessage(3,COLOR_LIGHTBLUE, turnmes);
- SendRadioMessage(21,COLOR_LIGHTBLUE, turnmes);
- }
- else if(strcmp(x_job,"govres",true) == 0)
- {
- format(string,sizeof(string), "Officer %s hat dich des Wiederstand gegen die Staatsgewalt überführt!", sendername);
- SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
- SetPlayerWantedLevel(giveplayerid,points+1);
- WantedPoints[giveplayerid] += 1;
- WantedLevel[giveplayerid]+=1;
- format(turnmes, sizeof(turnmes), "%s hat %s des Wiederstand gegen die Staatsgewalt überführt!",sendername,giveplayer);
- SendRadioMessage(1,COLOR_LIGHTBLUE, turnmes);
- SendRadioMessage(2,COLOR_LIGHTBLUE, turnmes);
- SendRadioMessage(3,COLOR_LIGHTBLUE, turnmes);
- SendRadioMessage(21,COLOR_LIGHTBLUE, turnmes);
- }
- else if(strcmp(x_job,"govobs",true) == 0)
- {
- format(string,sizeof(string), "Officer %s hat dich der Behinderung der Staatsgewalt überführt!", sendername);
- SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
- SetPlayerWantedLevel(giveplayerid,points+1);
- WantedLevel[giveplayerid]+=1;
- WantedPoints[giveplayerid] += 1;
- format(turnmes, sizeof(turnmes), "%s hat %s der Behinderung der Staatsgewalt überführt!",sendername,giveplayer);
- SendRadioMessage(1,COLOR_LIGHTBLUE, turnmes);
- SendRadioMessage(2,COLOR_LIGHTBLUE, turnmes);
- SendRadioMessage(3,COLOR_LIGHTBLUE, turnmes);
- SendRadioMessage(21,COLOR_LIGHTBLUE, turnmes);
- }
- else if(strcmp(x_job,"drugs",true) == 0)
- {
- format(string,sizeof(string), "Officer %s hat dich unter Drogen einfluss überführt!", sendername);
- SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
- SetPlayerWantedLevel(giveplayerid,points+1);
- WantedLevel[giveplayerid]+=1;
- WantedPoints[giveplayerid] += 1;
- format(turnmes, sizeof(turnmes), "%s hat %s unter Drogen einfluss überführt!",sendername,giveplayer);
- SendRadioMessage(1,COLOR_LIGHTBLUE, turnmes);
- SendRadioMessage(2,COLOR_LIGHTBLUE, turnmes);
- SendRadioMessage(3,COLOR_LIGHTBLUE, turnmes);
- SendRadioMessage(21,COLOR_LIGHTBLUE, turnmes);
- }
- else if(strcmp(x_job,"alc",true) == 0)
- {
- format(string,sizeof(string), "Officer %s hat dich beim fahren unter Alkohol einfluss überführt!", sendername);
- SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
- SetPlayerWantedLevel(giveplayerid,points+1);
- WantedPoints[giveplayerid] += 1;
- WantedLevel[giveplayerid]+=1;
- format(turnmes, sizeof(turnmes), "%s hat %s beim fahren unter Alkohol einfluss überführt!",sendername,giveplayer);
- SendRadioMessage(1,COLOR_LIGHTBLUE, turnmes);
- SendRadioMessage(2,COLOR_LIGHTBLUE, turnmes);
- SendRadioMessage(3,COLOR_LIGHTBLUE, turnmes);
- SendRadioMessage(21,COLOR_LIGHTBLUE, turnmes);
- }
- return 1;
- }
- }
- }
- else
- {
- format(string, sizeof(string), "%d ist kein aktiver Spieler.", giveplayerid);
- SendClientMessage(playerid, COLOR_GRAD1, string);
- return 1;
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD2, "Du bist kein Beamter!");
- }
- }
- return 1;
- }
- forward SendRadioMessage(member,color,string[]);
- public SendRadioMessage(member, color, string[])
- {
- for(new i = 0; i <MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(OnDuty[i] == 1)
- {
- if(PlayerInfo[i][pMember] == member || PlayerInfo[i][pLeader] == member)
- {
- SendClientMessage(i, color, string);
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement