SA-MP Forums Archive
[FilterScript] Simple GPS system - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+--- Thread: [FilterScript] Simple GPS system (/showthread.php?tid=392297)



Simple GPS system - MarkzD - 13.11.2012

Its veryy simple and worked GPS system.
So, put this to your OnPlayerCommandText
PHP код:
if (strcmp("/gps"cmdtexttrue10) == 0)
{
ShowPlayerDialog(playerid,3,DIALOG_STYLE_LIST,"GPS","Your Name\nYour Name\nYour Name\nYour Name\nYour Name\nYour Name\nOff GPS","Okay","Exit");
return 
1;

OnDialogResponse
PHP код:
if(response)
{
switch(
dialogid)
{
case 
3// dialog id
{
switch(
listitem)
{
case 
0:
{
SendClientMessage(playerid,0xFFFFFFC8,"blablabla");
SetPlayerCheckpoint(playeridXYZ3.0);
}
case 
1:
{
SendClientMessage(playerid,0xFFFFFFC8,"blablabla");
SetPlayerCheckpoint(playeridXYZ3.0);
}
case 
2:
{
SendClientMessage(playerid,0xFFFFFFC8,"blablabla");
SetPlayerCheckpoint(playeridXYZ3.0);
}
case 
3:
{
SendClientMessage(playerid,0xFFFFFFC8,"blablabla");
SetPlayerCheckpoint(playeridXYZ3.0);
}
case 
4:
{
SendClientMessage(playerid,0xFFFFFFC8,"blablabla");
SetPlayerCheckpoint(playeridXYZ3.0);
}
case 
5:
{
SendClientMessage(playerid,0xFFFFFFC8,"blablabla");
SetPlayerCheckpoint(playeridXYZ3.0);
}
case 
6:
{
SendClientMessage(playerid,0xFFFFFFC8,"You has disable marker on GPS map.");
DisablePlayerCheckpoint(playerid);
}
}
}
}

And OnPlayerEnterCheckpoint
PHP код:
DisablePlayerCheckpoint(playerid); 
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
Simple! Sorry for my bad english, i am ukrainian xD
Change X,Y,Z to your coord
Change "blablabla" to your text
Change 3.0 to your height
DOWLOAD:
PASTEBIN


Re: Simple GPS system - Konstantinos - 13.11.2012

Quote:
Originally Posted by MarkzD
Посмотреть сообщение
Its veryy simple and worked GPS system.
So, put this to your OnPlayerCommandText
PHP код:
if (strcmp("/gps"cmdtexttrue10) == 0)
{
ShowPlayerDialog(playerid,3,DIALOG_STYLE_LIST,"GPS","Your Name\nYour Name\nYour Name\nYour Name\nYour Name\nYour Name\nOff GPS","Okay","Exit");
return 
1;

OnDialogResponse
PHP код:
if(response)
{
switch(
dialogid)
{
case 
3// dialog id
{
switch(
listitem)
{
case 
0:
{
SendClientMessage(playerid,0xFFFFFFC8,"blablabla");
SetPlayerCheckpoint(playeridX,Y,Z);
}
case 
1:
{
SendClientMessage(playerid,0xFFFFFFC8,"blablabla");
SetPlayerCheckpoint(playeridX,Y,Z);
}
case 
2:
{
SendClientMessage(playerid,0xFFFFFFC8,"blablabla");
SetPlayerCheckpoint(playeridX,Y,Z);
}
case 
3:
{
SendClientMessage(playerid,0xFFFFFFC8,"blablabla");
SetPlayerCheckpoint(playeridX,Y,Z);
}
case 
4:
{
SendClientMessage(playerid,0xFFFFFFC8,"blablabla");
SetPlayerCheckpoint(playeridX,Y,Z);
}
case 
5:
{
SendClientMessage(playerid,0xFFFFFFC8,"blablabla");
SetPlayerCheckpoint(playeridX,Y,Z);
}
case 
6:
{
SendClientMessage(playerid,0xFFFFFFC8,"You has disable marker on GPS map.");
DisablePlayerCheckpoint(playerid);
}
}
}
}

And OnPlayerEnterCheckpoint
PHP код:
DisablePlayerCheckpoint(playerid); 
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
Simple! Sorry for my bad english, i am ukrainian xD
OMG! I'm gonna use it, lol

__


Excuse me, but that's not code. A lot of errors and undefined variables.


Re: Simple GPS system - MarkzD - 13.11.2012

You sure?



Re: Simple GPS system - Private200 - 13.11.2012

C'mon MarkzD , now you destroyed my second post . But anyway , i am third . This is a tutorial type. Put em' together then share with us

EDIT : Cannot you recognize the codes better ? They don't even work , and this is more like a tutorial , not a FS . You have to put them together and share it with use , not try it on your gamemode -.-'


Re: Simple GPS system - MarkzD - 13.11.2012

i am LOL
oh sorry need add a
SetPlayerCheckpoint(playerid, 1.93,19.3,6, 3.0);
3.0 - height xD
Link for FS
http://pastebin.com/pxWMTpkQ


Re: Simple GPS system - Private200 - 13.11.2012

You man don't know what Space means


Re: Simple GPS system - MarkzD - 13.11.2012

am do you mean X, Y, Z, 3.0 ( ) that?
so, changed
http://pastebin.com/aAvY7peT


Re: Simple GPS system - Private200 - 13.11.2012

NO MAN ! I don't mean that , put space on your script! Don't let them like
Код:
HERE
HERe
HERE
HErE
HERE
Make them like

Код:
public OnPlayerConnect(playerid)
{
       SendClientMessageToAll(red," Welcome to my server "); //SPACE HERE TOOO!!!!!!!!!! 
       return 1; //SPACE HEREEEEE     
}



Re: Simple GPS system - MarkzD - 13.11.2012

blablabla - its test text, him need to redact in your text or i don't mean you
sorry for bad english xD


Re: Simple GPS system - MarkzD - 15.11.2012

uppp