[Tutorial] How to make simple gps system.
#1

Incudtions

You must have this includtions
zcmd
Starting off

now befor starting you must have this function by me :3
pawn Code:
stock CreateGps(gpsid,Float:x,Float:y,Float:z)
{
    new playerid;
    SetPlayerMapIcon(playerid,gpsid,x,y,z,00 ,COLOR_RED1,MAPICON_GLOBAL_CHECKPOINT);
    if(IsPlayerInRangeOfPoint(playerid,10,x,y,z))
    {
        RemovePlayerMapIcon(playerid,gpsid);
        SendClientMessage(playerid,COLOR_RED1,"You have reched your place");
    }
    return playerid;
}
now lets get started:

1- how to create a gps?
You can create a gps like this:
pawn Code:
CreateGps(id,x,y,z);
2- How to use it
pawn Code:
CMD:gps(playerid,params[])
{
    ShowPlayerDialog(playerid,1,DIALOG_STYLE_LIST,"GPS location","\nLSPD\n24/7(unity)","Set GPS","Close");
    return 1;
}
and this on OnDialogResponse CallBack
pawn Code:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == 1)
    {
        if(response)
        {
            switch(listitem)
            {
                case 0:
                {
                    CreateGps(1,1553.4988, -1675.9509, 16.3764);
                }
                case 1:
                {
                    CreateGps(2,832.08, -1842.65, 12.98);
                }
            }
        }
    }
    return 1;
}
Reply
#2

Not very well explained..

Code:
includtions
A new word

Many grammar mistakes
Reply
#3

Its so easy even newbies can create its explained well
Reply
#4

Quote:
Originally Posted by Gangster-rocks
View Post
Its so easy even newbies can create its explained well
I completely disagree
Reply
#5

Would you like to make a video for more "explaine"
Reply
#6

Quote:
Originally Posted by Gangster-rocks
View Post
Would you like to make a video for more "explaine"
if i was you, i would learn English and improve on your grammar, i can't understand what you are saying.

and you can't spell, it's explain, not explaine.

and "explaine"(explain) isn't an object, it's telling you to explain more. Derp.
Reply
#7

Quote:
Originally Posted by Gangster-rocks
View Post
Incudtions

You must have this includtions
zcmd
Starting off

now befor starting you must have this function by me :3
pawn Code:
stock CreateGps(gpsid,Float:x,Float:y,Float:z)
{
    new playerid;
    SetPlayerMapIcon(playerid,gpsid,x,y,z,00 ,COLOR_RED1,MAPICON_GLOBAL_CHECKPOINT);
    if(IsPlayerInRangeOfPoint(playerid,10,x,y,z))
    {
        RemovePlayerMapIcon(playerid,gpsid);
        SendClientMessage(playerid,COLOR_RED1,"You have reched your place");
    }
    return playerid;
}
now lets get started:

1- how to create a gps?
You can create a gps like this:
pawn Code:
CreateGps(id,x,y,z);
2- How to use it
pawn Code:
CMD:gps(playerid,params[])
{
    ShowPlayerDialog(playerid,1,DIALOG_STYLE_LIST,"GPS location","\nLSPD\n24/7(unity)","Set GPS","Close");
    return 1;
}
and this on OnDialogResponse CallBack
pawn Code:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == 1)
    {
        if(response)
        {
            switch(listitem)
            {
                case 0:
                {
                    CreateGps(1,1553.4988, -1675.9509, 16.3764);
                }
                case 1:
                {
                    CreateGps(2,832.08, -1842.65, 12.98);
                }
            }
        }
    }
    return 1;
}
The above is a tonne of crap. Honestly. Replace it with this.

Code:
You must have these includes
zcmd
How To Create A GPS
Before starting you must have this function by me.
pawn Code:
stock CreateGps(gpsid,Float:x,Float:y,Float:z){    new playerid;    SetPlayerMapIcon(playerid,gpsid,x,y,z,00 ,COLOR_RED1,MAPICON_GLOBAL_CHECKPOINT);    if(IsPlayerInRangeOfPoint(playerid,10,x,y,z))    {        RemovePlayerMapIcon(playerid,gpsid);        SendClientMessage(playerid,COLOR_RED1,"You have reached your desired location.");    }    return playerid;}
now lets get started:

