S32GPS - Create a GPS location with just one line! -
System64 - 12.09.2011
Introduction
Hi all
I saw a lot of GPS filterscripts, all are the same, just commands in dialog, some locations, that's not cool
so I decide to make something new!
You can create GPS location or destroy it with just one line!
You don't have to use DisablePlayerCheckpoint etc. I made that
Also add this in top of your script:
Functions
-
CreateDynamicGPS(playerid, Float: X, Float: Y, Float: Z, Float: Size) - Parameters are same as SetPlayerCheckpoint!
-
DestroyDynamicGPS(playerid) - Just removing checkpoint if it's started!
I'll add them more soon!
Commands
There is no commands, you will have to create your command!
Please use this in commands that are not for GPS (For example when you starts some race with that command!)
otherewise your race script or whatever else will get bugged!
pawn Code:
if(GPSStarted[playerid] == 1)
{
//your code
}
Credits
System32 - Made whole include!
H265 - He teach me how to use same function more times!
BlackBank3 - Fixed little "bug"!
Video
[ame]http://www.youtube.com/watch?v=CTf6r-B0RxM[/ame]
Download
Here is the download!
Pastebin!
Mediafire!
Re: S32GPS - Create a GPS location with just one line! -
wups - 12.09.2011
Basic, I don't see any difference from:
pawn Code:
new playerSetGps[MAX_PLAYERS];
SetPlayerCheckpoint(playerid, X, Y, Z, Size);
playerSetGps[playerid]=1;
public OnPlayerEnterCheckpoint(playerid)
{
if(playerSetGps[playerid])
{
playerSetGps[playerid]=0;
DisablePlayerCheckpoint(playerid);
SendClientMessage(playerid, -1, "You have reached your destination!");
return 1;
}
}
Re: S32GPS - Create a GPS location with just one line! -
System64 - 12.09.2011
ohh there is a lot of difference, if you use that, you could use just for one GPS location!
Take a look at the code!
Re: S32GPS - Create a GPS location with just one line! -
TheArcher - 12.09.2011
It's basicaly easy. But good job.
Re: S32GPS - Create a GPS location with just one line! -
System64 - 12.09.2011
Quote:
Originally Posted by TheArcher
It's basicaly easy. But good job.
|
yeah I now, I'm gona create more functions like GetDynamicGPSX, Y, Z, Size etc.
Re: S32GPS - Create a GPS location with just one line! -
TheArcher - 12.09.2011
Quote:
Originally Posted by System64
yeah I now, I'm gona create more functions like GetDynamicGPSX, Y, Z, Size etc. 
|
Add in the descriptopn the natives to know.
Re: S32GPS - Create a GPS location with just one line! -
System64 - 12.09.2011
Quote:
Originally Posted by Y_Less
This code just won't work:
That is just:
Which will only ever allow you to have one checkpoint (without corrupting data) and I'm sure should give you a compiler warning.
|
No, 'cause in funcion for creating cp (CreateDynamicGPS) I increase that variable for one more, you will see it in the video, I have 2 CP and one normal and everything works
Re: S32GPS - Create a GPS location with just one line! -
System64 - 12.09.2011
So, you have a better way?
This works grate for me!
Re: S32GPS - Create a GPS location with just one line! -
wups - 12.09.2011
Quote:
Originally Posted by System64
So, you have a better way?
This works grate for me!
|
Works great, because you only test with 1 player.
Set_GPS[MAX_PLAYERS]
Re: S32GPS - Create a GPS location with just one line! -
System64 - 12.09.2011
@TheArcher - Hahaha ma' man!
Quote:
Originally Posted by wups
Works great, because you only test with 1 player.
Set_GPS[MAX_PLAYERS]
|
Why I need it? I want to al players can use /gps or whatever, I think that I don't need it, with that only one player will be abel to use /gps or all but than I have to use for etc. no complicating