946
pregleda
3
postova
Axel Nelson
4
Shot Caller
26. Mar. 2011.
Skripta koju koristim: Raven's Roleplay
Detaljan opis problema: Na Raven's Roleplayu je cop sistem skroz razlicit od svih ostalih koje sam koristio modova, nema u garazi /arrest nego ga moras da RPanjem odvedes ispred celija i onda ga /arrest , naravno niko nije lud da RPa svoju kaznu i zatvor,i onda imamo problema kada nema admina, tako ako ima neko prijedlog jer stvarno mi treba pomoc oko toga da mi da neki cop sistem koji radi i koji nije bugovan ko ovaj...i da ovaj izbrisem sa GM-a...,i da /cuff /tazer i /drag rade... a ne kao ovde, Hvala u svakom slucaju...
Dio skripte: //
Neke slike/video za lakse dobivanje pomoci(neobavezno): n/a

Quote
//------------------------------------------------------------------------------------------------------------------------------------------------------------------
if(strcmp(cmd, "/arrest", true) == 0)
  {
      if(IsPlayerConnected(playerid))
        {
        if(IsACop(playerid) || IsAFreecop(playerid))
        {
           if(PlayerInfo == 0)
           {
               SendClientMessage(playerid, COLOR_GREY, "** Nisi na duznosti!");
               return 1;
           }
           if(PlayerInfo == 1)
           {
               SendClientMessage(playerid, COLOR_GREY, "** Banan si sa duznosti!");
               return 1;
           }

           if(IsPlayerInRangeOfPoint(playerid, 6, 255.4480,85.8236,1002.4453))
           {//New arrest system SAPD

              tmp = strtok(cmdtext, idx);
              if(!strlen(tmp))
              {
                 SendClientMessage(playerid, COLOR_GRAD2, "KORISTI: /arrest [time (minutes)] [bail (0=no 1=yes)] ");
                 return 1;
              }
              moneys = strval(tmp);
              if(moneys < 1 || moneys > 20000) { SendClientMessage(playerid, COLOR_GREY, "   Jail Price can't be below $1 or above $20000!"); return 1; }
              tmp = strtok(cmdtext, idx);
              if(!strlen(tmp))
              {
                 SendClientMessage(playerid, COLOR_GRAD2, "KORISTI: /arrest [time (minutes)] [bail (0=no 1=yes)] ");
                 return 1;
              }
              new time = strval(tmp);
              if(time < 1 || time > 5) { SendClientMessage(playerid, COLOR_GREY, "   Jail Time Minutes can't be below 1 or above 5 (Take the person to prison then)!"); return 1; }
              tmp = strtok(cmdtext, idx);
              if(!strlen(tmp))
              {
                 SendClientMessage(playerid, COLOR_GRAD2, "KORISTI: /arrest [time (minutes)] [bail (0=no 1=yes)] ");
                 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, "KORISTI: /arrest [time (minutes)] [bail (0=no 1=yes)] ");
                 return 1;
              }
              new bailprice = strval(tmp);
              if(bailprice < 0 || bailprice > 2000000) { SendClientMessage(playerid, COLOR_GREY, "** Jail Bailing can't be below $0 or above $2000000!"); return 1; }
              new suspect = GetClosestPlayer(playerid);
              if(IsPlayerConnected(suspect))
              {
                 if(GetDistanceBetweenPlayers(playerid,suspect) < 5)
                 {
                    GetPlayerName(suspect, giveplayer, sizeof(giveplayer));

                    if(WantedLevel < 1)
                    {
                        SendClientMessage(playerid, COLOR_GREY, "** Player must be at least Wanted Level 1!");
                        return 1;
                    }
                    format(string, sizeof(string), "* Uhapsio si %s!", giveplayer);
                    SendClientMessage(playerid, COLOR_WHITE, string);
                    SafeGivePlayerMoney(suspect, -moneys);
                    format(string, sizeof(string), "Uhapsen od %s ~n~    za $%d", sendername, moneys);
                    GameTextForPlayer(suspect, string, 5000, 5);
                    SafeResetPlayerWeapons(suspect);
                    if(PlayerInfo==1||PlayerInfo==1)
                    {
                        new currank;
                        if(PlayerInfo == 1) { currank = "Cadet"; }
                       else if(PlayerInfo == 2) { currank = "Officer"; }
                       else if(PlayerInfo == 3) { currank = "Senior Officer"; }
                       else if(PlayerInfo == 4) { currank = "Sergeant"; }
                       else if(PlayerInfo == 5) { currank = "Lieutenant"; }
                         else if(PlayerInfo == 6) { currank = "Captain"; }
                         else if(PlayerInfo == 7) { currank = "Deputy Chief"; }
                         else if(PlayerInfo ==  { currank = "Chief"; }
                       else { currank = "Cadet"; }
                       format(string, sizeof(string), " %s %s has just arrested %s", currank ,sendername, giveplayer);
                       OOCNews(COLOR_BLUE, string);
                    }
                    else if(PlayerInfo==2||PlayerInfo==2)
                    {
                       format(string, sizeof(string), " Agent %s has just arrested %s", sendername, giveplayer);
                       OOCNews(COLOR_BLUE, string);
                    }
                    else if(PlayerInfo==3||PlayerInfo==3)
                    {
                       format(string, sizeof(string), " Soldier %s has just arrested %s", sendername, giveplayer);
                       OOCNews(COLOR_BLUE, string);
                    }
                    else if(IsAFreecop(playerid))
                    {
                        format(string, sizeof(string), " Voluntary %s has just arrested %s", sendername, giveplayer);
                       OOCNews(COLOR_BLUE, string);
                    }
                    SafeSetPlayerInterior(suspect, 6);
                    SafeSetPlayerPos(suspect,264.6288,77.5742,1001.0391);
                    PlayerInfo = time * 60;
                    if(bail == 1)
                    {
                       JailPrice = bailprice;
                       format(string, sizeof(string), "You are jailed for %d seconds.   Bail: $%d", PlayerInfo, JailPrice);
                       SendClientMessage(suspect, COLOR_WHITE, string);
                    }
                    else
                    {
                        JailPrice = 0;
                       format(string, sizeof(string), "You are jailed for %d seconds.   Bail: Unable", PlayerInfo);
                       SendClientMessage(suspect, COLOR_WHITE, string);
                    }
                    PlayerInfo = 1;
                         PlayerInfo += 1;
                    SetPlayerFree(suspect,playerid, "Got Arrested");
                    TextDrawShowForPlayer(suspect, Textdraw1);
                    WantedPoints = 0;
                    WantedLevel = 0;
                    WantLawyer = 1;
                    PlayerCuffed = 0;
                    GaveUp = 0;
                    new y, m, d;
                    new h,mi,s;
                    getdate(y,m,d);
                    gettime(h,mi,s);
                    format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s Has Arrested %s for %s Seconds. Bail: $%d, Price: $%d",d,m,y,h,mi,s,sendername,giveplayer, PlayerInfo,JailPrice,moneys);
                    JailLog(string);
                 }//distance
              }//not connected
           }
        }
        else
        {
            SendClientMessage(playerid, COLOR_GREY, "** You are not an FBI!");
            return 1;
        }
     }//not connected
     return 1;
  }
