SA-MP Forums Archive
[FilterScript] Sistema de GPS Avanзado - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+----- Forum: Lançamentos/Releases (https://sampforum.blast.hk/forumdisplay.php?fid=56)
+----- Thread: [FilterScript] Sistema de GPS Avanзado (/showthread.php?tid=187902)



Sistema de GPS Avanзado - [FeK]HigorOliver - 05.11.2010

Olб pessoal vim postar um sistema de GPS muito fбcil de usar.
Eu sei muito bem que existe varios filterscript como esse de dialog, so que nenhum e tгo simples e facil de usar como o meu, vejo varios script com quase mil linhas sem nenhum proposito.

Como ele funciona ?
Como todo GPS, o player digita /gps e aparece as listas dos gps

Funзхes:
Код:
GPS(nomete[], Float:xxxxx, Float:yyyyy, Float:zzzzzzz)
Como Adicionar um GPS ?
Код:
GPS(   NOME DO GPS",     CORDENADAS);
Ex:
pawn Код:
GPS(   "GPS",     1209.8090,-1751.8210,13.5937);
Quando a pessoa adiciona isso em filterscriptinit e automaticamente adicionado ao dialog : /gps

Entгo e isso.

Creditos: HigorOliver & um Tal de Drakon

pawn Код:
//==============================================================================
#include <a_samp>
#define FILTERSCRIPT
#define GPS_GPS 500
//==============================================================================
new id=-1;
new bool:InGPS[MAX_PLAYERS];
enum pgps
{
    NomeRoubo[100],
    Float:xp,
    Float:yp,
    Float:zp,
    ID
};
new Gps[GPS_GPS][pgps];
//==============================================================================
public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print("Sistema de GPS BY:HIGOR");
    print("--------------------------------------\n");
//          Nome               CORDENADAS
    GPS(   "GPS",     1209.8090,-1751.8210,13.5937);

    return 1;
}


//==============================================================================
stock GPS(nomete[], Float:xxxxx, Float:yyyyy, Float:zzzzzzz)
{
    id++;
    format(Gps[id][NomeRoubo],100,"%s",nomete);
    Gps[id][xp] = xxxxx;
    Gps[id][yp] = yyyyy;
    Gps[id][zp] = zzzzzzz;
    Gps[id][ID] = id;
    return 1;
}

//==============================================================================
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    new msg[128];
    if(listitem == Gps[listitem][ID])
    {
        if(!response) return false;
        SetPlayerCheckpoint(playerid,Gps[listitem][xp],Gps[listitem][yp],Gps[listitem][zp]+1,2.0);
        InGPS[playerid] = true;
        format(msg, sizeof(msg), "Gps Esta localizando no mapa : %s", Gps[listitem][NomeRoubo]);
        SendClientMessage(playerid, 0xFFFFFFFF, msg);
        return 1;
    }
    return 0;
}


//==============================================================================
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/gps", true)) {
        new dados[1024];
        format(dados, 1024, "");
        for(new J=0;J<=id;J++) {
            format(dados,1024, "%s%s\n",dados,Gps[J][NomeRoubo]);
        }
        ShowPlayerDialog(playerid,256,DIALOG_STYLE_LIST, "GPS",dados,"listitem", "Fechar");
    }

    return 0;
}


//==============================================================================
public OnPlayerEnterCheckpoint(playerid)
{
    if(InGPS[playerid] == true)
    {
      DisablePlayerCheckpoint(playerid);
      InGPS[playerid] = false;
    }
    return 1;
}



Re: Sistema de GPS Avanзado - ipsBruno - 05.11.2010

Creditos: HigorOliver & um Tal de Drakon [gostoso,lindo,tesгo,gato,lindo,gostoso,tesгo,gato, lindo,gato,gostoso,tesгo,comedor,gostosгo,lindo]


Parabйns ae fico legal pena que й do '*****'
rsrsrsrs


Re: Sistema de GPS Avanзado - [FeK]HigorOliver - 05.11.2010

Obg. '-'


Re: Sistema de GPS Avanзado - TiagoPS - 05.11.2010

Gudi Jobe


Re: Sistema de GPS Avanзado - zSuYaNw - 05.11.2010

bom, mais simples:
pawn Код:
SendClientMessage(playerid, COR,"Very gudy.");



Re: Sistema de GPS Avanзado - [FeK]HigorOliver - 05.11.2010

Quote:
Originally Posted by [Full]Garfield[XDB]
Посмотреть сообщение
bom, mais simples:
pawn Код:
SendClientMessage(playerid, COR,"Very gudy.");
rsrs Edit ?

Obg Tiago PS e Garfield


Re: Sistema de GPS Avanзado - [FeK]Falcon_Sixe - 05.11.2010

Legal Parabйns.
pawn Код:
GameTextForPlayer(playerid, "~r~Muito ~y~BOm ~g~Parabens", 3000, 3);
Imito o gato mesmo /idai


Re: Sistema de GPS Avanзado - KevinsL - 05.11.2010

isso й para preguiзosos


























vo baixar


Re: Sistema de GPS Avanзado - [FeK]HigorOliver - 05.11.2010

quem tiver ideias para prox versгo.


Re: Sistema de GPS Avanзado - zSuYaNw - 05.11.2010

bota em dialog, contar o tanto que falta, porcentagem, tipo: 50% atй o local.