SA-MP Forums Archive
[Ajuda] Sistema de GPS - 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)
+---- Thread: [Ajuda] Sistema de GPS (/showthread.php?tid=381556)



Sistema de GPS - FireBallPlays - 29.09.2012

Gostaria de saber se й possivel fazer quando,por exemplo, a pessoa digita /pref e em vez de se teletransportar( Claro pq e um rpg) apareceria uma seta ou uma linha indicando a rota ate as coordenadas(Pref)

Й possivel fazer isso, e se sim, como fazer?

Obg a todos que colaborarem!


Vlw


Re: Sistema de GPS - Ley - 29.09.2012

Utilize

pawn Код:
SetPlayerRaceCheckpoint(playerid, 1, X, Y, Z, 0, 0, 0, 5);
Exemplo


pawn Код:
CMD:pref(playerid)
{
    SetPlayerRaceCheckpoint(playerid, 1, -2466.2349, 2273.4458, 4.8359, 0, 0, 0, 5);
    return 1;
}
E para quando o player chegar no local utilize em;

pawn Код:
DisablePlayerRaceCheckpoint(playerid);



Re: Sistema de GPS - FireBallPlays - 29.09.2012

Hm vou tentar ok valeu


Re: Sistema de GPS - Ouro - 29.09.2012

pawn Код:
#include <a_samp>

#define FILTERSCRIPT

#define DIALOG_GPS 1000

public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/gps", true))
    {
        ShowPlayerDialog(playerid, DIALOG_GPS, DIALOG_STYLE_LIST, "GPS", "Prefeitura \nDepartamento de Polнcia", "Selecionar", "Fechar");
        return 1;
    }
    return 0;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == DIALOG_GPS)
    {
        if(response)
        {
            switch(listitem)
            {
                case 0:
                {
                SetPlayerCheckpoint(playerid, 1467.7356, -1767.4352, 13.5469, 3.0);
                }
                case 1:
                {
                SetPlayerCheckpoint(playerid, 1540.0187, -1678.8928, 13.5498, 3.0);
                }
            }
        }
    }
    return 1;
}

public OnPlayerEnterCheckpoint(playerid)
{
    DisablePlayerCheckpoint(playerid);
    return 1;
}
Criei esta pequena base para vocк.