[pomoc]Komanda /respawnallcars

Započeo L.U.X, April 04, 2011, 20:57:48 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 3 gostiju pregledaju ovu temu.

Mod koji korstim:raven's
Problem:Kad ukucam /respawnallcars vozila se raspawnaju ali neka nestanu ima jedan tenk od army  on netane kad neko kupi vozilo ono se spawna na tom id-u i onda ga taj lil nemoze vozit

Eh, kad bi te neko razumeo, mozda bi ti i pomogao, ovako  :-\

pa evo ovak znaci normalno su svi auti spawnani i nakon respawna neki auti nestanu
Poslednja Izmena: April 04, 2011, 21:04:55 POSLE PODNE od Luka_Lučić

Citat: Luka_Lučić poslato April 04, 2011, 21:03:28 POSLE PODNE
pa evo ovak znaci normalno su svi auti spawnani i nakon respawna neki auti nestanu
Daj mi cijelu komandu /respawnallcars da vidimo  ucemu je problem

Citat: Luka_Lu�i� poslato April 04, 2011, 21:03:28 POSLE PODNE
pa evo ovak znaci normalno su svi auti spawnani i nakon respawna neki auti nestanu


daj Komandu /rac /respawnallcars

   if(strcmp(cmd, "/respawnallcars", true) == 0 || strcmp(cmd, "/rac", true) == 0) // by LordMan
   {
       if(IsPlayerConnected(playerid))
       {
           if(PlayerInfo[playerid][pAdmin] < 4)
         {
             SendClientMessage(playerid, COLOR_GRAD1, "** Niste autorizirani za koristenje ove komande!");
             return 1;
         }
         new bool:unwanted[MAX_VEHICLES];
         for(new player=0; player<MAX_PLAYERS; player++)
           {
               if(IsPlayerInAnyVehicle(player)) { unwanted[GetPlayerVehicleID(player)]=true; }
           }
         for(new car = 1; car <= 1850; car++)
         {
            if(!unwanted[car]) SetVehicleToRespawn(car);
         }
         format(string, sizeof(string), "SERVER: %s je raspawno sva nekoristena vozila.", sendername);
         BroadCast(COLOR_WHITE,string);
         format(string, sizeof(string), "[ADMIN]: %s je Respawno sva vozila.", sendername);
         ABroadCast(COLOR_LIGHTRED,string, 5);
         GameTextForAll("~w~Sva nekorstena vozila ~n~~g~Raspawnata!",5000,1);
         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 Respawned All Unused Cars",d,m,y,h,mi,s,sendername);
         AdminLog(string);
      }
      return 1;
   }

Citat: Luka_Lu�i� poslato April 04, 2011, 21:12:17 POSLE PODNE
   if(strcmp(cmd, "/respawnallcars", true) == 0 || strcmp(cmd, "/rac", true) == 0) // by LordMan
   {
       if(IsPlayerConnected(playerid))
       {
           if(PlayerInfo[playerid][pAdmin] < 4)
         {
             SendClientMessage(playerid, COLOR_GRAD1, "** Niste autorizirani za koristenje ove komande!");
             return 1;
         }
         new bool:unwanted[MAX_VEHICLES];
         for(new player=0; player<MAX_PLAYERS; player++)
           {
               if(IsPlayerInAnyVehicle(player)) { unwanted[GetPlayerVehicleID(player)]=true; }
           }
         for(new car = 1; car <= 1850; car++)
         {
            if(!unwanted[car]) SetVehicleToRespawn(car);
         }
         format(string, sizeof(string), "SERVER: %s je raspawno sva nekoristena vozila.", sendername);
         BroadCast(COLOR_WHITE,string);
         format(string, sizeof(string), "[ADMIN]: %s je Respawno sva vozila.", sendername);
         ABroadCast(COLOR_LIGHTRED,string, 5);
         GameTextForAll("~w~Sva nekorstena vozila ~n~~g~Raspawnata!",5000,1);
         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 Respawned All Unused Cars",d,m,y,h,mi,s,sendername);
         AdminLog(string);
      }
      return 1;
   }


Ewo ti ovo uaci umesto toga.


if(strcmp(cmd, "/respawnallcars", true) == 0 || strcmp(cmd, "/rac", true) == 0)
   {
       if(IsPlayerConnected(playerid))
       {
           if(PlayerInfo[playerid][pAdmin] < 3)
         {
             SendClientMessage(playerid, COLOR_GRAD1, "   Niste autorizovani da koristite ovu komandu!");
             return 1;
         }
         new bool:unwanted[CAR_AMOUNT];
         for(new player=0; player<MAX_PLAYERS; player++)
           {
               if(IsPlayerInAnyVehicle(player)) { unwanted[GetPlayerVehicleID(player)]=true; }
           }
         for(new car = 1; car <= 268; car++)
         {
            if(!unwanted[car]) SetVehicleToRespawn(car);
         }
         GetPlayerName(playerid, sendername, sizeof(sendername));
         format(string, sizeof(string), "SERVER: Sva vozila koja se ne koriste su respawano od %s.", sendername);
         BroadCast(COLOR_WHITE,string);
      }
      return 1;
   }


ewo ti ovde umesto onog tvog /rac /respawnallcars ubaci ovaj moj

Code:


if(strcmp(cmd, "/respawnallcars", true) == 0 || strcmp(cmd, "/rac", true) == 0)
   {
       if(IsPlayerConnected(playerid))
       {
           if(PlayerInfo[playerid][pAdmin] < 3)
         {
             SendClientMessage(playerid, COLOR_GRAD1, "   Niste autorizovani da koristite ovu komandu!");
             return 1;
         }
         new bool:unwanted[CAR_AMOUNT];
         for(new player=0; player<MAX_PLAYERS; player++)
           {
               if(IsPlayerInAnyVehicle(player)) { unwanted[GetPlayerVehicleID(player)]=true; }
           }
         for(new car = 1; car <= 268; car++)
         {
            if(!unwanted[car]) SetVehicleToRespawn(car);
         }
         GetPlayerName(playerid, sendername, sizeof(sendername));
         format(string, sizeof(string), "SERVER: Sva vozila koja se ne koriste su respawano od %s.", sendername);
         BroadCast(COLOR_WHITE,string);
      }
      return 1;
   }

Jawi da li radi,!

ne jednostavno koda vozilo nestane

edit: mislim da je do neceg drgog jel nestanu samo tenk,hydra i tako
Poslednja Izmena: April 04, 2011, 22:17:13 POSLE PODNE od Luka_Lučić