dialog not working.
#1

Hello,
I made a command that uses dialog but when I enter a certain amount nothing happens and the dialog closes.
here are the codes:
PHP код:
public OnPlayerCommandText(playeridcmdtext[])
{
    if (
strcmp("/charity"cmdtexttrue10) == 0)
    {
        
ShowPlayerDialog(playerid,100,DIALOG_STYLE_INPUT"Charity""How much would you like to charity""Charity""Close");
        return 
1;
    }
    return 
0;
}
public 
OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
    switch( 
dialogid )
    {
          case 
100:
        {
            new 
string[256];
            if(
response)
            {
                new 
type strval(inputtext);
                if(
type == 0)
                if(
GetPlayerMoney(playerid)< type)
                {
                       
GivePlayerMoney(playerid,-type);
                      
format(stringsizeof(string), "INFO: You have successfully charitied $%d"type);
                      
SendClientMessage(playerid0xFFFFFFstring);
                  }
                  else 
SendClientMessage(playerid0xFFFFFF"SERVER: You do not have that much amount in your hand");
            }
        }
    }
    return 
1;

Reply


Messages In This Thread
dialog not working. - by TaLhA XIV - 15.08.2012, 12:46
Re: dialog not working. - by CROSS_Hunter - 15.08.2012, 13:06
Re: dialog not working. - by detter - 15.08.2012, 15:43
Re : dialog not working. - by Naruto_Emilio - 16.08.2012, 00:18
Re: Re : dialog not working. - by TaLhA XIV - 16.08.2012, 00:38
Re : dialog not working. - by Naruto_Emilio - 16.08.2012, 00:47

Forum Jump:


Users browsing this thread: 1 Guest(s)