Balkan SA:MP

PAWN skriptanje, gamemodovi, filterskripte, include fajlovi, mape, pluginovi => Razgovor u vezi PAWN - skriptanja => Temu započeo: BOOM# ツ <3 poslato Novembar 09, 2013, 16:43:41 POSLE PODNE

Naslov: [Pomoc] Destroyveh
Poruka od: BOOM# ツ <3 poslato Novembar 09, 2013, 16:43:41 POSLE PODNE
Skripta koju koristim:LE:RP
Detaljan opis problema:Imam komandu /veh pa mi treba komanda /destroyveh znaci da obrise to auto sto je vehovano
Deo skripte: if(strcmp(cmd, "/veh", true) == 0)
{
    if(UlogovanProvera(playerid))
    {
        if (PlayerInfo[playerid][pAdmin] < 3)
{
    SCM(playerid, COLOR_GRAD1, ""SPLAVA"[BE:RP] "ZUTAA"Niste ovlasceni!");
    return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SCM(playerid, COLOR_GRAD2, "Koristi: /veh [id vozila] [boja1] [boja2]");
return 1;
}
new car;
car = strval(tmp);
if(car < 400 || car > 611) { SCM(playerid, COLOR_GREY, "   ID vozila ne moze biti ispod 400 ili preko 611 !"); return 1; }
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SCM(playerid, COLOR_GRAD2, "Koristi: /veh [id vozila] [boja1] [boja2]");
return 1;
}
new color1;
color1 = strval(tmp);
if(color1 < 0 || color1 > 126) { SCM(playerid, COLOR_GREY, "   ID Boje ne moze biti ispod 0 ili preko 126 !"); return 1; }
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SCM(playerid, COLOR_GRAD2, "Koristi: /veh [id vozila] [boja1] [boja2]");
return 1;
}
new color2;
color2 = strval(tmp);
if(color2 < 0 || color2 > 126) { SCM(playerid, COLOR_GREY, "   ID Boje ne moze biti ispod 0 ili preko 126 !"); return 1; }
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid, X,Y,Z);
new carid = CreateVehicle(car, X,Y,Z, 0.0, color1, color2, 60000);
CreatedCars[CreatedCar] = carid;
CreatedCar ++;
format(string, sizeof(string), "   Vozilo %d je stvoreno.", carid);
SCM(playerid, COLOR_GREY, string);
}
return 1;
}

Neke slike/video za lakse dobivanje pomoci(neobavezno)://
Naslov: Odg: [Pomoc] Destroyveh
Poruka od: Newest Ralph. poslato Novembar 09, 2013, 16:58:41 POSLE PODNE
if(strcmp(cmd, "/dv", true) == 0)
{
  if (PlayerInfo[playerid][pAdmin] >=1)
  {
    new car = strval(strtok(cmdtext, idx));
    if(!car)
{
      SendClientMessage(playerid, -1, "Koristi | /destroyveh [ID]");
      return 1;
    }
    format(string, sizeof(string), "*Ralph: Vozilo %d je destroyano.. Uzivaj.", car);
    SendClientMessage(playerid,-1, string);
    RemovePlayerFromVehicle(car);
    DestroyVehicle(car);
    return 1;
  }
  else
  {
SendClientMessage(playerid,-1,"Niste ovlašćeni!");
  }
  return 1;
}