SA-MP Forums Archive
Help with Command .... - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help with Command .... (/showthread.php?tid=381529)



Help with Command .... - OTACON - 29.09.2012

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.


Re: Help with Command .... - Wanted1900 - 29.09.2012

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.