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?:
A napravio pod public OnDialogResponse ?
Nisam nista samo sam doda da bude u dialog? ali sta triba dodat?
Citat: Tong1950Po poslato Januar 08, 2012, 22:38:22 POSLE PODNE
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
Citat: Tong1950Po poslato Januar 08, 2012, 22:38:22 POSLE PODNE
Nisam nista samo sam doda da bude u dialog? ali sta triba dodat?
pa trebas pod OnDialogResponse napraviti dialog ..
Tu mi i stoji :S! Ja napisem /gps Meni izbaci lokacije Ja izaberem naprimjer "KOlodvor" stisnem "u redu" nema mi onog crvenog markera!
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..
Citat: [TG]$--L84S--$ poslato Januar 08, 2012, 23:02:25 POSLE PODNE
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 ?
pa gdje si to sad napravio
pod OnDialogResponse
ali to izbrisi sto si prije pravio
Citat: [BUL] Cile poslato Januar 09, 2012, 09:56:13 PRE PODNE
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?
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
}
}
}
}
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.
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)
}
}
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;
}
Jel ti izbacuje errore?
Nije ti do toga vec do tvog nekog koda ja sam ovaj moj testao i radi....
Ma tko zna jel on to dobro postavlja uopće , ne moguće da mu sa svakim kodom baca errore.
Daj nam errore ako ima i daj OnDialogResponse callback.
daj meni ne radi bgt cili dan ovo radim nikako da napravim