[RIJEÅ ENO] Robbank

Započeo Kirali, Oktobar 06, 2016, 03:18:08 PRE PODNE

prethodna tema - sledeća tema

0 članova i 3 gostiju pregledaju ovu temu.

Skripta koju koristim: BE
Detaljan opis problema: Kako da stavim da mogu i bande i mafije da pljackaju nest sam zajebo mogu samo mafie
Dio skripte: [pawn]YCMD:robbank(playerid,params[],help)
{
   #pragma unused help
   if(UlogovanIgrac[playerid] == 0 || PI[playerid][pReg] == 0) return Error(playerid, "Nisi ulogovan/a ili nisi registrovan/a!");
    if(PI[playerid][pServer] < 1 && ACCmd[playerid] == 1) return Error(playerid, "Komande mozete koristiti svake 2 sekunde!");
   CmdProtect(playerid);
   #pragma unused params
   if(UlogovanIgrac[playerid] == 0) return Error(playerid, "Nisi ulogovan!");
   new tmphour;
   gettime(tmphour);
   if(IsPlayerAFK(playerid)) return Error(playerid, "Ne mozete dok ste afk!");
   if(PI[playerid][pRobbing] != 0)
   {
         new sukno[128];
         format(sukno,128,"Moras cekati jos %d min do sledece pljacke!",PI[playerid][pRobbing]);
        Error(playerid, sukno);
         return true;
   }
   if(((tmphour >= 00) && (tmphour <= 09)) && PI[playerid][pServer] < 6) return Error(playerid, "Ne mozete to sada!");
   if(vanrednostanje == 1) return Error(playerid, "U toku je neka veca pljacka, ne mozes sada ovo!");
   if(!IsPlayerInRangeOfPoint(playerid, 1.5, 2023.5404,1172.4589,541.0759) && !IsPlayerInRangeOfPoint(playerid, 1.5, 1441.832519, -1000.523742, 1057.586059) && !IsPlayerInRangeOfPoint(playerid, 1.5, -2059.4841,-9.0787,556.9538)) return Error(playerid, "Nisi u banci.");
   if(IsACop(playerid)) return Error(playerid, "Ti si policajac, ne mozes to.");
   if(BPljacka == 1) return Error(playerid, "Sacekajte malo.");
   if(PI[playerid][pJailed] == 2 || PI[playerid][pJailed] == 3 || PI[playerid][pJailed] == 4) return Error(playerid, "Ne mozes to!");
   if(Pljackas[playerid] == 1) return Error(playerid, "Vec pljackate/ste opljackali nesto, sacekajte malo.");
   if(PI[playerid][pAlat] == 0) return Error(playerid, "Nemas alat.");
   if(!IsAMafija(playerid)) return Error(playerid, "Moras biti mafijas!");
   if(PI[playerid][pJailed] == 2 || PI[playerid][pJailed] == 3 || PI[playerid][pJailed] == 4) return Error(playerid, "Ne mozes to!");
   if(PI[playerid][pLevel] < 4) return Error(playerid, "Moras biti minimalno level 4!");
   if((PI[playerid][pServer] > 0 || PI[playerid][pSupporter] > 0) && PI[playerid][pServer] < 6) return Error(playerid, "Ne mozes to!");
   if(IsPlayerInAnyVehicle(playerid)) return Error(playerid, "Ne mozes to iz vozila!");
   if(GetPlayerWeapon(playerid) >= 22 && GetPlayerWeapon(playerid) <= 40)
   {
       new robanje = random(3)+1;
      if(robanje == 1)
      {
          if(PI[playerid][pWanted] > 9)
          {
            PI[playerid][pWanted] = 10;
          }
            else
          {
               PI[playerid][pWanted] ++;
          }
          lz_SetPlayerWantedLevel(playerid, PI[playerid][pWanted]);
         PocinioZlocin(playerid,255, "Pokusaj pljacke");
         PI[playerid][pRobbing] += 45;
         SCM(playerid, -1, ""COL_BE"BE: {FFFFFF}Pokusali ste da pljackate, ali niste uspeli!");
         PI[playerid][pAlat] = 0;
          return true;
      }
       Orobao[playerid] = 0;
       RobMoney[playerid] += random(10000)+130000;
      PI[playerid][pRobbing] += 300;
      Pljackas[playerid] = 1;
      KillTimer(PljackaAC[playerid]);
      BPljacka = 1;
      if(IsPlayerInRangeOfPoint(playerid, 1.5, 2023.5404,1172.4589,541.0759))
      {
          if(GetPlayerVirtualWorld(playerid) != 0) return Error(playerid, "Nisi u tom VWu!");
          new str1[256];
         format(str1,256,"{FFFFFF}*** {AA3333}UPOZORENJE!! UPOZORENJE!! UPOZORENJE!! {FFFFFF}***");
            SCMTA(0xFFFFFFFF,str1);
            new str2[256];
         format(str2,256,"{FFFFFF}*** {AA3333}NEKO UPRAVO PLJACKA {F81414}SARAJEVSKU BANKU{AA3333}! {FFFFFF}***");
            SCMTA(0xFFFFFFFF,str2);
            new str3[256];
         format(str3,256,"{FFFFFF}*** {AA3333}MOLIMO POLICIJU DA INTERVENISE!!! {FFFFFF}***");
            SCMTA(0xFFFFFFFF,str3);
      }
      else if(IsPlayerInRangeOfPoint(playerid, 1.5, 1441.832519, -1000.523742, 1057.586059))
      {
          if(GetPlayerVirtualWorld(playerid) != 0) return Error(playerid, "Nisi u tom VWu!");
          new str1[256];
         format(str1,256,"{FFFFFF}*** {AA3333}UPOZORENJE!! UPOZORENJE!! UPOZORENJE!! {FFFFFF}***");
            SCMTA(0xFFFFFFFF,str1);
            new str2[256];
         format(str2,256,"{FFFFFF}*** {AA3333}NEKO UPRAVO PLJACKA {F81414}BEOGRADSKU KOMERCIJALNU BANKU{AA3333}! {FFFFFF}***");
            SCMTA(0xFFFFFFFF,str2);
            new str3[256];
         format(str3,256,"{FFFFFF}*** {AA3333}MOLIMO POLICIJU DA INTERVENISE!!! {FFFFFF}***");
            SCMTA(0xFFFFFFFF,str3);
      }
      else if(IsPlayerInRangeOfPoint(playerid, 1.5, -2059.4841,-9.0787,556.9538))
      {
          if(GetPlayerVirtualWorld(playerid) != 10) return Error(playerid, "Nisi u tom VWu!");
          new str1[256];
         format(str1,256,"{FFFFFF}*** {AA3333}UPOZORENJE!! UPOZORENJE!! UPOZORENJE!! {FFFFFF}***");
            SCMTA(0xFFFFFFFF,str1);
            new str2[256];
         format(str2,256,"{FFFFFF}*** {AA3333}NEKO UPRAVO PLJACKA {F81414}ZAGREBACKU BANKU{AA3333}! {FFFFFF}***");
            SCMTA(0xFFFFFFFF,str2);
            new str3[256];
         format(str3,256,"{FFFFFF}*** {AA3333}MOLIMO POLICIJU DA INTERVENISE!!! {FFFFFF}***");
            SCMTA(0xFFFFFFFF,str3);
      }
       SCM(playerid, -1, ""COL_BE"BE: {FFFFFF}Ti sada pljackas banku, sacekaj 10 minuta! (Ako zelis da prestanes da pljackas - /stoprobbery)");
      PljackaVreme[playerid] = 600;
      PljackaAC[playerid] = SetTimerEx("PljackaTest", 1000, true, "i", playerid);
      //lz_TogglePlayerControllable(playerid, 0);
      SetTimerEx("OpetPljacka", 1800000, false, "i", playerid);
      PI[playerid][pAlat] = 0;
      SetTimer("BankaPljackanje", 3000000, 0);
      KillTimer(Vanr);
      Vanr = SetTimer("SkiniVanredno", 240000, 0);
      LoopingAnim(playerid, "BOMBER","BOM_Plant_Loop",4.0,1,0,0,1,0);
      if(PI[playerid][pWanted] > 0)
       {
         PI[playerid][pWanted] = 10;
         }
       else
       {
          PI[playerid][pWanted] += 10;
       }
       lz_SetPlayerWantedLevel(playerid, PI[playerid][pWanted]);
      PocinioZlocin(playerid,255, "Pljacka banke");
      vanrednostanje = 1;
   }
   else
   {
      Error(playerid, "Nemas dobro oruzje.");
   }
   return true;
}[/pawn]
Neke slike/video za lakse dobivanje pomoci(neobavezno):
Poslednja Izmena: Oktobar 07, 2016, 09:58:50 PRE PODNE od Lenonâ„¢



