Dialog
#3

PHP код:
public OnPlayerCommandText(playeridcmdtext[])
{
    if(
strcmp(cmd,"/ask",true)==|| strcmp(cmd,"/askq",true)==|| strcmp(cmd,"/report",true)==0)
    {
        
ShowPlayerDialog(playerid,489,DIALOG_STYLE_INPUT,"REPORT:","Enter your message below""Send""Cancel");
        return 
1;
    }
    return 
0;
}
public 
OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
    if(
dialogid == 489)
    {
        if(
response)
        {
            new 
string[128];
            
GetPlayerName(playeridstring24);
            if(!
strlen(inputtext)) return ShowPlayerDialog(playerid,489,DIALOG_STYLE_INPUT,"REPORT:","Enter your message below""Send""Cancel");
            if(
strlen(inputtext) > 90
            {
                
SendClientMessage(playerid0xFF0000FF"Your message must have less than 90 characters.");
                
ShowPlayerDialog(playerid,489,DIALOG_STYLE_INPUT,"REPORT:","Enter your message below""Send""Cancel");
                return 
1;
            }
            
format(string128"Ask from %s: %s"stringinputtext);
            
ABroadCast(COLOR_ASKQ,string,1); 
            
SendClientMessage(playeridCOLOR_ASKQ"Your Q is sent to Admins.");
        }
    }
    return 
1;

Reply


Messages In This Thread
Dialog - by Speed - 07.07.2011, 10:06
Re: Dialog - by [MG]Dimi - 07.07.2011, 11:02
Re: Dialog - by Shadoww5 - 07.07.2011, 13:54

Forum Jump:


Users browsing this thread: 1 Guest(s)