Help with inputtext
#1

Hello:
PHP код:
if(dialogid == SpalvuDialog1)
        {
                        if(
response)
                         {
                                new 
giveplayerid;
                                if ( 
sscanfinputtext"r"giveplayerid ) ) ShowPlayerDialog(playeridSpalvuDialog1DIALOG_STYLE_INPUT"Spalva: Raudona""Čia įraљykite ћaidėjo nick arba ID\nNorėdamas jam pakeisti spalva""Gerai""");
                                else if(
giveplayerid != INVALID_PLAYER_ID ) return SendClientMessage(playeridCOLOR_DRED"[iRoam.LT]» Neteisingai nurodytas ћaidėjo ID, arba jo nėra prisijungusio!");
                                else
                                {
                                    new 
rspalva[50];
                                    
strcpy(rspalvainputtextsizeof(rspalva)); 
                                        
SetPlayerColor(sizeof(rspalva), 0xFF0000FF);
                                }
                         }
                return 
1;
        } 
What I do bad in this code?
Reply
#2

You need to use 'giveplayerid' as input for SetPlayerColor ...
Reply
#3

But server sends me a message: Who is in this line:
else if(giveplayerid != INVALID_PLAYER_ID ) return SendClientMessage(playerid, COLOR_DRED, "[iRoam.LT]» Neteisingai nurodytas žaidėjo ID, arba jo nėra prisijungusio!");
Reply
#4

Saying the problem and also translating the messages would help the users (included me) to understand what's the problem and help you. I had to use ****** translate..

pawn Код:
if (dialogid == SpalvuDialog1)
{
    if (response)
    {
        new
            giveplayerid;
       
        if (sscanf(inputtext, "r", giveplayerid)) return ShowPlayerDialog(playerid, SpalvuDialog1, DIALOG_STYLE_INPUT, "Spalva: Raudona", "Čia įrašykite žaidėjo nick arba ID\nNorėdamas jam pakeisti spalva", "Gerai", "");
        if (giveplayerid == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_DRED, "[iRoam.LT]» Neteisingai nurodytas žaidėjo ID, arba jo nėra prisijungusio!");
        SetPlayerColor(giveplayerid, 0xFF0000FF);
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)