[POMOC]Komanda

Započeo caupton
19. Jun 2012.
365
pregleda
4
postova
[Bp]D.N
5
Kingpin
19. Jun 2012.
Skripta koju koristim:GTA:RP
Detaljan opis problema:Nece da kompiluje pawno ne radi sa ovom komandom pravio sam da se pali i gasi neon,u strcmp pa ako neko zna pomoc.Nemojte stavljati ZCMD treba mi vec samo STRCMP.
Dio skripte:
Neke slike/video za lakse dobivanje pomoci(neobavezno):

if (strcmp(cmd, "/neon", true) == 0)
    {
if(!IsPlayerInAnyVehicle(playerid))
{
    SendClientMessage(playerid, COLOR_WHITE, "Nisi u automobilu!");
  return 1;
}
    new VID = GetPlayerVehicleID(playerid);
    if(CarInfo != 0)
    {
        if(strcmp(tmp, "On", true) == 0)
{
    tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
    {
      SendClientMessage(playerid, COLOR_WHITE, "KORISTENJE: /neon On");
return 1;
}
new globalstrings;
            if(Neon == 1) return SendClientMessage(playerid, COLOR_RED, "Na ovom vozilu su vec postavljene neonke!");
              Neon = 1;
              NeonObject1 = CreateObject(CarInfo,0,0,0,0,0,0);
                NeonObject2 = CreateObject(CarInfo,0,0,0,0,0,0);
            AttachObjectToVehicle(NeonObject1, VID, -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
            AttachObjectToVehicle(NeonObject2, VID, 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
                format(globalstrings, sizeof(globalstrings), "* %s pritisce dugme na komodi i postavlja neonke.", ReturnPVarString(playerid, "ImePrezime"));
                ProxDetector(30.0, playerid, globalstrings, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                return 1;
            }
            if(strcmp(tmp, "Off", true) == 0)
{
    tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
    {
      SendClientMessage(playerid, COLOR_WHITE, "KORISTENJE: /neon Off");
return 1;
}
                new globalstrings;
            if(Neon == 0) return SendClientMessage(playerid, COLOR_RED, "Na ovom vozilu neonke nisu postavljene!");
                Neon = 0;
                DestroyObject(NeonObject1);
                DestroyObject(NeonObject2);
                format(globalstrings, sizeof(globalstrings), "* %s pritisce gumb na komodi i uvlaci neonke.", ReturnPVarString(playerid, "ImePrezime"));
                ProxDetector(30.0, playerid, globalstrings, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                return 1;
            }
        default:
            {
                SendClientMessage(playerid, COLOR_RED, "Pogresna akcija! /neon ");
                SendClientMessage(playerid, COLOR_RED, "Akcije: 1 = On, 2 = Off");
            }
        }
    }
    else SendClientMessage(playerid, COLOR_RED, "Nemas ugradjene neonke u ovom automobilu!");
    return 1;
}
danijel123
5
Kingpin
19. Jun 2012.
Probaj ovako...
if (strcmp(cmd, "/neon", true) == 0)
{
if(!IsPlayerInAnyVehicle(playerid))
{
    SendClientMessage(playerid, COLOR_WHITE, "Nisi u automobilu!");
  return 1;
}
    new VID = GetPlayerVehicleID(playerid);
    if(CarInfo != 0)
    {
        if(strcmp(tmp, "On", true) == 0)
{
    tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
    {
      SendClientMessage(playerid, COLOR_WHITE, "KORISTENJE: /neon On");
return 1;
}
new globalstrings;
  if(Neon == 1) return SendClientMessage(playerid, COLOR_RED, "Na ovom vozilu su vec postavljene neonke!");
    Neon = 1;
    NeonObject1 = CreateObject(CarInfo,0,0,0,0,0,0);
      NeonObject2 = CreateObject(CarInfo,0,0,0,0,0,0);
      AttachObjectToVehicle(NeonObject1, VID, -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
      AttachObjectToVehicle(NeonObject2, VID, 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
        format(globalstrings, sizeof(globalstrings), "* %s pritisce dugme na komodi i postavlja neonke.", ReturnPVarString(playerid, "ImePrezime"));
          ProxDetector(30.0, playerid, globalstrings, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
          return 1;
}
  if(strcmp(tmp, "Off", true) == 0)
{
    tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
    {
      SendClientMessage(playerid, COLOR_WHITE, "KORISTENJE: /neon Off");
return 1;
}
  new globalstrings;
    if(Neon == 0) return SendClientMessage(playerid, COLOR_RED, "Na ovom vozilu neonke nisu postavljene!");
  Neon = 0;
      DestroyObject(NeonObject1);
        DestroyObject(NeonObject2);
        format(globalstrings, sizeof(globalstrings), "* %s pritisce gumb na komodi i uvlaci neonke.", ReturnPVarString(playerid, "ImePrezime"));
          ProxDetector(30.0, playerid, globalstrings, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
          return 1;
}
default:
{
  SendClientMessage(playerid, COLOR_RED, "Pogresna akcija! /neon ");
    SendClientMessage(playerid, COLOR_RED, "Akcije: 1 = On, 2 = Off");
      }
}
    else
    {
        SendClientMessage(playerid, COLOR_RED, "Nemas ugradjene neonke u ovom automobilu!");
    }
    return 1;
}
Deleted User
Obrisan korisnik
19. Jun 2012.
Imas visak }....
danijel123
5
Kingpin
19. Jun 2012.
da to sam mu i prepravio  😉

Morate biti prijavljeni da biste odgovorili na ovu temu.

Prijava

© 2026 SmartShark. All rights reserved.

Powered by Momentum|v2026.3.001 Alpha