skin choose cmd
#1

Hey guys. I am looking for a cmd that changes your skin.Like:

/skin [skinid]

But I also want that you can't use this skin id's
280 281 282 105 106 107 102 103 104 114 115 116 108 109 110 277 278 279 287

Can someone please help me? Regards : Bart
Reply
#2

Код:
if(strcmp(cmd, "/skin", true) == 0)
{
	if(IsPlayerConnected(playerid))
	{
		tmp = strtok(cmdtext, idx);
		if(!strlen(tmp))
		{
			SendClientMessage(playerid, COLOR_WHITE,"HINT: /skin [skin-id]");
			return 1;
		}
		new skinsecme2 = strval(tmp)
		new skinsecme = strval(tmp);
		if(skinsecme >= 299||skinsecme <= 1||skinsecme2 == 280||skinsecme2 == 281||skinsecme2 == 282||skinsecme2 == 105||skinsecme2 == 106||skinsecme2 == 107||skinsecme2 == 169||skinsecme2 == 102||skinsecme2 == 103||skinsecme2 == 104||skinsecme2 == 114||skinsecme2 == 115) { SendClientMessage(playerid, COLOR_GREY, "Invalid Skin ID."); return 1; }
		if(skinsecme2 == 46||skinsecme2 == 116||skinsecme2 == 108||skinsecme2 == 109||skinsecme2 == 110||skinsecme2 == 227||skinsecme2 == 228||skinsecme2 == 229||skinsecme2 == 287) { SendClientMessage(playerid, COLOR_GREY, "Invalid Skin ID."); return 1; }
		SetPlayerSkin(playerid, skinsecme);
	}
	return 1;
}
enjoy
Reply
#3

Thannkyouuu!!

But one question. what does this line?

if(skinsecme2 == 46||skinsecme2 == 116||skinsecme2 == 108||skinsecme2 == 109||skinsecme2 == 110||skinsecme2 == 227||skinsecme2 == 228||skinsecme2 == 229||skinsecme2 == 287) { SendClientMessage(playerid, COLOR_GREY, "Invalid Skin ID."); return 1; }
Reply
#4

Quote:
Originally Posted by bartje01
Thannkyouuu!!

But one question. what does this line?

if(skinsecme2 == 46||skinsecme2 == 116||skinsecme2 == 108||skinsecme2 == 109||skinsecme2 == 110||skinsecme2 == 227||skinsecme2 == 228||skinsecme2 == 229||skinsecme2 == 287) { SendClientMessage(playerid, COLOR_GREY, "Invalid Skin ID."); return 1; }
that is available skins "SendClientMessage" is when somebody type skin ID what you dont put into that script = invalid skin ID
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)