24.06.2012, 13:07
You are using strlen and it should be strval.
This checks for valid skins too.
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.");
}
}