[Pomoc] GPS

Započeo Tong1950Po
8. Jan. 2012. Zaključano
1,311
pregleda
18
postova
Hail
4
Made Man
8. Jan. 2012.
Koji gamemod koristite?: CLRP
Koje vam se greške javljaju u skripti?: Vako sad sam GPS stavija u dialog ne izbaciva mi errore i nista nego! Kad udem na server i upisem /gps Izbaci mi Lokavija ja naprimjer izaberem "Bolnica" a meni nema crvenog markera
}
if(strcmp("/gps 1", cmdtext, true) == 0) //provjerava dali je igrac upisao komandu za gps do policije
  {
      SetPlayerCheckpoint(playerid,1481.0273,-1770.5774,18.7958,3.0);
      SendClientMessage(playerid, zuta, "GPS: Namjestili ste vaÅ¡u GPS lokaciju na Vijecnicu!");
      return 1; //Ukoliko vam je to zadnja GPS lokacija, stavite 0 inace ce viti problema
  }

if(strcmp("/gps 2", cmdtext, true) == 0) //provjerava dali je igrac upisao komandu za gps do policije
  {
      SetPlayerCheckpoint(playerid,1462.0543,-1011.3368,26.8438,3.0);
      SendClientMessage(playerid, zuta, "GPS: Namjestili ste vaÅ¡u GPS lokaciju na Banku!");
      return 1; //Ukoliko vam je to zadnja GPS lokacija, stavite 0 inace ce viti problema
  }

if(strcmp("/gps 3", cmdtext, true) == 0) //provjerava dali je igrac upisao komandu za gps do policije
  {
     SetPlayerCheckpoint(playerid,1172.8307,-1323.3011,15.4001,3.0);
     SendClientMessage(playerid, zuta, "GPS: Namjestili ste vaÅ¡u GPS lokaciju na Bolnicu!");
     return 1; //Ukoliko vam je to zadnja GPS lokacija, stavite 0 inace ce viti problema
  }

if(strcmp("/gps 4", cmdtext, true) == 0) //provjerava dali je igrac upisao komandu za gps do policije
  {
     SetPlayerCheckpoint(playerid,2154.4404,-1181.2894,23.3944,3.0);
     SendClientMessage(playerid, zuta, "GPS: Namjestili ste vaÅ¡u GPS lokaciju na Autosalon!");
     return 1; //Ukoliko vam je to zadnja GPS lokacija, stavite 0 inace ce viti problema
  }

if(strcmp("/gps 5", cmdtext, true) == 0) //provjerava dali je igrac upisao komandu za gps do policije
  {
     SetPlayerCheckpoint(playerid,1216.4042,-915.5415,42.9203,3.0);
     SendClientMessage(playerid, zuta, "GPS: Namjestili ste vaÅ¡u GPS lokaciju na Burg!");
     return 1; //Ukoliko vam je to zadnja GPS lokacija, stavite 0 inace ce viti problema
  }

if(strcmp("/gps 6", cmdtext, true) == 0) //provjerava dali je igrac upisao komandu za gps do policije
{
    SetPlayerCheckpoint(playerid,1553.7538,-1675.4840,16.1953,3.0); //(Pozicija:x,Pozicija:y,Pozicija:z,Velicina markera)
    SendClientMessage(playerid, zuta, "GPS: Namjestili ste vaÅ¡u GPS lokaciju na Policiju!");
    return 1;
}

if(strcmp("/gps", cmdtext, true) == 0) //provjerava dali je igrac upisao odredenu komandu
{
    ShowPlayerDialog(playerid,31,DIALOG_STYLE_LIST, "GPS", "Vijecnica\nBanka\nBolnica\nAutosalon\nBurg\nPolicija", "Odaberi", "Odustani");
    return 1;
}

Dio skripte na kojim se javljaju greške?:
Deleted User
Obrisan korisnik
8. Jan. 2012.
A napravio pod public OnDialogResponse ?
Hail
4
Made Man
8. Jan. 2012.
Nisam nista samo sam doda da bude u dialog? ali sta triba dodat?
Deleted User
Obrisan korisnik
8. Jan. 2012.
Tong1950Po wrote on January 8, 2012, 9:38 pm:
Nisam nista samo sam doda da bude u dialog? ali sta triba dodat?