if(!IsAMafija(playerid)) return Error(playerid, "Moras biti mafijas!");

Izbaciš ovu provjeru ili dodaš bandu kako ti je definisano, vjerovatno IsABanda.


[pawn]if(!IsAMafija(playerid)) return Error(playerid, "Moras biti mafijas!");
   if(!IsABanda(playerid)) return Error(playerid, "Moras biti bandit!")[/pawn]


Kako da to stavim u jedno posto mi neradi onda ovo od bande :)

if(!IsAMafija(playerid)) || if(!IsABanda(playerid)) return Error(playerid, "Moras biti bandit!/Mafijas");  // ili umesto || stavi && ali isti je k.

probaj ako ima errora ovo sam grubo uradio :3 nisam testirao tkd nisam siguran

Ima erora :)
[pawn]C:\Users\Msi\Desktop\samp\gamemodes\mod.pwn(123461) : error 029: invalid expression, assumed zero
C:\Users\Msi\Desktop\samp\gamemodes\mod.pwn(123461) : warning 215: expression has no effect
C:\Users\Msi\Desktop\samp\gamemodes\mod.pwn(123461) : error 001: expected token: ";", but found "if"
Pawn compiler 3.2.3664           Copyright (c) 1997-2006, ITB CompuPhase[/pawn]

