[Ajuda] Pedido Bobo mas necessбrio - 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] Pedido Bobo mas necessбrio (
/showthread.php?tid=639001)
Pedido Bobo mas necessбrio -
iTouchS - 10.08.2017
Preciso de mais uma ajuda idiota, alguйm poderia me ajudar por que eu to quebrando a cabeзa com isso: a intenзгo seria se o jogador nгo clicar no botгo "OK" em um DIALOG_STYLE_LIST ele levar um kick ! (clicando em "Kick")
PHP код:
if(dialogid == DIALOG_KICK && response == 1)
{
if(response)
{
switch(dialogid)
{
case 0: ShowPlayerDialog(playerid, DIALOG_KICK, DIALOG_STYLE_LIST, "Select", "1\n2\n3", "OK", "Kick");
case 1: SendClientMessage(playerid, -1, "3");
case 2: SendClientMessage(playerid, -1, "2");
}
else // LINHA DO ERRO
{
KickPlayer(playerid);
SendClientMessage(playerid, -1, "NГO !");
}
}
}
}
PHP код:
C:\Users\user\Desktop\GM\filterscripts\ytste.pwn(224) : error 029: invalid expression, assumed zero
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
1 Error.
Re: Pedido Bobo mas necessбrio -
DarkBr - 10.08.2017
PHP код:
{
if(dialogid == DIALOG_KICK)//dialog id
{
if(response)//caso ele clique no primeiro butгo
{
switch(listitem)//listas da dialog
{
case 0: ShowPlayerDialog(playerid, DIALOG_KICK, DIALOG_STYLE_LIST, "Select", "1\n2\n3", "OK", "Kick");
case 1: SendClientMessage(playerid, -1, "3");
case 2: SendClientMessage(playerid, -1, "2");
}
}
else //esc ou segundo botгo
{
KickPlayer(playerid);
SendClientMessage(playerid, -1, "NГO !");
}
}
}
response =
se clicar no primerio botгo
listitem =
listas da dialog
else no mesmo trajeto do response = esc ou segundo botгo
vocк tambйm pode utilizar o if(
!response) = segundo botгo esse '
! 'na frente significa oposto
Re: Pedido Bobo mas necessбrio -
iTouchS - 10.08.2017
O Erro ainda persiste :/
Re: Pedido Bobo mas necessбrio -
DarkBr - 10.08.2017
PHP код:
switch(listitem)//listas da dialog
{
case 0:
{
ShowPlayerDialog(playerid, DIALOG_KICK, DIALOG_STYLE_LIST, "Select", "1\n2\n3", "OK", "Kick");
}
case 1:
{
SendClientMessage(playerid, -1, "3");
}
case 2:
{
SendClientMessage(playerid, -1, "2");
}
}