[Pomoc]Kradja Novca

Započeo Ljube_Savic, Decembar 22, 2011, 16:36:04 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim:GTA-RP
Detaljan opis problema: Moze li neko da mi da komandu za /steal money npr igrac u dzepu ima 1 000 dolara i ovaj mu ukrade 200, tako nes, i da ima tajmer da ne moze non-stop da pljacka, hvala
Deo skripte:
Neke slike/video za lakse dobivanje pomoci(neobavezno):

   if(strcmp(cmd, "/steal", true) == 0 || strcmp(cmd,"/ukradi",true)==0)
   {
       if(IsPlayerConnected(playerid))
       {
           if(PlayerInfo[playerid][pLeader] == 12 || PlayerInfo[playerid][pMember] == 12 || PlayerInfo[playerid][pLeader] == 8 || PlayerInfo[playerid][pMember] == 8 || PlayerInfo[playerid][pLeader] == 5 || PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pLeader] == 6 || PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pLeader] == 15 || PlayerInfo[playerid][pMember] == 15 || PlayerInfo[playerid][pLeader] == 16 || PlayerInfo[playerid][pMember] == 16)
           {
               if(PlayerInfo[playerid][pRank] < 3)
               {
                   SendClientMessage(playerid, COLOR_GREY, "   Morate biti Rank 3 da biste koristili ovu komandu!");
                   return 1;
               }
               new x_nr[256];
            x_nr = strtok(cmdtext, idx);
            if(!strlen(x_nr)) {
               SendClientMessage(playerid, COLOR_WHITE, "|______________ Ukradi zrtvine stvari_______________|");
               SendClientMessage(playerid, COLOR_WHITE, "Koriscenje: /ukradi [ime stvari] [ID Igraca/Dio Imena]");
                 SendClientMessage(playerid, COLOR_GREY, "Dostupna imena: Telefon, Oruzije, Novac");
               SendClientMessage(playerid, COLOR_WHITE, "|___________________________________________________|");
               return 1;
            }
             if(strcmp(x_nr,"telefon",true) == 0)
            {
                tmp = strtok(cmdtext, idx);
               if(!strlen(tmp)) {
                  SendClientMessage(playerid, COLOR_WHITE, "Koriscenje: /ukradi telefon [ID Igraca/Dio Imena]");
                  return 1;
               }
               giveplayerid = ReturnUser(tmp);
               if(IsPlayerConnected(giveplayerid))
               {
                  if(PlayerTied[giveplayerid] != 1)
                    {
                       SendClientMessage(playerid, COLOR_GREY, "   Igrac mora biti prvo vezan ! ");
                       return 1;
                  }
                   if(giveplayerid != INVALID_PLAYER_ID)
                   {
                       if (ProxDetectorS(3.0, playerid, giveplayerid))
                     {
                         GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
                        GetPlayerName(playerid, sendername, sizeof(sendername));
                         if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GREY, "    Ne mozete sebi ukrasti!"); return 1; }
                          format(string, sizeof(string), "* Ukrali ste %s-u telefon.", giveplayer);
                          SendClientMessage(playerid, COLOR_WHITE, string);
                          format(string, sizeof(string), "* %s vam je ukrao telefon.", sendername);
                        format(string, sizeof(string), "* %s je ukrao telefon %s-u.", sendername ,giveplayer);
                        ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                          SendClientMessage(giveplayerid, COLOR_WHITE, string);
                          PlayerInfo[giveplayerid][pPnumber] = 0;
                     }
                     else
                     {
                         SendClientMessage(playerid, COLOR_GREY, "   Taj igrac nije blizu vas!");
                         return 1;
                     }
                   }
               }
               else
               {
                   SendClientMessage(playerid, COLOR_GREY, "   Igrac je offline!");
                   return 1;
               }
            }
            else if(strcmp(x_nr,"oruzije",true) == 0)
            {
                tmp = strtok(cmdtext, idx);
               if(!strlen(tmp)) {
                  SendClientMessage(playerid, COLOR_WHITE, "Koriscenje: /ukradi oruzije [ID Igraca/Dio Imena]");
                  return 1;
               }
               giveplayerid = ReturnUser(tmp);
               if(IsPlayerConnected(giveplayerid))
               {
                  if(PlayerTied[giveplayerid] != 1)
                    {
                       SendClientMessage(playerid, COLOR_GREY, "   Igrac mora biti prvo vezan ! ");
                       return 1;
                  }
                   if(giveplayerid != INVALID_PLAYER_ID)
                   {
                       if (ProxDetectorS(3.0, playerid, giveplayerid))
                     {
                         GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
                        GetPlayerName(playerid, sendername, sizeof(sendername));
                         if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GREY, "    Ne mozete ukrasti sebi!"); return 1; }
                          format(string, sizeof(string), "* Ukrali ste %s-u oruzije.", giveplayer);
                          SendClientMessage(playerid, COLOR_WHITE, string);
                          format(string, sizeof(string), "* %s vam je ukrao oruzije.", sendername);
                          SendClientMessage(giveplayerid, COLOR_WHITE, string);
                        format(string, sizeof(string), "* %s je ukrao oruzije %s-u.", sendername ,giveplayer);
                        ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                          SafeResetPlayerWeapons(giveplayerid);
                          PlayerInfo[giveplayerid][pGun1] = 0; PlayerInfo[giveplayerid][pAmmo1] = 0;
                          PlayerInfo[giveplayerid][pGun2] = 0; PlayerInfo[giveplayerid][pAmmo2] = 0;
                          PlayerInfo[giveplayerid][pGun3] = 0; PlayerInfo[giveplayerid][pAmmo3] = 0;
                          PlayerInfo[giveplayerid][pGun4] = 0; PlayerInfo[giveplayerid][pAmmo4] = 0;
                       }
                       else
                     {
                         SendClientMessage(playerid, COLOR_GREY, "   Taj igrac nije blizu vas!");
                         return 1;
                     }
                   }
               }
               else
               {
                   SendClientMessage(playerid, COLOR_GREY, "   Igrac je offline!");
                   return 1;
               }
            }
            else if(strcmp(x_nr,"novac",true) == 0)
            {
                tmp = strtok(cmdtext, idx);
               if(!strlen(tmp)) {
                  SendClientMessage(playerid, COLOR_WHITE, "Koriscenje: /ukradi novac [ID Igraca/Dio Imena]");
                  return 1;
               }
               giveplayerid = ReturnUser(tmp);
               if(IsPlayerConnected(giveplayerid))
               {
                  if(PlayerTied[giveplayerid] != 1)
                    {
                       SendClientMessage(playerid, COLOR_GREY, "   Igrac mora biti prvo vezan ! ");
                       return 1;
                  }
                   if(giveplayerid != INVALID_PLAYER_ID)
                   {
                      if(IgracKrade[playerid] != 1)
                      {
                          if (ProxDetectorS(3.0, playerid, giveplayerid))
                        {
                            new pare;
                           pare = GetPlayerMoney(giveplayerid);
                           new cash;
                             cash = (random(pare)/10);
                            GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
                           GetPlayerName(playerid, sendername, sizeof(sendername));
                           if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GREY, "    Ne mozete ukrasti sebi!"); return 1; }
                             format(string, sizeof(string), "* Ukrali ste %s-u %d $.",giveplayer, cash);
                             SendClientMessage(giveplayerid, COLOR_WHITE, string);
                             format(string, sizeof(string), "* %s vam je ukrao %d $.",sendername, cash);
                             SendClientMessage(playerid, COLOR_WHITE, string);
                           format(string, sizeof(string), "* %s je ukrao novac %s-u.", sendername ,giveplayer);
                           ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                           if(cash >= 100000)
                           {
                              SafeGivePlayerMoney(playerid, 100000);
                              SafeGivePlayerMoney(giveplayerid, -100000);
                           }
                           else
                           {
                              SafeGivePlayerMoney(playerid, cash);
                              SafeGivePlayerMoney(giveplayerid, -cash);
                           }
                           IgracKrade[playerid] = 1;
                           kradjatimer = SetTimer("KradjaPara",120000,0);
                        }
                          else
                        {
                            SendClientMessage(playerid, COLOR_GREY, "   Taj igrac nije blizu vas!");
                            return 1;
                        }
                       }
                       else
                     {
                         SendClientMessage(playerid, COLOR_GREY, "   Morate sacekati 10 sec prije ponovnog koristenja te komande!");
                         return 1;
                     }
                   }
               }
               else
               {
                   SendClientMessage(playerid, COLOR_GREY, "   Igrac je offline!");
                   return 1;
               }
            }
            else
            {
               SendClientMessage(playerid, COLOR_GREY, "   Nepoznato ime stvari!");
               return 1;
            }
           }
           else
           {
               SendClientMessage(playerid, COLOR_GREY, "   Niste u organizaciji");
               return 1;
           }
       }
       return 1;
   }