Prouci onda ovo: http://wiki.sa-mp.com/wiki/OnDialogResponse
Pa ako ne znas javi
Luis
5
Godfather
8. Jan. 2012.
Tong1950Po wrote on January 8, 2012, 9:38 pm:
Nisam nista samo sam doda da bude u dialog? ali sta triba dodat?

pa trebas pod OnDialogResponse napraviti dialog ..
Hail
4
Made Man
8. Jan. 2012.
Tu mi i stoji :S! Ja napisem /gps Meni izbaci lokacije Ja izaberem naprimjer "KOlodvor" stisnem "u redu" nema mi onog crvenog markera!
Luis
5
Godfather
8. Jan. 2012.
da ali moras napraviti dialog pod koji si stavio ovako nesto :
if(dialogid == 31)
{
if(response)
{
switch(listitem)
{
case 0:
{
            //tvoj kod da postavi CP
}
case 1:
{
            //tvoj kod da postavi CP
}
case 2:
{
                                                      //tvoj kod da postavi CP
}
itd... stavljas dalje case 3; i sl..
Hail
4
Made Man
9. Jan. 2012.
Quote from January 8, 2012, 10:02 pm:
da ali moras napraviti dialog pod koji si stavio ovako nesto :
if(dialogid == 31)
{
if(response)
{
switch(listitem)
{
case 0:
{
            //tvoj kod da postavi CP
}
case 1:
{
            //tvoj kod da postavi CP
}
case 2:
{
                                                      //tvoj kod da postavi CP
}
itd... stavljas dalje case 3; i sl..


Di da to dodam ?
Cile
4
Made Man
9. Jan. 2012.
pa gdje si to sad napravio
pod OnDialogResponse
ali to izbrisi sto si prije pravio
Hail
4
Made Man
9. Jan. 2012.
Quote from January 9, 2012, 8:56 am:
pa gdje si to sad napravio
pod OnDialogResponse
ali to izbrisi sto si prije pravio


Mislis da s ovim zaminem
}
if(strcmp("/gps 1", cmdtext, true) == 0) //provjerava dali je igrac upisao komandu za gps do policije
  {
      SetPlayerCheckpoint(playerid,1481.0273,-1770.5774,18.7958,3.0);
      SendClientMessage(playerid, zuta, "GPS: Namjestili ste vaÅ¡u GPS lokaciju na Vijecnicu!");
      return 1; //Ukoliko vam je to zadnja GPS lokacija, stavite 0 inace ce viti problema
  }

if(strcmp("/gps 2", cmdtext, true) == 0) //provjerava dali je igrac upisao komandu za gps do policije
  {
      SetPlayerCheckpoint(playerid,1462.0543,-1011.3368,26.8438,3.0);
      SendClientMessage(playerid, zuta, "GPS: Namjestili ste vaÅ¡u GPS lokaciju na Banku!");
      return 1; //Ukoliko vam je to zadnja GPS lokacija, stavite 0 inace ce viti problema
  }

if(strcmp("/gps 3", cmdtext, true) == 0) //provjerava dali je igrac upisao komandu za gps do policije
  {
      SetPlayerCheckpoint(playerid,1172.8307,-1323.3011,15.4001,3.0);
      SendClientMessage(playerid, zuta, "GPS: Namjestili ste vaÅ¡u GPS lokaciju na Bolnicu!");
      return 1; //Ukoliko vam je to zadnja GPS lokacija, stavite 0 inace ce viti problema
  }

if(strcmp("/gps 4", cmdtext, true) == 0) //provjerava dali je igrac upisao komandu za gps do policije
  {
      SetPlayerCheckpoint(playerid,2154.4404,-1181.2894,23.3944,3.0);
      SendClientMessage(playerid, zuta, "GPS: Namjestili ste vaÅ¡u GPS lokaciju na Autosalon!");
      return 1; //Ukoliko vam je to zadnja GPS lokacija, stavite 0 inace ce viti problema
  }

if(strcmp("/gps 5", cmdtext, true) == 0) //provjerava dali je igrac upisao komandu za gps do policije
  {
      SetPlayerCheckpoint(playerid,1216.4042,-915.5415,42.9203,3.0);
      SendClientMessage(playerid, zuta, "GPS: Namjestili ste vaÅ¡u GPS lokaciju na Burg!");
      return 1; //Ukoliko vam je to zadnja GPS lokacija, stavite 0 inace ce viti problema
  }

if(strcmp("/gps 6", cmdtext, true) == 0) //provjerava dali je igrac upisao komandu za gps do policije
{
    SetPlayerCheckpoint(playerid,1553.7538,-1675.4840,16.1953,3.0); //(Pozicija:x,Pozicija:y,Pozicija:z,Velicina markera)
    SendClientMessage(playerid, zuta, "GPS: Namjestili ste vaÅ¡u GPS lokaciju na Policiju!");
    return 1;


Jeli mi mos napravit jedan primjer pa da po tome radim?
Luis
5
Godfather
9. Jan. 2012.
Evo radi ovako narpavis prvo komandu :
CMD:gps(playerid, params[])
{
ShowPlayerDialog(playerid, 31, DIALOG_STYLE_LIST, "GPS", "burg\nbanka\nVijecnica", "Odaberi", "Odustani");
return 1;
}

i onda pod public OnDialogResponse stavis :
	if(dialogid == 31)
    {
if(!response) return 1;
{
switch(listitem)
{
case 0:
{
                // tvoj kod
}
case 1:
{
                //tvoj kod
}
case 2:
    {
                //tvoj kod
    }
            }
}
}
Hail
4
Made Man
9. Jan. 2012.
ma to ne radi :S
if(dialogid == 31)
    {
if(!response) return 1;
{
switch(listitem)
{
case 0:
{
                SetPlayerCheckpoint(playerid,1481.0273,-1770.5774,18.7958,3.0);
}
case 1:
{
                SetPlayerCheckpoint(playerid,1462.0543,-1011.3368,26.8438,3.0);
}
case 2:
    {
                SetPlayerCheckpoint(playerid,1172.8307,-1323.3011,15.4001,3.0);
    }
            case 3:
{
                SetPlayerCheckpoint(playerid,2154.4404,-1181.2894,23.3944,3.0);
}
case 4:
{
                SetPlayerCheckpoint(playerid,1216.4042,-915.5415,42.9203,3.0);
}
case 5:
{
                SetPlayerCheckpoint(playerid,1553.7538,-1675.4840,16.1953,3.0); //(Pozicija:x,Pozicija:y,Pozicija:z,Velicina markera)
}
            }
}
}

CMD:gps(playerid, params[])
    {
    ShowPlayerDialog(playerid, 31, DIALOG_STYLE_LIST, "GPS", "burg\nbanka\nVijecnica", "Odaberi", "Odustani");
    return 1;
    }


ERRORI!!!!!!
C:\Documents and Settings\Mario\Desktop\LecevicA Server-Smap\gamemodes\CLRP.pwn(4007) : error 017: undefined symbol "GivePlayerCash"
C:\Documents and Settings\Mario\Desktop\LecevicA Server-Smap\gamemodes\CLRP.pwn(4040) : error 017: undefined symbol "GivePlayerCash"
C:\Documents and Settings\Mario\Desktop\LecevicA Server-Smap\gamemodes\CLRP.pwn(4070) : error 004: function "SafeResetPlayerWeapons" is not implemented
C:\Documents and Settings\Mario\Desktop\LecevicA Server-Smap\gamemodes\CLRP.pwn(4071) : error 004: function "SafeGivePlayerWeapon" is not implemented
C:\Documents and Settings\Mario\Desktop\LecevicA Server-Smap\gamemodes\CLRP.pwn(4095) : error 004: function "SafeResetPlayerWeapons" is not implemented
C:\Documents and Settings\Mario\Desktop\LecevicA Server-Smap\gamemodes\CLRP.pwn(4308) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\Mario\Desktop\LecevicA Server-Smap\gamemodes\CLRP.pwn(4320) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\Mario\Desktop\LecevicA Server-Smap\gamemodes\CLRP.pwn(4324) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\Mario\Desktop\LecevicA Server-Smap\gamemodes\CLRP.pwn(4336) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\Mario\Desktop\LecevicA Server-Smap\gamemodes\CLRP.pwn(4340) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\Mario\Desktop\LecevicA Server-Smap\gamemodes\CLRP.pwn(4344) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\Mario\Desktop\LecevicA Server-Smap\gamemodes\CLRP.pwn(4348) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\Mario\Desktop\LecevicA Server-Smap\gamemodes\CLRP.pwn(4352) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\Mario\Desktop\LecevicA Server-Smap\gamemodes\CLRP.pwn(4356) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\Mario\Desktop\LecevicA Server-Smap\gamemodes\CLRP.pwn(4360) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\Mario\Desktop\LecevicA Server-Smap\gamemodes\CLRP.pwn(4364) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\Mario\Desktop\LecevicA Server-Smap\gamemodes\CLRP.pwn(4368) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\Mario\Desktop\LecevicA Server-Smap\gamemodes\CLRP.pwn(4372) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\Mario\Desktop\LecevicA Server-Smap\gamemodes\CLRP.pwn(4384) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\Mario\Desktop\LecevicA Server-Smap\gamemodes\CLRP.pwn(4388) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\Mario\Desktop\LecevicA Server-Smap\gamemodes\CLRP.pwn(4392) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\Mario\Desktop\LecevicA Server-Smap\gamemodes\CLRP.pwn(4396) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\Mario\Desktop\LecevicA Server-Smap\gamemodes\CLRP.pwn(4400) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\Mario\Desktop\LecevicA Server-Smap\gamemodes\CLRP.pwn(4412) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\Mario\Desktop\LecevicA Server-Smap\gamemodes\CLRP.pwn(4416) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\Mario\Desktop\LecevicA Server-Smap\gamemodes\CLRP.pwn(4420) : error 004: function "PlayerToPoint" is not implemented

Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase

26 Errors.
troll3d
4
Made Man
9. Jan. 2012.
l84s imao si nekoliko grešaka u kodu.

if(dialogid == 31)
{
  if(!response) return false;
  switch(listitem)
  {
case 0: SetPlayerCheckpoint(playerid,1481.0273,-1770.5774,18.7958,3.0);
case 1: SetPlayerCheckpoint(playerid,1462.0543,-1011.3368,26.8438,3.0);
case 2: SetPlayerCheckpoint(playerid,1172.8307,-1323.3011,15.4001,3.0);
                case 3: SetPlayerCheckpoint(playerid,2154.4404,-1181.2894,23.3944,3.0);
case 4: SetPlayerCheckpoint(playerid,1216.4042,-915.5415,42.9203,3.0);
case 5: SetPlayerCheckpoint(playerid,1553.7538,-1675.4840,16.1953,3.0); //(Pozicija:x,Pozicija:y,Pozicija:z,Velicina markera)
  }
}
Hail
4
Made Man
9. Jan. 2012.
Opet nevalja

vako sam stavija
{
  if(!response) return false;
  switch(listitem)
  {
case 0: SetPlayerCheckpoint(playerid,1481.0273,-1770.5774,18.7958,3.0);
case 1: SetPlayerCheckpoint(playerid,1462.0543,-1011.3368,26.8438,3.0);
case 2: SetPlayerCheckpoint(playerid,1172.8307,-1323.3011,15.4001,3.0);
        case 3: SetPlayerCheckpoint(playerid,2154.4404,-1181.2894,23.3944,3.0);
case 4: SetPlayerCheckpoint(playerid,1216.4042,-915.5415,42.9203,3.0);
case 5: SetPlayerCheckpoint(playerid,1553.7538,-1675.4840,16.1953,3.0); //(Pozicija:x,Pozicija:y,Pozicija:z,Velicina markera)
  }
}

CMD:gps(playerid, params[])
    {
    ShowPlayerDialog(playerid, 31, DIALOG_STYLE_LIST, "GPS", "burg\nbanka\nVijecnica", "Odaberi", "Odustani");
    return 1;
    }
troll3d
4
Made Man
9. Jan. 2012.
Jel ti izbacuje errore?

Morate biti prijavljeni da biste odgovorili na ovu temu.

Prijava

© 2026 SmartShark. All rights reserved.

Powered by Momentum|v2026.3.001 Alpha