[Pedido] Passar na coordenada abre um dialog
#1

Eu queria que tipo quando passasse nessa coordenada abria um dialog com teleporte, o sistema de teleporte ja estou fazendo vendo alguns tutoriais, eu tentei o rageofpoint algo assim mas nгo sei onde botar essa funзгo, eu nгo quero fazer tipo assim /AbrirTeleporte ai abria o dialog, eu queria que quando a pessoa passasse na coordenada iria abrir o dialog pra ela escolher onde ela quer ir.

Coordenada
pawn Code:
2553.7996, -2186.4495, 1.6777
O dialog ja consegui fazer...
pawn Code:
if(dialogid == IrParaGrove)
    {
        if(response)
        {
            if(listitem == 0)
            {
                SetPlayerInterior(playerid, 0);
                SetPlayerPos(playerid, 2558.5005, -1559.7670, 13.8827);
                SendClientMessage(playerid, COLOR_RED, "[ > ] Vocк se teletransportou para a Grove Street.");
                return 1;
            }
        }
    }
pawn Code:
ShowPlayerDialog(playerid, IrParaGrove, DIALOG_STYLE_LIST, "Teleportes do Esgoto", "Grove Street", "Selecionar", "Sair");
Reply
#2

pawn Code:
public OnPlayerUpdate(playerid) {
    if(IsPlayerInRangeOfPoint(playerid, 2.0 2553.7996, -2186.4495, 1.6777) && gettime() > GetPVarInt(playerid, "abrirDialog")) {
        ShowPlayerDialog(playerid, IrParaGrove, DIALOG_STYLE_LIST, "Teleportes do Esgoto", "Grove Street", "Selecionar", "Sair");
        SetPVarInt(playerid, "abrirDialog", gettime() + 15);
    }
    return 1;
}
Tente..
Reply
#3

pawn Code:
if(IsPlayerInRangeOfPoint(playerid, 2.0 2553.7996, -2186.4495, 1.6777)
    {
        ShowPlayerDialog(playerid, IrParaGrove, DIALOG_STYLE_LIST, "Teleportes do Esgoto", "Grove Street", "Selecionar", "Sair");
    }
Com ou sem aquele VPIntAlgumaCoisa (acho que й interior) Deu esses mesmos erros:
Code:
C:\Documents and Settings\Vini\Desktop\LSA v1.0\gamemodes\zumbi.pwn(5486) : error 001: expected token: ",", but found "-rational value-"
C:\Documents and Settings\Vini\Desktop\LSA v1.0\gamemodes\zumbi.pwn(5486) : warning 215: expression has no effect
C:\Documents and Settings\Vini\Desktop\LSA v1.0\gamemodes\zumbi.pwn(5486) : warning 215: expression has no effect
C:\Documents and Settings\Vini\Desktop\LSA v1.0\gamemodes\zumbi.pwn(5486) : warning 215: expression has no effect
C:\Documents and Settings\Vini\Desktop\LSA v1.0\gamemodes\zumbi.pwn(5486) : error 001: expected token: ";", but found ")"
C:\Documents and Settings\Vini\Desktop\LSA v1.0\gamemodes\zumbi.pwn(5486) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Vini\Desktop\LSA v1.0\gamemodes\zumbi.pwn(5486) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
@EDIT
JA ARRUMEI, OBRIGADO AE CARA!
Reply
#4

Tipo pra sу os zumbis passar e abrir a dialog tem que ser assim?

pawn Code:
if(Team[playerid] == ZOMBIE)
    if(IsPlayerInRangeOfPoint(playerid, 1.0, 2553.7996, -2186.4495, 1.6777))
    {
        ShowPlayerDialog(playerid, IrParaGrove, DIALOG_STYLE_LIST, "Teleportes", "Grove Street", "Selecionar", "Sair");
    }
ou assim
pawn Code:
if(Team[playerid] == ZOMBIE)
{
if(IsPlayerInRangeOfPoint(playerid, 1.0, 2553.7996, -2186.4495, 1.6777))
   
        ShowPlayerDialog(playerid, IrParaGrove, DIALOG_STYLE_LIST, "Teleportes", "Grove Street", "Selecionar", "Sair");
    }
?
Reply
#5

meio estranho zumbi teleportar mais ok ..

PHP Code:
if(Team[playerid] == ZOMBIE)
{
    if(
IsPlayerInRangeOfPoint(playerid1.02553.7996, -2186.44951.6777))
    {
        
ShowPlayerDialog(playeridIrParaGroveDIALOG_STYLE_LIST"Teleportes""Grove Street""Selecionar""Sair")
        return 
1;
    }

Reply
#6

Entra no SV o IP esta na minha assinatura, ja vou testar o que vc mandou e vou atualizar o gm no host e vc verб se й estranho ou nгo.
Reply
#7

Quote:
Originally Posted by eNtinityGaming
View Post
pawn Code:
if(IsPlayerInRangeOfPoint(playerid, 2.0 2553.7996, -2186.4495, 1.6777)
    {
        ShowPlayerDialog(playerid, IrParaGrove, DIALOG_STYLE_LIST, "Teleportes do Esgoto", "Grove Street", "Selecionar", "Sair");
    }
Com ou sem aquele VPIntAlgumaCoisa (acho que й interior) Deu esses mesmos erros:
Code:
C:\Documents and Settings\Vini\Desktop\LSA v1.0\gamemodes\zumbi.pwn(5486) : error 001: expected token: ",", but found "-rational value-"
C:\Documents and Settings\Vini\Desktop\LSA v1.0\gamemodes\zumbi.pwn(5486) : warning 215: expression has no effect
C:\Documents and Settings\Vini\Desktop\LSA v1.0\gamemodes\zumbi.pwn(5486) : warning 215: expression has no effect
C:\Documents and Settings\Vini\Desktop\LSA v1.0\gamemodes\zumbi.pwn(5486) : warning 215: expression has no effect
C:\Documents and Settings\Vini\Desktop\LSA v1.0\gamemodes\zumbi.pwn(5486) : error 001: expected token: ";", but found ")"
C:\Documents and Settings\Vini\Desktop\LSA v1.0\gamemodes\zumbi.pwn(5486) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Vini\Desktop\LSA v1.0\gamemodes\zumbi.pwn(5486) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
@EDIT
JA ARRUMEI, OBRIGADO AE CARA!
Aquela PVar, й uma variavel para nгo deixar a dialog ficar abrindo toda hora.
O OnPlayerUpdate й chamado diversas vezes por segundo.
Aquilo й pra travar a exibiгo da Dialog por 15 segundos.
Reply
#8

Ah por isso meu dialog nгo para de abrir XD
Cara mas seu cуdigo ficou todo mal indentado, teria como arruma-lo?
Reply
#9

http://tabulador.medianewsonline.com/

By: ipsBruno

#Lucas
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)