[POMOC] /destroycars ili /resetvehicles

Započeo ¤EG¤Ovca.ini, Decembar 24, 2011, 20:04:41 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 3 gostiju pregledaju ovu temu.

Skripta koju koristim: BN edit
Detaljan opis problema: Imam komandu /resetvehicles ono da se uniste /veh-ani auti i kad to upisem nece da se zbrisu auti
Dio skripte:evo resetvehicles:   #if defined RESETCARS
CMD:resetvehicles(playerid, params[])
{
if(CallRemoteFunction("IsAdmin","i",playerid)) { ResetAutohausSpawns(); }
   return 1;
}
#endif


Evo /veh: COMMAND:veh(playerid, params[])
{
new string[128], vehid, vehboja1, vehboja2;
if(sscanf(params, "dD(1)D(1)", vehid, vehboja1, vehboja2))
{
if(PlayerInfo[playerid][pAdmin] >= 4)
{
SendClientMessage(playerid, COLOR_GRAD2, "{168BFF}INFO: {959561} /veh [carid] [color1] [color2]");
}
}
else
{
if(PlayerInfo[playerid][pAdmin] >= 4)
{
if(vehboja1 <= 255 || vehboja1 >= 0)
{
if(vehboja2 <= 255|| vehboja2 >= 0)
{
if(vehid > 400 || vehid < 611)
{
new Float:q,Float:w,Float:e;
GetPlayerPos(playerid, q,w,e);
new caride = CreateVehicle ( vehid, q,w,e, 0.0, vehboja1, vehboja2, -1);
SetVehicleNumberPlate(caride, "{FF9999}Spawnano");
SetVehicleToRespawn(caride);
CreatedCars[CreatedCar] = caride;
CreatedCar ++;

format(string, sizeof(string), "   Vozilo %d spawnano.", caride);
SendClientMessage(playerid, COLOR_GREY, string);
}
else return SCM(playerid, COLOR_GREY, "   ID vozila ne smije biti ispod 400 i preko 611 !");
}
else return SCM(playerid, COLOR_GREY, "   ID boje ne smije biti ispod 1 i preko 255 !");
}
else return SCM(playerid, COLOR_GREY, "   ID boje ne smije biti ispod 1 i preko 255 !");
}
else return SCM(playerid, COLOR_GREY, "  Nisi ovlasten !");
}
return 1;
}

Neke slike/video za lakse dobivanje pomoci(neobavezno):
Poslednja Izmena: Decembar 24, 2011, 20:06:23 POSLE PODNE od Krunoslav_Strazer

Join us today! 176.57.128.4:7793

Moji radovi:
[MAP] Burg - http://balkan-samp.com/forum/index.php?topic=28297
[MAP] Salon Brodova i Dock: http://balkan-samp.com/forum/index.php?topic=28260.0

Daj funkciju: ResetAutohausSpawns.

Last nick: Paradox

eo imas ovaj: public ResetAutohausSpawns()
{
new i;
for(i=0; i<sizeof(Buylist); i++) { SetVehicleToRespawn(Buylist[i][Carid]); }
}


i jos onaj foward ResetAutohausSpawns

Join us today! 176.57.128.4:7793

Moji radovi:
[MAP] Burg - http://balkan-samp.com/forum/index.php?topic=28297
[MAP] Salon Brodova i Dock: http://balkan-samp.com/forum/index.php?topic=28260.0

Daj sad ovu funkciju: SetVehicleToRespawn(). :D

Last nick: Paradox

Nemogu nac tu linju jel mozda problem do ovog? public CarRespawn(carid)
{
   for(new i = 0; i < MAX_PLAYERS; i++)
   {
      if(IsPlayerConnected(i))
      {
         if(IsPlayerInVehicle(i, carid) || HireCar == carid)
         {
            gLastDriver[carid] = 300;
            return 0;
         }
      }
   }
   //SetVehicleToRespawn(carid);
   gLastDriver[carid] = 300;
   return 1;
}


Zato jer je tu vidis ovo 4 red odozdo pise u komentaru,jel zbog toga? nezz

Join us today! 176.57.128.4:7793

Moji radovi:
[MAP] Burg - http://balkan-samp.com/forum/index.php?topic=28297
[MAP] Salon Brodova i Dock: http://balkan-samp.com/forum/index.php?topic=28260.0

#if defined RESETCARS
CMD:resetvehicles(playerid, params[])
{
if(CallRemoteFunction("IsAdmin","i",playerid)) { ResetAutohausSpawns(); }
return 1;
}
#endif


To zamijeni ovime:


#if defined RESETCARS
CMD:resetvehicles(playerid, params[])
{
if(CallRemoteFunction("IsAdmin","i",playerid)) { for(new i; i < sizeof(CreatedCars); i++) SetVehicleToRespawn(CreatedCars[i]); }
return 1;
}
#endif

Last nick: Paradox

koliko vidim nema nikakvih errora ni nis, budem sutra pogledao , ako nece radit, onda neznam..

Join us today! 176.57.128.4:7793

Moji radovi:
[MAP] Burg - http://balkan-samp.com/forum/index.php?topic=28297
[MAP] Salon Brodova i Dock: http://balkan-samp.com/forum/index.php?topic=28260.0