SA-MP Forums Archive
[DUV] Dialog Box - 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: [DUV] Dialog Box (/showthread.php?tid=122749)



[DUV] Dialog Box - Ambrуsio - 23.01.2010

Gostaria de um FS, que aparecese um dialog box quando entra no sv com algumas mensagem, tipo:
Bem vindo ao server...
respeite todos...
etc.....

alguem sabe como fazer ou tem algum pronto?!


Re: [DUV] Dialog Box - Caio_Cartaxo - 23.01.2010

Siga esse tutorial ^^

http://forum.sa-mp.com/index.php?topic=144477.0


Re: [DUV] Dialog Box - Ambrуsio - 23.01.2010

Sou mais do q novato no pawn, с entendi nada kkkkkkkkk
с tem como me mandar uma pronta ai, sу pra mim trocar as mensagens?

malz pela newbise....


Re: [DUV] Dialog Box - [O_o]Davidovich - 23.01.2010

EEu nгo entendo muito de DIALOGS e fiz rбpido, se der errado nгo sei concertar.
pawn Code:
#define DIALOG_WELCOME 624
public OnPlayerConnect(playerid)
{
  ShowPlayerDialog(playerid,DIALOG_WELCOME,DIALOG_STYLE_MSGBOX,"BEM VINDO!","Seja bem vindo  ao servidor ... \n
  Respeite os outros players e os administradores \n
  Siga as regras, ou vocк poderб ser punido"
,"OK","SAIR");
  return 1;
}

public OnDialogResponse(playerid,dialogid,response)
{
  if(dialogid == DIALOG_WELCOME && response == 0)
  {
    SendClientMessage(playerid,0xFF0000AA,"Vocк foi kickado por escolher a opзгo SAIR no dialog welcome.");
    Kick(playerid);
  }
  if(dialogid == DIALOG_WELCOME && response == 1)
  {
    SendClientMessage(playerid,0x00FF00AA,"Agora vocк pode jogar.");
  }
  return 1;
}



Re: [DUV] Dialog Box - Ambrуsio - 23.01.2010

deu esses 4 erros:

Code:
D:\Documents and Settings\Eliйzer\Desktop\Untitled2.pwn(2) : warning 235: public function lacks forward declaration (symbol "OnPlayerConnect")
D:\Documents and Settings\Eliйzer\Desktop\Untitled2.pwn(4) : error 017: undefined symbol "ShowPlayerDialog"
D:\Documents and Settings\Eliйzer\Desktop\Untitled2.pwn(4) : error 017: undefined symbol "Seja"
D:\Documents and Settings\Eliйzer\Desktop\Untitled2.pwn(4) : error 017: undefined symbol "bem"
D:\Documents and Settings\Eliйzer\Desktop\Untitled2.pwn(4) : fatal error 107: too many error messages on one line
alguem sabe arrumar?!


Re: [DUV] Dialog Box - [O_o]Davidovich - 23.01.2010

cara vocк tem que por o #include <a_samp> em qualquer script que vocк queira fazer...


Re: [DUV] Dialog Box - Caio_Cartaxo - 23.01.2010

Quote:
Originally Posted by Ambrуsio
Sou mais do q novato no pawn, с entendi nada kkkkkkkkk
с tem como me mandar uma pronta ai, sу pra mim trocar as mensagens?

malz pela newbise....
Sendo assim ok. to sem tempo.

Se eu tivesse ai eu fazia ._.

Mais se vocк pega esse ai em cima vc sбo muda os textos ^^


Re: [DUV] Dialog Box - Ambrуsio - 23.01.2010

Quote:
Originally Posted by [O.o
Davidovich ]
cara vocк tem que por o #include <a_samp> em qualquer script que vocк queira fazer...
coloquei essa include no topo como vc pode ver ai!
Code:
#include <a_samp>
#define DIALOG_WELCOME 624
public OnPlayerConnect(playerid)
{
  ShowPlayerDialog(playerid,DIALOG_WELCOME,DIALOG_STYLE_MSGBOX,"BEM VINDO!","Seja bem vindo ao TaLiBan Server Brasil \n
  Respeite todos os players e principalmente os administradores \n
  Siga as regras, ou vocк poderб ser punido","OK","SAIR");
  return 1;
}

public OnDialogResponse(playerid,dialogid,response)
{
  if(dialogid == DIALOG_WELCOME && response == 0)
  {
    SendClientMessage(playerid,0xFF0000AA,"Vocк foi kickado por escolher a opзгo SAIR no dialog welcome.");
    Kick(playerid);
  }
  if(dialogid == DIALOG_WELCOME && response == 1)
  {
    SendClientMessage(playerid,0x00FF00AA,"Agora vocк pode jogar, divirta-se.");
  }
  return 1;
}
mas agora esta dando sу 4 erros na mesma linha, a 5є linha

Code:
(5) : error 037: invalid string (possibly non-terminated string)
(5) : error 017: undefined symbol "Seja"
(5) : error 017: undefined symbol "bem"
(5) : fatal error 107: too many error messages on one line
Linha 5:

Code:
  ShowPlayerDialog(playerid,DIALOG_WELCOME,DIALOG_STYLE_MSGBOX,"BEM VINDO!","Seja bem vindo ao server \n
e agora?


Re: [DUV] Dialog Box - [O_o]Davidovich - 23.01.2010

#define DIALOG_WELCOME 624
public OnPlayerConnect(playerid)
{
ShowPlayerDialog(playerid,DIALOG_WELCOME,DIALOG_ST YLE_MSGBOX,"BEM VINDO!","Seja bem vindo ao servidor ... \nRespeite os outros players e os administradores \nSiga as regras, ou vocк poderб ser punido","OK","SAIR");
return 1;
}

public OnDialogResponse(playerid,dialogid,response)
{
if(dialogid == DIALOG_WELCOME && response == 0)
{
SendClientMessage(playerid,0xFF0000AA,"Vocк foi kickado por escolher a opзгo SAIR no dialog welcome.");
Kick(playerid);
}
if(dialogid == DIALOG_WELCOME && response == 1)
{
SendClientMessage(playerid,0x00FF00AA,"Agora vocк pode jogar.");
}
return 1;
}
[/pawn]
pхe assim entгo.


Re: [DUV] Dialog Box - Ambrуsio - 23.01.2010

valew cara, sу faltou colocar o #include <a_samp> no topo, agora tб tudo certo, sу ainda с testei no sv, mas quando testar eu aviso!

AI ESTБ O DEFINITIVO!

Code:
#include <a_samp>
#define DIALOG_WELCOME 624
public OnPlayerConnect(playerid)
{
  ShowPlayerDialog(playerid,DIALOG_WELCOME,DIALOG_STYLE_MSGBOX,"BEM VINDO!","Seja bem vindo  ao servidor ... \nRespeite os outros players e os administradores \nSiga as regras, ou vocк poderб ser punido","OK","SAIR");
  return 1;
}

public OnDialogResponse(playerid,dialogid,response)
{
  if(dialogid == DIALOG_WELCOME && response == 0)
  {
    SendClientMessage(playerid,0xFF0000AA,"Vocк foi kickado por escolher a opзгo SAIR no dialog welcome.");
    Kick(playerid);
  }
  if(dialogid == DIALOG_WELCOME && response == 1)
  {
    SendClientMessage(playerid,0x00FF00AA,"Agora vocк pode jogar.");
  }
  return 1;
}