You can create a GPS like this:
pawn Code:
CreateGps(id,x,y,z);
2- How to use it
pawn Code:
CMD:gps(playerid,params[]){    ShowPlayerDialog(playerid,1,DIALOG_STYLE_LIST,"GPS location","\nLSPD\n24/7(unity)","Set GPS","Close");    return 1;}
and this on OnDialogResponse CallBack
pawn Code:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]){    if(dialogid == 1)    {        if(response)        {            switch(listitem)            {                case 0:                {                    CreateGps(1,1553.4988, -1675.9509, 16.3764);                }                case 1:                {                    CreateGps(2,832.08, -1842.65, 12.98);                }            }        }    }    return 1;}
Reply
#8

1) - i am 13 years old.
2) - I am scripting when i was 11
3) - Shut the fuck up
4) - I made this tut for newbies
5) - I am Learning english by my self -_-
Reply
#9

Quote:
Originally Posted by Gangster-rocks
View Post
1) - i am 13 years old.
2) - I am scripting when i was 11
3) - Shut the fuck up
4) - I made this tut for newbies
5) - I am Learning english by my self -_-
Lol, im younger than you.

Learn English at least...

-Snip-

yeah, your very ungrateful, i snipped the above because it was full of flame but yeah. Just so you know learn to have a bit more respect when someone tries to help by improving your post.
Reply
#10

Quote:
Originally Posted by Gangster-rocks
View Post
1) - i am 13 years old.
2) - I am scripting when i was 11
3) - Shut the fuck up
4) - I made this tut for newbies
5) - I am Learning english by my self -_-
Quote:
Originally Posted by Your:RP
View Post
Lol, im younger than you.

Learn English at least...

-Snip-

yeah, your very ungrateful, i snipped the above because it was full of flame but yeah. Just so you know learn to have a bit more respect when someone tries to help by improving your post.
Did you know it's illegal to be playing this game you two?

Mhm.

OT:

Leave the guy alone, it's the effort that counts. (Not much effort I know, constructive criticism, not foul behavior).

OP: Try explaining it a bit more, if you have any problems PM me with it in your language. I'll sort it for you and then edit the post.
Reply
#11

Quote:
Originally Posted by iGetty
Посмотреть сообщение
Did you know it's illegal to be playing this game you two?

Mhm.

OT:

Leave the guy alone, it's the effort that counts. (Not much effort I know, constructive criticism, not foul behavior).

OP: Try explaining it a bit more, if you have any problems PM me with it in your language. I'll sort it for you and then edit the post.
Nice to see that someone actually wishes to offer help,you know,his english ain't SO so bad,yet,for tutorials you must have less then 10 spelling erros in my point of view :P.And as I mentioned before,topic related,beside the fact that you should add more locations,how about adding an arrow above the vehicle,THAT points for the location.
Reply
#12

Quote:
Originally Posted by Cjgogo
Посмотреть сообщение
Nice to see that someone actually wishes to offer help,you know,his english ain't SO so bad,yet,for tutorials you must have less then 10 spelling erros in my point of view :P.And as I mentioned before,topic related,beside the fact that you should add more locations,how about adding an arrow above the vehicle,THAT points for the location.
Do me a MASSIVE favor?

Please add spaces after your ','s?

Thanks!

Also; it's a good start!
Reply
#13

not very well explained but nice try
Reply
#14

Not very well explained but thank you for making that tutrial.
Btw a tip don't care about stupids nice work
Reply
#15

Quote:
Originally Posted by Gangster-rocks
Посмотреть сообщение
1) - i am 13 years old.
2) - I am scripting when i was 11
Yet the game is meant for people equal or above 18.

OT: This is not explained very well at all.
Reply
#16

The funny thing is: it doesn't even work!
Quote:
pawn Код:
new playerid;
Are you kidding me? It's not even being assigned a value which means its value will alway be 0. This seems to be the one-size-fits-all solution for undefined symbol errors. Just slap a new or a define in it and be done with it. /s
Reply
#17

Not Good.. You Haven't explained much..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)