[Ajuda] bug no dialog
#1

Meu amigo Joao fez isse dialog pra mim , um dialog de teleportes , coloquei as coordenadas certinho , ate quando copila nao da erro , vou mostrar o Code
Код:
#include <a_samp>
#include <zcmd>
#include <dutils>
#include <sscanf2>
#include <a_objects>
public OnFilterScriptInit()
{
	print("\n--------------------------------------");
	print("Todos os creditos reservados.");
	print("--------------------------------------\n");
	return 1;
}
#define TELEPORTES 1
new string2[1000]; // definiзгo da frase ...
new Joao[1000]; // definir o nome do jogador que foi no jump
public OnGameModeInit()
{
	return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
	if(dialogid == TELEPORTES)
	{
		if(response)
		{
			if(listitem == 0) // dentro das chaves poderб colocar os teleportes. SetPlayerPos(playerid, x, y, z);
			{
				GetPlayerName(playerid, Joao, 1000);
				format(string2, sizeof(string2), "{FFFF00}[INFO] {FF0000}O jogador %s foi no NOME. (/NOME)" ,Joao);
				SendClientMessageToAll(-1, string2);
				SetPlayerPos(playerid,2511.9858,2541.0593,21.8750);
				SetVehiclePos(GetPlayerVehicleID(playerid),2511.9858,2541.0593,21.8750);
			}
			if(listitem == 1) // dentro das chaves poderб colocar os teleportes. SetPlayerPos(playerid, x, y, z);
			{
				GetPlayerName(playerid, Joao, 1000);
				format(string2, sizeof(string2), "{FFFF00}[INFO] {FF0000}O jogador %s foi no NOME. (/NOME)" ,Joao);
				SendClientMessageToAll(-1, string2);
				SetPlayerPos(playerid,-1812.8070,576.4816,234.8906);
				SetVehiclePos(GetPlayerVehicleID(playerid),-1812.8070,576.4816,234.8906);
            }
			if(listitem == 2) // dentro das chaves poderб colocar os teleportes. SetPlayerPos(playerid, x, y, z);
			{
				GetPlayerName(playerid, Joao, 1000);
				format(string2, sizeof(string2), "{FFFF00}[INFO] {FF0000}O jogador %s foi no NOME. (/NOME)" ,Joao);
				SendClientMessageToAll(-1, string2);
				SetPlayerPos(playerid,1553.6809,-1361.5106,329.6245);
				SetVehiclePos(GetPlayerVehicleID(playerid),1553.6809,-1361.5106,329.6245);
			}
			if(listitem == 3) // dentro das chaves poderб colocar os teleportes. SetPlayerPos(playerid, x, y, z);
			{
				GetPlayerName(playerid, Joao, 1000);
				format(string2, sizeof(string2), "{FFFF00}[INFO] {FF0000}O jogador %s foi no NOME. (/NOME)" ,Joao);
				SendClientMessageToAll(-1, string2);
				SetPlayerPos(playerid,6.3257,1714.1166,44073.9766);
				SetVehiclePos(GetPlayerVehicleID(playerid),6.3257,1714.1166,44073.9766);
			}
			if(listitem == 4) // dentro das chaves poderб colocar os teleportes. SetPlayerPos(playerid, x, y, z);
			{
				GetPlayerName(playerid, Joao, 1000);
				format(string2, sizeof(string2), "{FFFF00}[INFO] {FF0000}O jogador %s foi no NOME. (/NOME)" ,Joao);
				SendClientMessageToAll(-1, string2);
			}
			if(listitem == 5) // dentro das chaves poderб colocar os teleportes. SetPlayerPos(playerid, x, y, z);
			{
				GetPlayerName(playerid, Joao, 1000);
				format(string2, sizeof(string2), "{FFFF00}[INFO] {FF0000}O jogador %s foi no NOME. (/NOME)" ,Joao);
				SendClientMessageToAll(-1, string2);
			}
			if(listitem == 6) // dentro das chaves poderб colocar os teleportes. SetPlayerPos(playerid, x, y, z);
			{
				GetPlayerName(playerid, Joao, 1000);
				format(string2, sizeof(string2), "{FFFF00}[INFO] {FF0000}O jogador %s foi no NOME. (/NOME)" ,Joao);
				SendClientMessageToAll(-1, string2);
			}
		}
		return true;
	}

	return 1;
}
CMD:teleportes(playerid)
{
    ShowPlayerDialog(playerid, TELEPORTES, DIALOG_STYLE_LIST, "{FF0000}# {FFFFFF}Teleportes", "Jump\nJump 2\nDesafio\nDesafio2\nDesafio3", "Ir", "Cancelar");
	return true;
}
Entao deixei assim :
Код:
#define TELEPORTES 1
ai quando eu entrava no server e colocava o comando /teleportes , abrir o dialog ai quando eu clicava para ir aparecia Conta registrada com sucesso .

Depois q mudei de numero minha conta bugou , logo q eu colocava a senha aparecia "Server Disconnect"

Preciso sabe como fazer esse dialog funcionar sem dar esse bug , obrigado
Reply
#2

Boas, provavelmente vocк deve ter um conflito com o ID do dialogo, talvez causado pelo uso de outros FS, tente colocar assim.

pawn Код:
#define TELEPORTES 100 //Mude o nъmero (ID) para tentar resolver qualquer conflito com outros dialogos
Reply
#3

Entendendo...
pawn Код:
// estб assim
#define TELEPORTES 1
#define REGISTRO 1

// TROQUE:
#define TELEPORTES 1

// POR:
#define TELEPORTES 1194
Й Porque estб tendo conflito entre os dialogs.
Reply
#4

Vocк ao usar :
pawn Код:
#define TELEPORTES 1
Estб a atribuir o id 1 б dialog TELEPORTES , entгo se jб houver algum com o mesmo id vai dar erro .
Teste meter num GM new.pwn , e veja se dб erro.
Reply
#5

Alйm dos comentбrios acima, й bom tomar este cuidado com filterscripts:
https://sampforum.blast.hk/showthread.php?tid=480415
Reply
#6

Sim agora deu certo , mais quando eu clico em ir nao vai e nem aparece nada [/COLOR]


Agora nao sei pq nao esta funcionando
Reply
#7

Nгo estб funcionando , porque tem alguma dialog num FilterScript que ta dando conflito com essa .

Vб no OnDialogResponse do Gm e dos FS e meta no ultimo return , de
pawn Код:
return 1;
para
pawn Код:
return 0;
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)