Help with if inputtext is 200
#1

Hey,

I made a /skin command, then you can enter a skin id.

But some skins are not allowed to choose.

so I tried this...

pawn Код:
case 3859:
            {
                if(strlen(inputtext) >= 1)
                {
                if(strlen(inputtext) == 200)
                    {
                        SCM(playerid, RED, "You can't choose this skin");
                    }
                    else
                    {
                        Player[playerid][LastSkin] = strval(inputtext);
                        SetPlayerSkin(playerid, strval(inputtext));
                    }
                }
                else
                {
                    SendClientMessage(playerid, WHITE, "Must be longer than 1 char.");
                }
            }
but that doesn't work.

the command:

pawn Код:
command(skin, playerid, params[])
{
    #pragma unused params
    if(Player[playerid][Human] == 1)
    {
        ShowPlayerDialog(playerid, 3859, DIALOG_STYLE_INPUT, "Change skin", "Please select a new, roleplay skin.", "Change", "Cancel");
    }
    else if(Player[playerid][Zombie] == 1)
    {
        SCM(playerid, RED, "Zombies can't set there skin");
    }
    return 1;
}
Reply


Messages In This Thread
Help with if inputtext is 200 - by Stefand - 24.06.2012, 12:59
Re: Help with if inputtext is 200 - by iggy1 - 24.06.2012, 13:07
Re: Help with if inputtext is 200 - by Stefand - 24.06.2012, 13:24

Forum Jump:


Users browsing this thread: 1 Guest(s)