SA-MP Forums Archive
/suspect And /arrest problems - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: /suspect And /arrest problems (/showthread.php?tid=70608)



/suspect And /arrest problems - Jaztek_Hodzic - 26.03.2009

Hey Guys When i /su someone then arrest there stars dont go away....

how can i make this?


Re: /suspect And /arrest problems - 56avenue - 26.03.2009

Could we see the code?
or you could just try SetPlayerWantedLevel(playerid,0);


Re: /suspect And /arrest problems - MenaceX^ - 26.03.2009

If it's for Godfather don't show the code at all, post in GF's topic.


Re: /suspect And /arrest problems - T1CKLE - 26.03.2009

Quote:
Originally Posted by MenaceX^
If it's for Godfather don't show the code at all, post in GF's topic.
Even if it is.. He can ask here if he wants to.


Re: /suspect And /arrest problems - Jaztek_Hodzic - 26.03.2009

i just put in full arrest code if thatsk .

pawn Код:
if(strcmp(cmd, "/arrest", true) == 0)
    {
      if(IsPlayerConnected(playerid))
        {
            if(gTeam[playerid] == 2 || IsACop(playerid) || PlayerInfo[playerid][pAdmin] == 5 || PlayerInfo[playerid][pAdmin] == 1338)
            {
                if(OnDuty[playerid] != 1 && PlayerInfo[playerid][pMember] == 1)
                {
                  SendClientMessage(playerid, COLOR_GREY, "  You are not on Duty!");
                  return 1;
                }
            if(!PlayerToPoint(6.0, playerid, 1528.8412,-1678.1052,5.8906))
                {// Jail spot
                  SendClientMessage(playerid, COLOR_GREY, "  You are not near the Jail, can't Arrest !");
                  return 1;
                }
                tmp = strtok(cmdtext, idx);
                if(!strlen(tmp))
                {
                    SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /arrest [price] [time (minutes)] [bail (0=no 1=yes)] [bailprice]");
                    return 1;
                }
                moneys = strval(tmp);
                if(moneys < 1 || moneys > 99999) { SendClientMessage(playerid, COLOR_GREY, "  Jail Price can't be below $1 or above $99999 !"); return 1; }
                tmp = strtok(cmdtext, idx);
                if(!strlen(tmp))
                {
                    SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /arrest [price] [time (minutes)] [bail (0=no 1=yes)] [bailprice]");
                    return 1;
                }
                new time = strval(tmp);
                if(time < 1 || time > 20) { SendClientMessage(playerid, COLOR_GREY, "  Jail Time Minutes can't be below 1 or above 20 (Take the person to prison then) !"); return 1; }
                tmp = strtok(cmdtext, idx);
                if(!strlen(tmp))
                {
                    SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /arrest [price] [time (minutes)] [bail (0=no 1=yes)] [bailprice]");
                    return 1;
                }
                new bail = strval(tmp);
                if(bail < 0 || bail > 1) { SendClientMessage(playerid, COLOR_GREY, "  Jail Bailing can't be below 0 or above 1 !"); return 1; }
                tmp = strtok(cmdtext, idx);
                if(!strlen(tmp))
                {
                    SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /arrest [price] [time (minutes)] [bail (0=no 1=yes)] [bailprice]");
                    return 1;
                }
                new bailprice = strval(tmp);
                if(bailprice < 0 || bailprice > 3000000) { SendClientMessage(playerid, COLOR_GREY, "  Jail Bailing can't be below $0 or above $3000000 !"); 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, "  Player must be at least Wanted Level 1 !");
                          return 1;
                        }
                        new reward = random(18120);
                        format(string, sizeof(string), "* You arrested %s !", giveplayer);
                        SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
                        format(string, sizeof(string), "* You have been rewarded with %s !", reward);
                        SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
                        GivePlayerMoney(playerid, reward);
                        GivePlayerMoney(suspect, -moneys);
                        format(string, sizeof(string), "arrested by %s ~n~  for $%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 arrested suspect %s >>", sendername, giveplayer);
                            OOCNews(COLOR_LIGHTRED, string);
                        }
                        else if(PlayerInfo[playerid][pMember]==2||PlayerInfo[playerid][pLeader]==2)
                        {
                            format(string, sizeof(string), "<< FBI Agent %s arrested suspect %s >>", sendername, giveplayer);
                            OOCNews(COLOR_LIGHTRED, string);
                        }
                        else if(PlayerInfo[playerid][pMember]==3||PlayerInfo[playerid][pLeader]==3)
                        {
                            format(string, sizeof(string), "<< Soldier %s arrested suspect %s >>", sendername, giveplayer);
                            OOCNews(COLOR_LIGHTRED, string);
                        }
                        SetPlayerInterior(suspect, 6);
                        TogglePlayerControllable(suspect, 1);
                        SetPlayerPos(suspect,264.6288,77.5742,1001.0391);
                        PlayerInfo[suspect][pJailTime] = time * 60;
                        if(bail == 1)
                        {
                            JailPrice[suspect] = bailprice;
                            format(string, sizeof(string), "You are jailed for %d seconds.  Bail: $%d", PlayerInfo[suspect][pJailTime], JailPrice[suspect]);
                            SendClientMessage(suspect, COLOR_LIGHTBLUE, string);
                        }
                        else
                        {
                          JailPrice[suspect] = 0;
                            format(string, sizeof(string), "You are jailed for %d seconds.  Bail: Unable", PlayerInfo[suspect][pJailTime]);
                            SendClientMessage(suspect, COLOR_LIGHTBLUE, string);
                        }
                        PlayerInfo[suspect][pJailed] = 1;
                    PlayerInfo[suspect][pArrested] += 1;
                        SetPlayerFree(suspect,playerid, "Got Arrested");
                        WantedPoints[suspect] = 0;
                        WantedLevel[suspect] = 0;
                        WantLawyer[suspect] = 1;



Re: /suspect And /arrest problems - 56avenue - 26.03.2009

Quote:
Originally Posted by SilverAlien
Quote:
Originally Posted by MenaceX^
If it's for Godfather don't show the code at all, post in GF's topic.
Even if it is.. He can ask here if he wants to.
No. All questions about GF scripts are to go in the GF topic.
And that does look like the GF script


Re: /suspect And /arrest problems - MenaceX^ - 26.03.2009

Quote:
Originally Posted by SilverAlien
Quote:
Originally Posted by MenaceX^
If it's for Godfather don't show the code at all, post in GF's topic.
Even if it is.. He can ask here if he wants to.
This forum has rules. You better read them.


Eric Akito,

Like I thought, it's godfather. Go to Godfather's topic.


Re: /suspect And /arrest problems - Jaztek_Hodzic - 26.03.2009

im not sure if it is... well if u guys think then ok..
but i edited Wasted Roleplay. :S


thanks aniwaiz.