inputtext.
#1

Код HTML:
ShowPlayerDialog(playerid, 10, DIALOG_STYLE_INPUT, "Player ID", "Enter Player ID", "Next", "Exit");
Код HTML:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
	switch(dialogid)
    {
		case 10:
		{
		    if(!response)
			{
				if(!IsPlayerConnected(strval(inputtext))) return SendClientMessage(playerid, -1, "The player not connected.");
			}
			return 1;
		}
	}
	return 1;
}
input text in Dialog: 0
0 = Player ID.
Send me message: "The player not connected.", but the player with 0 ID is connected.
Reply
#2

if(!response)
to
if(response)
Reply
#3

I changed, and the same problem.
"The player not connected.", but ID 0 is connected.
Reply
#4

PHP код:
public OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
    switch(
dialogid)
    {
            if(
response)
            {
                if(!
IsPlayerConnected(strval(inputtext))) return SendClientMessage(playerid, -1"The player not connected.");
            }
    }
    return 
1;

Reply
#5

Not work...
Reply
#6

PHP код:
public OnDialogResponse(playeriddialogidresponselistiteminputtext[]) 

    switch(
dialogid
    { 
            if(
response
            { 
                if(!
IsPlayerConnected(strval(inputtext))) return SendClientMessage(playerid, -1"The player not connected."); 
                if(
IsPlayerConnected(strval(inputtext))
                {
                   
//code if player connected!
                
}
            } 
    } 
    return 
1

Reply
#7

Oh gosh where is the case

PHP код:
public OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
    switch(
dialogid)
    {
        case 
10:
         {
              if(
response)
            {
                 if(!
IsPlayerConnected(strval(inputtext))) return SendClientMessage(playerid, -1"The player not connected.");
                   
SendClientMessage(playerid, -1"The player is connected.");
               }
        }
    }
    return 
1;

Reply


Forum Jump:


Users browsing this thread: