|POMOC|CMD:av

17. Mar. 2016. Zaključano
982
pregleda
13
postova
Tommy_Vercetty
4
Shot Caller
17. Mar. 2016.
Skripta koju koristim: Raven's
Detaljan opis problema: ovako napravio sam cmd :av(adminvehicle) i sada kada kucam /av spawna mi auto ali padne mi na glavu , kako da napravim da odma sjednem u auto !
i imam jos jedan prbolem ako hocu da mi ucita ADMINA ime vozila moram kucati 2 puta /av da bi text pisao
Dio skripte:
Neke slike/video za lakse dobivanje pomoci(neobavezno):
CMD:av(playerid, params[])
{
if(PlayerInfo > 0)
{
new Float:X, Float:Y, Float:Z;
    GetPlayerPos(playerid, X, Y, Z);
    if(PlayerInfo == 1)
    {
          AddStaticVehicleEx(560, X, Y, Z+5, 0, 0, 0, 6000);
        new newcar = GetPlayerVehicleID(playerid);
  new vname, string;
  new Float:x,Float:y,Float:z; GetVehiclePos(newcar, x,y,z);
  GetVehicleName(newcar, vname, sizeof(vname));
  format(string,sizeof(string),"{2F5CBC}[Admin([%d]) {FFFFFF}%s {2F5CBC}Vozilo %s",PlayerInfo,GetPlayerNameEx(playerid),vname);
    VoziloLabel = Create3DTextLabel(string, 0, x, y, z, 7, 0, 10);
  Attach3DTextLabelToVehicle(VoziloLabel,newcar,0,0,0);
  LegalGetIn = 1;
PutPlayerInVehicle(playerid, newcar, 0);
    }
    else if(PlayerInfo == 1337)
    {
          AddStaticVehicleEx(411, X, Y, Z+5, 0, 0, 0, 6000);
        new newcar = GetPlayerVehicleID(playerid);
  new vname, string;
  new Float:x,Float:y,Float:z; GetVehiclePos(newcar, x,y,z);
  GetVehicleName(newcar, vname, sizeof(vname));
  format(string,sizeof(string),"{2F5CBC}[Admin([%d]) {FFFFFF}%s {2F5CBC}Vozilo %s",PlayerInfo,GetPlayerNameEx(playerid),vname);
    VoziloLabel = Create3DTextLabel(string, 0, x, y, z, 7, 0, 10);
  Attach3DTextLabelToVehicle(VoziloLabel,newcar,0,0,0);
  LegalGetIn = 1;
PutPlayerInVehicle(playerid, newcar, 0);
    }
    else if(PlayerInfo == 1338)
    {
          AddStaticVehicleEx(451, X, Y, Z+5, 0, 0, 0, 6000);
        new newcar = GetPlayerVehicleID(playerid);
  new vname, string;
  new Float:x,Float:y,Float:z; GetVehiclePos(newcar, x,y,z);
  GetVehicleName(newcar, vname, sizeof(vname));
  format(string,sizeof(string),"{2F5CBC}[Admin([%d]) {FFFFFF}%s {2F5CBC}Vozilo %s",PlayerInfo,GetPlayerNameEx(playerid),vname);
    VoziloLabel = Create3DTextLabel(string, 0, x, y, z, 7, 0, 10);
  Attach3DTextLabelToVehicle(VoziloLabel,newcar,0,0,0);
  LegalGetIn = 1;
PutPlayerInVehicle(playerid, newcar, 0);
    }
    else if(PlayerInfo == 1344)
    {
          AddStaticVehicleEx(415, X, Y, Z+5, 0, 0, 0, 6000);
        new newcar = GetPlayerVehicleID(playerid);
  new vname, string;
  new Float:x,Float:y,Float:z; GetVehiclePos(newcar, x,y,z);
  GetVehicleName(newcar, vname, sizeof(vname));
  format(string,sizeof(string),"{2F5CBC}[Admin([%d]) {FFFFFF}%s {2F5CBC}Vozilo %s",PlayerInfo,GetPlayerNameEx(playerid),vname);
    VoziloLabel = Create3DTextLabel(string, 0, x, y, z, 7, 0, 10);
  Attach3DTextLabelToVehicle(VoziloLabel,newcar,0,0,0);
  LegalGetIn = 1;
PutPlayerInVehicle(playerid, newcar, 0);
    }
    }
else
{
    SCM(playerid, COLOR_LIGHTBLUE, "Niste ovlaÅ¡teni da koristite ovu Komandu!");
}
return 1;
}
znaci da mi ucita ovaj 3d label moram 2 puta kucati /av znaci spavnaju se 2 auta i  onda tek ucita na 1 auto label,i ovdje je stavljeno da me stavi u vozilo ali ne znam u cemu je problem ako moze pomoc
osman2578
7
Underboss
17. Mar. 2016.
CMD:av(playerid, params[])
{
if(PlayerInfo > 0)
{
new Float:X, Float:Y, Float:Z;
    GetPlayerPos(playerid, X, Y, Z);
    if(PlayerInfo == 1)
    {
          new newcar = AddStaticVehicleEx(560, X, Y, Z+5, 0, 0, 0, 6000);
  new vname, string;
  new Float:x,Float:y,Float:z; GetVehiclePos(newcar, x,y,z);
    GetVehicleName(newcar, vname, sizeof(vname));
    format(string,sizeof(string),"{2F5CBC}[Admin([%d]) {FFFFFF}%s {2F5CBC}Vozilo %s",PlayerInfo,GetPlayerNameEx(playerid),vname);
          VoziloLabel = Create3DTextLabel(string, 0, x, y, z, 7, 0, 10);
    Attach3DTextLabelToVehicle(VoziloLabel,newcar,0,0,0);
    LegalGetIn = 1;
      PutPlayerInVehicle(playerid, newcar, 0);
    }
    else if(PlayerInfo == 1337)
    {
          new newcar = AddStaticVehicleEx(411, X, Y, Z+5, 0, 0, 0, 6000);
  new vname, string;
  new Float:x,Float:y,Float:z; GetVehiclePos(newcar, x,y,z);
    GetVehicleName(newcar, vname, sizeof(vname));
    format(string,sizeof(string),"{2F5CBC}[Admin([%d]) {FFFFFF}%s {2F5CBC}Vozilo %s",PlayerInfo,GetPlayerNameEx(playerid),vname);
          VoziloLabel = Create3DTextLabel(string, 0, x, y, z, 7, 0, 10);
    Attach3DTextLabelToVehicle(VoziloLabel,newcar,0,0,0);
    LegalGetIn = 1;
      PutPlayerInVehicle(playerid, newcar, 0);
    }
    else if(PlayerInfo == 1338)
    {
          new newcar = AddStaticVehicleEx(451, X, Y, Z+5, 0, 0, 0, 6000);
  new vname, string;
  new Float:x,Float:y,Float:z; GetVehiclePos(newcar, x,y,z);
    GetVehicleName(newcar, vname, sizeof(vname));
    format(string,sizeof(string),"{2F5CBC}[Admin([%d]) {FFFFFF}%s {2F5CBC}Vozilo %s",PlayerInfo,GetPlayerNameEx(playerid),vname);
          VoziloLabel = Create3DTextLabel(string, 0, x, y, z, 7, 0, 10);
    Attach3DTextLabelToVehicle(VoziloLabel,newcar,0,0,0);
    LegalGetIn = 1;
      PutPlayerInVehicle(playerid, newcar, 0);
    }
    else if(PlayerInfo == 1344)
    {
          new newcar = AddStaticVehicleEx(415, X, Y, Z+5, 0, 0, 0, 6000);
  new vname, string;
  new Float:x,Float:y,Float:z; GetVehiclePos(newcar, x,y,z);
    GetVehicleName(newcar, vname, sizeof(vname));
    format(string,sizeof(string),"{2F5CBC}[Admin([%d]) {FFFFFF}%s {2F5CBC}Vozilo %s",PlayerInfo,GetPlayerNameEx(playerid),vname);
          VoziloLabel = Create3DTextLabel(string, 0, x, y, z, 7, 0, 10);
    Attach3DTextLabelToVehicle(VoziloLabel,newcar,0,0,0);
    LegalGetIn = 1;
      PutPlayerInVehicle(playerid, newcar, 0);
    }
    }
else
{
    SCM(playerid, COLOR_LIGHTBLUE, "Niste ovlaÅ¡teni da koristite ovu Komandu!");
}
return 1;
}
Arkoo
5
Underboss
17. Mar. 2016.
CMD:av(playerid, params[])
{
if(PlayerInfo > 0)
{
    if(PlayerInfo == 1)
    {
                new vozilo1,string,vname;
            new Float:Pos;
        GetPlayerPos(playerid,Pos,Pos,Pos);
SendClientMessage(playerid, -1, "Spawnao si Admin vozilo!");
                vozilo1 = CreateVehicle(560,Pos,Pos,Pos,Pos,random(1),random(1),500);
                LegalGetIn = 1;
PutPlayerInVehicle(playerid,vozilo1,0);
                GetVehicleName(vozilo1 vname, sizeof(vname));
  format(string,sizeof(string),"{2F5CBC}[Admin([%d]) {FFFFFF}%s {2F5CBC}Vozilo %s",PlayerInfo              ,GetPlayerNameEx(playerid),vname);
            new Text3D:avozila;
  Attach3DTextLabelToVehicle(avozila,vozilo1,0,0,0);
                Update3DTextLabelText(avozila, 0x90C9C9FF, "%s",string);
    }
else
{
    SCM(playerid, COLOR_LIGHTBLUE, "Niste ovlaÅ¡teni da koristite ovu Komandu!");
}
return 1;
}

Evo ti mozda bude errora........
Tommy_Vercetty
4
Shot Caller
17. Mar. 2016.
K ROSE wrote on March 17, 2016, 2:00 pm:
CMD:av(playerid, params[])
{
if(PlayerInfo > 0)
{
new Float:X, Float:Y, Float:Z;
    GetPlayerPos(playerid, X, Y, Z);
    if(PlayerInfo == 1)
    {
          new newcar = AddStaticVehicleEx(560, X, Y, Z+5, 0, 0, 0, 6000);
  new vname, string;
  new Float:x,Float:y,Float:z; GetVehiclePos(newcar, x,y,z);
    GetVehicleName(newcar, vname, sizeof(vname));
    format(string,sizeof(string),"{2F5CBC}[Admin([%d]) {FFFFFF}%s {2F5CBC}Vozilo %s",PlayerInfo,GetPlayerNameEx(playerid),vname);
          VoziloLabel = Create3DTextLabel(string, 0, x, y, z, 7, 0, 10);
    Attach3DTextLabelToVehicle(VoziloLabel,newcar,0,0,0);
    LegalGetIn = 1;
      PutPlayerInVehicle(playerid, newcar, 0);
    }
    else if(PlayerInfo == 1337)
    {
          new newcar = AddStaticVehicleEx(411, X, Y, Z+5, 0, 0, 0, 6000);
  new vname, string;
  new Float:x,Float:y,Float:z; GetVehiclePos(newcar, x,y,z);
    GetVehicleName(newcar, vname, sizeof(vname));
    format(string,sizeof(string),"{2F5CBC}[Admin([%d]) {FFFFFF}%s {2F5CBC}Vozilo %s",PlayerInfo,GetPlayerNameEx(playerid),vname);
          VoziloLabel = Create3DTextLabel(string, 0, x, y, z, 7, 0, 10);
    Attach3DTextLabelToVehicle(VoziloLabel,newcar,0,0,0);
    LegalGetIn = 1;
      PutPlayerInVehicle(playerid, newcar, 0);
    }
    else if(PlayerInfo == 1338)
    {
          new newcar = AddStaticVehicleEx(451, X, Y, Z+5, 0, 0, 0, 6000);
  new vname, string;
  new Float:x,Float:y,Float:z; GetVehiclePos(newcar, x,y,z);
    GetVehicleName(newcar, vname, sizeof(vname));
    format(string,sizeof(string),"{2F5CBC}[Admin([%d]) {FFFFFF}%s {2F5CBC}Vozilo %s",PlayerInfo,GetPlayerNameEx(playerid),vname);
          VoziloLabel = Create3DTextLabel(string, 0, x, y, z, 7, 0, 10);
    Attach3DTextLabelToVehicle(VoziloLabel,newcar,0,0,0);
    LegalGetIn = 1;
      PutPlayerInVehicle(playerid, newcar, 0);
    }
    else if(PlayerInfo == 1344)
    {
          new newcar = AddStaticVehicleEx(415, X, Y, Z+5, 0, 0, 0, 6000);
  new vname, string;
  new Float:x,Float:y,Float:z; GetVehiclePos(newcar, x,y,z);
    GetVehicleName(newcar, vname, sizeof(vname));
    format(string,sizeof(string),"{2F5CBC}[Admin([%d]) {FFFFFF}%s {2F5CBC}Vozilo %s",PlayerInfo,GetPlayerNameEx(playerid),vname);
          VoziloLabel = Create3DTextLabel(string, 0, x, y, z, 7, 0, 10);
    Attach3DTextLabelToVehicle(VoziloLabel,newcar,0,0,0);
    LegalGetIn = 1;
      PutPlayerInVehicle(playerid, newcar, 0);
    }
    }
else
{
    SCM(playerid, COLOR_LIGHTBLUE, "Niste ovlaÅ¡teni da koristite ovu Komandu!");
}
return 1;
}
hvala kRose radi , jel mozes da mi pomognes oko komande za unistavanje ovih admin cmd npr cmd da se zove CMD:avd(adminvehicledestroy) 😄 hvala
Letic ツ
4
Shot Caller
17. Mar. 2016.
Napravi PLAYER varijablu i onda:

Vehicle[ playerid ] = CreateVehicle( ... );

//a za brisanje:
DestroyVehicle( Vehicle[ playerid ] ); Vehicle[ playerid ] = -1;
osman2578
7
Underboss
17. Mar. 2016.
YCMD:adv(playerid, params[], help)
{
    #pragma unused params
if(help) return SCM(playerid, COLOR_GREY, "Not supported");

if(PlayerInfo > 0)
{
if(GetPlayerState(playerid) == 2)
{
new newcar = GetPlayerVehicleID(playerid);
SafeRemovePlayerFromVehicle(playerid);
DestroyVehicle(newcar);
}
}
else
{
SCM(playerid, COLOR_LIGHTBLUE, "Niste ovlašteni da koristite ovu komandu !");
}
return 1;
}
Tommy_Vercetty
4
Shot Caller
17. Mar. 2016.
K ROSE wrote on March 17, 2016, 4:16 pm:
YCMD:adv(playerid, params[], help)
{
    #pragma unused params
if(help) return SCM(playerid, COLOR_GREY, "Not supported");

if(PlayerInfo > 0)
{
if(GetPlayerState(playerid) == 2)
{
new newcar = GetPlayerVehicleID(playerid);
SafeRemovePlayerFromVehicle(playerid);
DestroyVehicle(newcar);
}
}
else
{
SCM(playerid, COLOR_LIGHTBLUE, "Niste ovlašteni da koristite ovu komandu !");
}
return 1;
}
Radi , jel mi mozes jo samo u cmd napisati kad stovirm auto : Stvorili ste admin vozilo , a akd ga unistavam : Unistili ste admin vozilo. HVALA K ROSE <3
osman2578
7
Underboss
17. Mar. 2016.
Zar je teško pogledati na wikipediji SendClientMessage funkciju i njene sintakse ?
Isto tako u Skripti imaš gomilu tih funkcija, svaka ta funkcija služi da informiše igraca.
Sada postoje dva nacina kako ces da se informišeš, dali preko stringa ili SendClientMessage.

Ako ceš preko stringa onda tamo gdje stvaraš vozilo staviš ovako:
format(string,sizeof(string),"Ulazite u %s (%d)  Vlasnik: Admin",vname, newcar);
SCM(playerid, COLOR_LIGHTBLUE, string);


A ako neceš preko stringa onda tamo gdje stvaraš vozilo staviš ovako:
SCM(playerid, COLOR_ASKQ, "Stvorili ste Admin Vozilo, da ga uništite kucajte /avd");
PWN|Medis
5
Kingpin
17. Mar. 2016.
Jednostavno
CMD:adv(playerid, params[])
{

if(PlayerInfo > 0)
{
if(GetPlayerState(playerid) == 2)
{
new newcar = GetPlayerVehicleID(playerid);
SafeRemovePlayerFromVehicle(playerid);
DestroyVehicle(newcar);
                        SCM(playerid, CRVENA, "Unistili ste admin vozilo!");
}
}
else
{
SCM(playerid, COLOR_LIGHTBLUE, "Niste ovlašteni da koristite ovu komandu !");
}
return 1;
}


Valjda je to to
Tommy_Vercetty
4
Shot Caller
17. Mar. 2016.
Hvala, ima bug neki npr kada kucam /av ,unistim  kola kucam /veh 522 0 0 (primjer) onda mi ostane label i pise ovako http://prntscr.com/aghwzs
osman2578
7
Underboss
Tommy_Vercetty
4
Shot Caller
17. Mar. 2016.
ovo dodam u cmd ?
MyLabel = Create3DTextLabel(...);

Delete3DTextLabel(MyLabel);
Tommy_Vercetty
4
Shot Caller
17. Mar. 2016.
Rjeseno , hvala k ROSE
Moze lock

Morate biti prijavljeni da biste odgovorili na ovu temu.

Prijava

© 2026 SmartShark. All rights reserved.

Powered by Momentum|v2026.3.001 Alpha