GPS SYSTEM

Započeo KuJo123, Avgust 28, 2013, 23:30:31 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim:moja neka skripta
Detaljan opis problema:Imam 4 errora evo
C:\Documents and Settings\daco\Desktop\LERP\gamemodes\GPS1.pwn(27) : error 002: only a single statement (or expression) can follow each "case"
C:\Documents and Settings\daco\Desktop\LERP\gamemodes\GPS1.pwn(27 -- 28) : error 028: invalid subscript (not an array or too many subscripts): "listitem"
C:\Documents and Settings\daco\Desktop\LERP\gamemodes\GPS1.pwn(27 -- 29) : error 001: expected token: "}", but found "case"
C:\Documents and Settings\daco\Desktop\LERP\gamemodes\GPS1.pwn(27 -- 29) : fatal error 107: too many error messages on one line

Dio skripte:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(response)
{
switch(dialogid)
{
switch(listitem)
{
case 0:

Neke slike/video za lakse dobivanje pomoci(neobavezno)://
Poslednja Izmena: Avgust 29, 2013, 00:21:51 PRE PODNE od KuJo123

a di ti je taj red kako da ja sad to tražim ? :D
[TuT]-Vozila na posebnog igrača- http://balkan-samp.com/forum/index.php?topic=78806.0 | [FS]-G.P.S- http://balkan-samp.com/forum/index.php?topic=73768.0
[FS]-Rcon Panel- http://balkan-samp.com/forum/index.php?topic=72595.0 | [GM]-Division Street(stari)- http://balkan-samp.com/forum/index.php?topic=78810.0
Citat: magarac poslato Avgust 28, 2013, 18:58:01 POSLE PODNE
Ma jbt ne zelim ja to...... koji k ce mi takva camera di trci okolo......

<script type="text/javascript">
var bannersnack_embed = {"hash":"bxui659h2","width":400,"height":130,"t":1421676936,"userId":16712396,"bgcolor":"#3D3D3D","wmode":"opaque"};
</script>
<script type="text/javascript" src="http://files.bannersnack.com/iframe/embed.js"></script>

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch(dialogid)
{
switch(listitem)
{
case 0:


Stavi ovako mislim da bi ovako tribalo radit


Pa prvo ti treba provjeravat koji je dialog u pitanju, pa onda koje si dugme kliknuo valjda..


public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
   switch(dialogid)
   {
      case 999:
      {
          if(!response) return 1;
          if(response)
          {
              SetPlayerSkin(playerid, 299);
              SendClientMessage(playerid, 0x00AAFFAA, "Dobili ste zeljeni skin!");
         }
      }
      case 1000:
       {
           switch(listitem)
           {
               case 0:
            SendClientMessage(playerid, 0xFFFFFFAA, "You've selected item nr. 1");
            case 1:
            SendClientMessage(playerid, 0xFFFFFFAA, "You've selected item nr. 2");
            case 2:
            SendClientMessage(playerid, 0xFFFFFFAA, "You've selected item nr. 3");
         }
      }
   }
   return 1;
}


Evo ti sema, nez kako da ti drugacije objasnim, probaj skontat samo na taj princip ides i provjeravas iz svojih dijaloga..

Umjesto ovoga
  SetPlayerSkin(playerid, 299);
              SendClientMessage(playerid, 0x00AAFFAA, "Dobili ste zeljeni skin!");

Treba nesto da stavim?

E evo ti cijela FileScripta ja sam nesto cackao i sad ima 2 errora i 2 warnininga (ono sto si mi ti dao je isto imalo 4 errora)
#include <a_samp>

#if defined FILTERSCRIPT
#endif
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/gps", cmdtext, true, 10) == 0)
{
ShowPlayerDialog(playerid,3,DIALOG_STYLE_LIST,"GPS","Banka\nOpstina\nPD Stanica\nAuto Skola\nAuto Pijaca\nLSPD\nFBI\nBolnica\nPS\nNovinari\nTAXI\nThe Escobar Cartel\nGHS\nVagos\nLCN\nGSF\nYakuzaOff GPS","Okay","Exit");
return 1;
}
return 1;
}

public OnPlayerEnterCheckpoint(playerid)
{
        return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
  switch(dialogid)
   {
      case 999:
      {
          if(!response) return 1;
          if(response)
          {
              SetPlayerSkin(playerid, 299);
              SendClientMessage(playerid, 0x00AAFFAA, "Dobili ste zeljeni skin!");
         }
      }
      case 1000:
       {
           switch(listitem)
           {
            case 0:
         SendClientMessage(playerid,0xFFFFFFC8,"GPS namesten na lokaciju BANKA");
>39< SetPlayerCheckpoint(playerid, 1462.8000488281, -1027.3000488281, 23.60000038147, 3.0);
         }
         case 1:
         {
         SendClientMessage(playerid,0xFFFFFFC8,"GPS namesten na lokaciju Opstina");
         SetPlayerCheckpoint(playerid, 1482.0999755859, -1740.5999755859, 13.39999961853, 3.0);
         }
         case 2:
         {
         SendClientMessage(playerid,0xFFFFFFC8,"GPS namesten na lokaciju Pd stanica");
         SetPlayerCheckpoint(playerid, 1534.5999755859, -1674.8000488281, 13.199999809265, 3.0);
         }
         case 3:
         {
         SendClientMessage(playerid,0xFFFFFFC8,"GPS namesten na lokaciju Auto Skola ");
         SetPlayerCheckpoint(playerid, 2055.1999511719, -1924.8000488281, 13.39999961853, 3.0);
         }
         case 4:
         {
         SendClientMessage(playerid,0xFFFFFFC8,"GPS namesten na lokaciju AutoPijaca");
         SetPlayerCheckpoint(playerid, 1637.4000244141, -1148.4000244141, 23.700000762939, 3.0);
         }
         case 5:
         {
         SendClientMessage(playerid,0xFFFFFFC8,"GPS namesten na lokaciju LSPD");
         SetPlayerCheckpoint(playerid, 1534.5999755859, -1674.8000488281, 13.199999809265, 3.0);
         }
         case 6:
         {
         SendClientMessage(playerid,0xFFFFFFC8,"GPS namesten na lokaciju FBI");
         SetPlayerCheckpoint(playerid, 1520.4000244141, -1447.5999755859, 13.300000190735, 3.0);
         }
         case 7:
         {
         SendClientMessage(playerid,0xFFFFFFC8,"GPS namesten na lokaciju Bolnica");
         SetPlayerCheckpoint(playerid, 1184.3000488281, -1323.3000488281, 13.39999961853, 3.0);
         }
         case 8:
         {
         SendClientMessage(playerid,0xFFFFFFC8,"GPS namesten na lokaciju PS");
         SetPlayerCheckpoint(playerid, 1021.4000244141, -947.20001220703, 42.099998474121, 3.0);
         }
         case 9:
         {
         SendClientMessage(playerid,0xFFFFFFC8,"GPS namesten na lokaciju Novinari");
         SetPlayerCheckpoint(playerid, 1785.4000244141, -1288.5999755859, 13.39999961853, 3.0);
         }
         case 10:
         {
         SendClientMessage(playerid,0xFFFFFFC8,"GPS namesten na lokaciju Taxi");
         SetPlayerCheckpoint(playerid, 1269.8000488281, -1843.4000244141, 13.199999809265, 3.0);
         }
         case 11:
         {
         SendClientMessage(playerid,0xFFFFFFC8,"GPS namesten na lokaciju The Escobar Cartel");
         SetPlayerCheckpoint(playerid, 1023.5999755859, -372.60000610352, 73.300003051758, 3.0);
         }
         case 12:
         {
         SendClientMessage(playerid,0xFFFFFFC8,"GPS namesten na lokaciju GHS");
         SetPlayerCheckpoint(playerid, 1296.4000244141, -1055.8000488281, 69.400001525879, 3.0);
         }
         case 13:
         {
         SendClientMessage(playerid,0xFFFFFFC8,"GPS namesten na lokaciju Vagos");
         SetPlayerCheckpoint(playerid, 2598.3000488281, -1055.8000488281, 69.400001525879, 3.0);
         }
         case 14:
         {
         SendClientMessage(playerid,0xFFFFFFC8,"GPS namesten na lokaciju LCN");
         SetPlayerCheckpoint(playerid, 1296.4000244141, -2055.8999023438, 58.200000762939, 3.0);
         }
         case 15:
         {
         SendClientMessage(playerid,0xFFFFFFC8,"GPS namesten na lokaciju GSF");
         SetPlayerCheckpoint(playerid, 2459.6999511719, -1659, 13.10000038147, 3.0);
         }
         case 16:
         {
         SendClientMessage(playerid,0xFFFFFFC8,"GPS namesten na lokaciju Yakuza");
         SetPlayerCheckpoint(playerid, 2818.3000488281, -1584.1999511719, 10.699999809265, 3.0);
         }
         case 17:
         {
         SendClientMessage(playerid,0xFFFFFFC8,"GPS iskljucen!");
         DisablePlayerCheckpoint(playerid);
           }
        }
127}
128 return 1;
  }

I evo ti errori i warnining
C:\Documents and Settings\daco\Desktop\LERP\gamemodes\GPS2.pwn(39) : error 002: only a single statement (or expression) can follow each "case"
C:\Documents and Settings\daco\Desktop\LERP\gamemodes\GPS2.pwn(39) : warning 215: expression has no effect
C:\Documents and Settings\daco\Desktop\LERP\gamemodes\GPS2.pwn(127) : warning 209: function "OnDialogResponse" should return a value
C:\Documents and Settings\daco\Desktop\LERP\gamemodes\GPS2.pwn(128) : error 010: invalid function or declaration

FINO SAM TI OZNACIO LINIJE KOJE DAJU ERRORE  127 I 128 POTRAZI NA KRAJU SKRIPTE OZNACIO SAM IH
Poslednja Izmena: Avgust 29, 2013, 14:26:45 POSLE PODNE od KuJo123

Radis DP
Kad dodjem na komp ti rijesim
[TuT]-Vozila na posebnog igrača- http://balkan-samp.com/forum/index.php?topic=78806.0 | [FS]-G.P.S- http://balkan-samp.com/forum/index.php?topic=73768.0
[FS]-Rcon Panel- http://balkan-samp.com/forum/index.php?topic=72595.0 | [GM]-Division Street(stari)- http://balkan-samp.com/forum/index.php?topic=78810.0
Citat: magarac poslato Avgust 28, 2013, 18:58:01 POSLE PODNE
Ma jbt ne zelim ja to...... koji k ce mi takva camera di trci okolo......

<script type="text/javascript">
var bannersnack_embed = {"hash":"bxui659h2","width":400,"height":130,"t":1421676936,"userId":16712396,"bgcolor":"#3D3D3D","wmode":"opaque"};
</script>
<script type="text/javascript" src="http://files.bannersnack.com/iframe/embed.js"></script>

Napravio sam GPS system ali opet ima problem kad udjem na srw ukucam /gps i sve mi se fino otvori ali kad stisnem npr "Banka" nista se ne desi i nijedna komanda druga mi ne radi pls pomozite mi

Ma ja sam ti dao semu, jednostavno kad stavis provjeru koji item u listi je kliknuo igrac, tu stavi funkciju/e
mora da radi :D

Uradio sam na osnovu falcony-evog gps systema tnx svima,posebno njemu