SA-MP Forums Archive
[ajuda] 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] GPS (/showthread.php?tid=217188)



[ajuda] GPS - gabriel_ - 27.01.2011

Eae Galera, Tipo estou fazneod um /gps em dialog, mais daew eu faзo os chakpoint Os dialogs eo cmd.... In-game eu dou /gps e o dialog do gps abre tudo certin, mais daew a hora q eu escolho uma opзao n aparece o chekpoint para ir.... e nem aparece mensagens Dizendo "Voce chegou ao Morro"

Sistema do GPS:
pawn Код:
if(IsPlayerConnected(playerid))
        {
        if (strcmp("/gps", cmdtext, true, 10) == 0)
        {
        ShowPlayerDialog(playerid,2,DIALOG_STYLE_LIST, "GPS ", "Morro", "Selecionar", "Cancelar");
        return 1;
        }
        }
Chakpoint
pawn Код:
public OnPlayerEnterCheckpoint(playerid)
if(PlayerToPoint(8.0,playerid,2164.6309,-1002.4444,62.7952))//Morro
{
DisablePlayerCheckpoint(playerid);
GameTextForPlayer(playerid, " ~p~Voce chegou ao Morro ", 5000, 3);
}
dialog
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 1)
{
if(response)
{
if(listitem == 0) // Morro
{
SetPlayerCheckpoint(playerid, 2164.6309,-1002.4444,62.7952,8.0);
}

}
}
}
Agradeзo desde jб quem me ajudar


Re: [ajuda] GPS - -iLusioN- - 27.01.2011

POw tem uma msg aki no meu tbm que da isso queria saber tbm eu pensei que era algum erro meu mais eu verifiquei tudo mais nao era nao quando fui ver no no sv n aparecia a msg


Re: [ajuda] GPS - gabriel_ - 27.01.2011

Aqui n aparece a mensagem, e nem o checkpoint para o player ir '-'


Re: [ajuda] GPS - Falcon. - 27.01.2011

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp(cmdtext,"/gps", true) == 0)
    {
        ShowPlayerDialog(playerid,2,DIALOG_STYLE_LIST, "GPS ", "Morro", "Selecionar", "Cancelar");
        return 1;
    }
    return 0;
}
pawn Код:
public OnPlayerEnterCheckpoint(playerid)
{
    if(PlayerToPoint(8.0,playerid,2164.6309,-1002.4444,62.7952))//Morro
    {
        DisablePlayerCheckpoint(playerid);
        GameTextForPlayer(playerid, " ~p~Voce chegou ao Morro ", 5000, 3);
    }
    return 1;
}
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == 2)
    {
        if(response)
        {
            if(listitem == 0)
            {
                SetPlayerCheckpoint(playerid, 2164.6309,-1002.4444,62.7952,8.0);
            }
        }
    }
    return 1;
}



Re: [ajuda] GPS - gabriel_ - 27.01.2011

Vlw consegui