Taking the inputtext from a dialog and checking if it's a playerid
#4

pawn Код:
else if(dialogid == DIALOG_TELLID)
    {
        if(response)
        {
            if(chatting[playerid] == 1) return SendClientMessage(playerid, -1, "{FF0000}You are already chatting with someone.");
            if(!IsNumeric(inputtext)) return SendClientMessage(playerid, -1, "{FF0000}You entered an invalid playerid.");
            new id = strval(inputtext);
            if(!IsPlayerConnected(id)) return SendClientMessage(playerid, -1, "{FF0000}Invalid player id.");
           
            return 1;
        }
    }
EDIT: Was too late.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)