Help with if inputtext is 200
#2

You are using strlen and it should be strval.

pawn Код:
case 3859:
{
    if(strlen(inputtext))
    {
        new skinid = strval(inputtext);
        if(skinid == 200)
        {
            SCM(playerid, RED, "You can't choose this skin");
        }
        else
        {
            if(skinid > -1 && skinid < 300)
            {
                Player[playerid][LastSkin] = strval(inputtext);
                SetPlayerSkin(playerid, strval(inputtext));
            }
            else
            {
                SCM(playerid, RED, "Invalid skin id.");
            }
        }
    }
    else
    {
        SendClientMessage(playerid, WHITE, "Must be longer than 0 char.");
    }
}
This checks for valid skins too.
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)