Can someone here guide me step by step on how to build one? I'd be really glad if anyone with any experience on this subject guides me.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts Menuskin <- array(100, null);
function onPlayerCommand(player, cmd, text)
{
if(cmd=="changeskin")
{
if(!text) PrivMessage(player, "Error: try this instead: /changeskin <skin id>");
else if(!player.IsSpawned) PrivMessage(player, "Error, You need to spawn first!"):
else
{
player.Skin = ( IsNum(text) ? text.tointerger() : GetSkinID(text) );
}
}
else if(cmd=="saveskin")
{
if(!player.IsSpawned) PrivMessage(player, "Error: You need to spawn before you make use of any commands!");
else
{
MessagePlayer("You've successfully set your skin", player);
skin[player.ID] = player.Skin;
}
}
else if(cmd=="removeskin")
{
skin[player.ID] = null;
}
}
function onPlayerSpawn(player)
{
if(skin[player.ID]!=null)
{
PrivMessage(player, "You've spawned with the garments of your choice!");
player.Skin = skin[player.ID];
}
}