//------------------------------------------------------------------------------------------------------------------------------------------------------------------


[Admini molim vas izbrisite ovaj post... --->
http://balkan-samp.com/forum/index.php?topic=21943.0]

Edit: Nasao sam sistem koji nije bugovan  i evo ga dole, ali mi error izbaci...

Quote
//-----------------------------Novi sistem hapsenja-------------------------------------------------------------------------------------------------------------------------------------
if(strcmp(cmd, "/arrest", true) == 0)
{
    if(IsPlayerConnected(playerid))
  {
if(gTeam == 2  || IsACop(playerid))
{
if(OnDuty != 1 && PlayerInfo == 1)
{
    SendClientMessage(playerid, COLOR_GREY, "  You are not on Duty!");
    return 1;
}
        /*if(!PlayerToPoint(6.0, playerid, 268.3327,77.8972,1001.0391) || !PlayerToPoint(15.0, playerid,1537.2515,-1674.9572,13.382😎)
{// Jail spot
    SendClientMessage(playerid, COLOR_GREY, "  You are not near the Jail, can't Arrest!");
    return 1;
}*/

if(PlayerToPoint(6.0, playerid, 268.3327,77.8972,1001.0391) || PlayerToPoint(15.0, playerid,1537.2515,-1674.9572,13.382😎 || PlayerToPoint(6.0, playerid, 1528.9080,-1678.0759,5.8906))
{//New arrest system

tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Koristenje: /arrest [time (minutes)] [bail (0=no 1=yes)] ");
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, "Koristenje: /arrest [time (minutes)] [bail (0=no 1=yes)] ");
return 1;
}
new time = strval(tmp);
if(time < 1 || time > 60) { 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, "Koristenje: /arrest [time (minutes)] [bail (0=no 1=yes)] ");
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, "Koristenje: /arrest [time (minutes)] [bail (0=no 1=yes)] ");
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 < 1)
{
    SendClientMessage(playerid, COLOR_GREY, "  Player must be at least Wanted Level 1!");
    return 1;
}
format(string, sizeof(string), "* You arrested %s!", giveplayer);
SendClientMessage(playerid, COLOR_WHITE, string);
SafeGivePlayerMoney(suspect, -moneys);
format(string, sizeof(string), "arrested by %s ~n~    for $%d", sendername, moneys);
GameTextForPlayer(suspect, string, 5000, 5);
SafeResetPlayerWeapons(suspect);
if(PlayerInfo==1||PlayerInfo==1)
{
    new currank;
    if(PlayerInfo == 1) { currank = "Cadet"; }
else if(PlayerInfo == 2) { currank = "Police Officer"; }
else if(PlayerInfo == 3) { currank = "Corporal"; }
else if(PlayerInfo == 4) { currank = "Sergeant"; }
else if(PlayerInfo == 5) { currank = "Lieutenant"; }
        else if(PlayerInfo == 6) { currank = "Captain"; }
        else if(PlayerInfo == 7) { currank = "Deputy Chief"; }
        else if(PlayerInfo == 😎 { currank = "Chief"; }
else { currank = "Cadet"; }
format(string, sizeof(string), " %s %s has just arrested %s", currank ,sendername, giveplayer);
OOCNews(COLOR_BLUE, string);
}
else if(PlayerInfo==2||PlayerInfo==2)
{
format(string, sizeof(string), " Agent %s has just arrested %s", sendername, giveplayer);
OOCNews(COLOR_BLUE, string);
}
SetPlayerInterior(suspect, 6);
SetPlayerPos(suspect,264.6288,77.5742,1001.0391);
PlayerInfo = time * 60;
if(bail == 1)
{
JailPrice = bailprice;
format(string, sizeof(string), "You are jailed for %d seconds.  Bail: $%d", PlayerInfo, JailPrice);
SendClientMessage(suspect, COLOR_WHITE, string);
}
else
{
    JailPrice = 0;
format(string, sizeof(string), "You are jailed for %d seconds.  Bail: Unable", PlayerInfo);
SendClientMessage(suspect, COLOR_WHITE, string);
}
PlayerInfo = 1;
      PlayerInfo += 1;
SetPlayerFree(suspect,playerid, "Got Arrested");
WantedPoints = 0;
WantedLevel = 0;
WantLawyer = 1;
}//distance
}//not connected
else
{
    SendClientMessage(playerid, COLOR_GREY, "  No-one close enough to arrest.");
    return 1;
}
}
else
{
    SendClientMessage(playerid, COLOR_GREY, "  You're not in the jail spot.");
    return 1;
}
}
else
{
    SendClientMessage(playerid, COLOR_GREY, "  You are not a Cop / FBI!");
    return 1;
}
}//not connected
return 1;
}
//------------------------------------------------------------------------------------------------------------------------------------------------------------------


Error:
Quote
C:\Documents and Settings\Muharem Tvrtkovic\Desktop\- GIGAtech Rol3Play -\v3.0\gamemodes\larp.pwn(71556) : error 017: undefined symbol "PlayerToPoint"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase

1 Error.
FlasHica
5
Kingpin
26. Mar. 2011.
Zasto otvaras duple teme??
Axel Nelson
4
Shot Caller
26. Mar. 2011.
jarane jesi corav napisao sam da admin zatvori onu...

Morate biti prijavljeni da biste odgovorili na ovu temu.

Prijava

© 2026 SmartShark. All rights reserved.

Powered by Momentum|v2026.3.001 Alpha