24.06.2012, 12:59
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...
but that doesn't work.
the command:
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.");
}
}
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;
}