Help with Command ....
#1

Help, this command does not work: S

I did wrong?

Here an example how I did it:

pawn Код:
if(dialogid == 1)
    {
        if(response)
        {
            new jugadorid;
            jugadorid = strval(inputtext); return 1;
            jugadorid = ReturnUser(inputtext); return 1;
            if(!strlen(inputtext)) return 1;
            if(strlen(inputtext) < 1 || strlen(inputtext) > 25) return 1;
            if(jugadorid != INVALID_PLAYER_ID) return 1;
            if(jugadorid != playerid) return 1;
            if(IsPlayerConnected(jugadorid)) return 1;
            //FUNCTION
            //FUNCTION
        }
    }
pawn Код:
COMMAND:text(playerid, params[])
{
        ShowPlayerDialog(playerid,1, DIALOG_STYLE_INPUT, "title", "message:", "accept", "Cancel");
    return 1;
}
Thanks in advance.

Sorry for my English.
Reply
#2

I think it is the
pawn Код:
if(IsPlayerConnected(jugadorid)) return 1;
line. You forgot to add a ! in front of the IsPlayerConnected function. What it does now is when the given player IS online, it stops the function. You can fix it by using
pawn Код:
if(!IsPlayerConnected(jugadorid)) return 1;
If you want to know more about the IF statement, you can check out the information on the wiki.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)