IZBACIVACE TI MOZDA NEKE ERORE POSTAJ IH OVDE DA IH RESIMO :)

D:\ZASAMP~1\SCRIPT~1\BADBOY~1.3D\GAMEMO~1\gtarp.pwn(38853) : error 017: undefined symbol "IgracKrade"
D:\ZASAMP~1\SCRIPT~1\BADBOY~1.3D\GAMEMO~1\gtarp.pwn(38853) : warning 215: expression has no effect
D:\ZASAMP~1\SCRIPT~1\BADBOY~1.3D\GAMEMO~1\gtarp.pwn(38853) : error 001: expected token: ";", but found "]"
D:\ZASAMP~1\SCRIPT~1\BADBOY~1.3D\GAMEMO~1\gtarp.pwn(38853) : error 029: invalid expression, assumed zero
D:\ZASAMP~1\SCRIPT~1\BADBOY~1.3D\GAMEMO~1\gtarp.pwn(38853) : fatal error 107: too many error messages on one line

evo errora

Lukas nemožeš samo tako kopirat iz modova.
"I'm a loser and a user so I don't need no accuser" - Billie Joe Armstrong

Snich

Citat: Ljube_Savic poslato Decembar 22, 2011, 19:13:51 POSLE PODNE
D:\ZASAMP~1\SCRIPT~1\BADBOY~1.3D\GAMEMO~1\gtarp.pwn(38853) : error 017: undefined symbol "IgracKrade"
D:\ZASAMP~1\SCRIPT~1\BADBOY~1.3D\GAMEMO~1\gtarp.pwn(38853) : warning 215: expression has no effect
D:\ZASAMP~1\SCRIPT~1\BADBOY~1.3D\GAMEMO~1\gtarp.pwn(38853) : error 001: expected token: ";", but found "]"
D:\ZASAMP~1\SCRIPT~1\BADBOY~1.3D\GAMEMO~1\gtarp.pwn(38853) : error 029: invalid expression, assumed zero
D:\ZASAMP~1\SCRIPT~1\BADBOY~1.3D\GAMEMO~1\gtarp.pwn(38853) : fatal error 107: too many error messages on one line

