Liberty Unleashed
Scripting => Script Help => Topic started by: CANYON on August 24, 2012, 10:00:51 pm
-
else if ( cmd == "setskin" )
{
local check = Required( player, cmd, Level );
if ( check )
{
if ( !text ) MessagePlayer( "[#FF7C7C]Use: /setskin [ID] [Skin]", player );
else
{
local skin = text ? text.tointeger() : 0;
player.Skin = skin;
Message( "[#FF7C7C] Admin " + player + " changed a skin to the player " + plr + " on " + skin +"" );
}
}
}
What not so in a command? Help to correct.
-
else if ( cmd == "setskin" )
local skin = text ? text.tointeger() : 0;
}
What not so in a command? Help to correct.
Why make life such a pain? Do you even know what the "?" closure is used for? I highly doubt it.
You should replace what I quoted above with the following:
local skin = text.tointeger();
However, I'd suggest you to not convert the "skin" variable to an integer right away, rather first check whether the skin parameter a player on your server will type is a digit by using IsNum, and if it is, convert it to an integer.
Have a nice day.