Naso sam ovakav sistem dali ovo sto imaju idevi dali da tu stavim id orgoba ? bandi i mafia ?

[pawn]forward ClanMafie(playerid);
public ClanMafie(playerid)
{
   if(PlayerInfo[playerid][pMember] == 13 || PlayerInfo[playerid][pMember] == 14 ||  PlayerInfo[playerid][pMember] == 15 || PlayerInfo[playerid][pMember] == 16 || PlayerInfo[playerid][pMember] == 18)
   {
      return 1;
   }
   else if( PlayerInfo[playerid][pLeader] == 13 || PlayerInfo[playerid][pLeader] == 14 || PlayerInfo[playerid][pLeader] == 15 || PlayerInfo[playerid][pLeader] == 16 || PlayerInfo[playerid][pLeader] == 18)
   {
      return 1;
   }
   return 0;
}[/pawn]


Citat: á"•á™"á'ªá"°á™¢á—¢á¯á"°á'•â,,¢ ãƒ,, poslato Oktobar 06, 2016, 12:13:31 POSLE PODNE
if(!IsAMafija(playerid)) || if(!IsABanda(playerid)) return Error(playerid, "Moras biti bandit!/Mafijas");  // ili umesto || stavi && ali isti je k.
Ne treba 2x if

if(!IsAMafija(playerid) || !IsABanda(playerid)) return Error(playerid, "Samo bande i mafije.");

odo sto pise [pMember] == 14  Dali da tu stavim id odroga koje mogu pljackati isto tako na plider ?   

Citat: [F] Muma poslato Oktobar 06, 2016, 12:31:03 POSLE PODNE
Citat: á"•á™"á'ªá"°á™¢á—¢á¯á"°á'•â,,¢ ãƒ,, poslato Oktobar 06, 2016, 12:13:31 POSLE PODNE
if(!IsAMafija(playerid)) || if(!IsABanda(playerid)) return Error(playerid, "Moras biti bandit!/Mafijas");  // ili umesto || stavi && ali isti je k.
Ne treba 2x if

if(!IsAMafija(playerid) || !IsABanda(playerid)) return Error(playerid, "Samo bande i mafije.");
Znam rekao sam da sam grubo radio :D nisam prepravio :)