[Include] S32GPS - Create a GPS location with just one line!
#1

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:
pawn Code:
#include <S32GPS>

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!

Reply
#2

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;
   }
}
Reply
#3

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!
Reply
#4

It's basicaly easy. But good job.
Reply
#5

Quote:
Originally Posted by TheArcher
View Post
It's basicaly easy. But good job.
yeah I now, I'm gona create more functions like GetDynamicGPSX, Y, Z, Size etc.
Reply
#6

Quote:
Originally Posted by System64
View Post
yeah I now, I'm gona create more functions like GetDynamicGPSX, Y, Z, Size etc.
Add in the descriptopn the natives to know.
Reply
#7

Quote:
Originally Posted by Y_Less
View Post
This code just won't work:

pawn Code:
Set_GPS[sizeof(GPS)]
That is just:

pawn Code:
Set_GPS[1]
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
Reply
#8

So, you have a better way?

This works grate for me!
Reply
#9

Quote:
Originally Posted by System64
View Post
So, you have a better way?

This works grate for me!
Works great, because you only test with 1 player.

Set_GPS[MAX_PLAYERS]
Reply
#10

@TheArcher - Hahaha ma' man!
Quote:
Originally Posted by wups
View Post
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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)