evo errora

A evo i rijesenja, pri vrhu skripte dodaj ovako: new IgracKrade[MAX_PLAYERS];
@[BU]Lukas kada dajes komandu, onda postavi sve sto ide uz nju, i vece komande stavljaj u kod!

E hvala puno Snich, nego ima i ovaj error D:\ZASAMP~1\SCRIPT~1\BADBOY~1.3D\GAMEMO~1\gtarp.pwn(38882) : error 017: undefined symbol "kradjatimer"

Citat: Ljube_Savic poslato Decembar 22, 2011, 19:39:50 POSLE PODNE
E hvala puno Snich, nego ima i ovaj error D:\ZASAMP~1\SCRIPT~1\BADBOY~1.3D\GAMEMO~1\gtarp.pwn(38882) : error 017: undefined symbol "kradjatimer"

new kradjatimer;
"I'm a loser and a user so I don't need no accuser" - Billie Joe Armstrong

a sto mi sad izbaci warning D:\ZASAMP~1\SCRIPT~1\BADBOY~1.3D\GAMEMO~1\gtarp.pwn(38887) : warning 204: symbol is assigned a value that is never used: "kradjatimer"

evo i linije kradjatimer = SetTimer("KradjaPara",120000,0);

Snich

na liniji 38887 obrisi "kradjatimer"