[Ajuda] Pedido Bobo mas necessбrio
#1

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 
0ShowPlayerDialog(playeridDIALOG_KICKDIALOG_STYLE_LIST"Select""1\n2\n3""OK""Kick");
                case 
1SendClientMessage(playerid, -1"3");
                case 
2SendClientMessage(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 029invalid expressionassumed zero
Pawn compiler 3.2.3664              Copyright 
(c1997-2006ITB CompuPhase
1 Error

Reply
#2

PHP код:
{
    if(
dialogid == DIALOG_KICK)//dialog id
    
{
        if(
response)//caso ele clique no primeiro butгo
        
{
            switch(
listitem)//listas da dialog
            
{
                case 
0ShowPlayerDialog(playeridDIALOG_KICKDIALOG_STYLE_LIST"Select""1\n2\n3""OK""Kick");
                case 
1SendClientMessage(playerid, -1"3");
                case 
2SendClientMessage(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
Reply
#3

O Erro ainda persiste :/
Reply
#4

PHP код:
switch(listitem)//listas da dialog
            
{
                case 
0:
                {
                    
ShowPlayerDialog(playeridDIALOG_KICKDIALOG_STYLE_LIST"Select""1\n2\n3""OK""Kick");
                }
                case 
1:
                {
                    
SendClientMessage(playerid, -1"3");
                }
                case 
2:
                {
                    
SendClientMessage(playerid, -1"2");
                }
            } 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)