[HELP] Need a cmd that changes clothes
#1

The command should work like this, you need to enter the Binco shop in LS, we will use PlayerToPoint or something.
And when they are inside they may use the command that maybe can be like in GF /clothes.

Then they can use like this /clothes [skinid].

I did some experiments with SetPlayerSkin, but I dont know how to do it like that, so you can put in the skin id you want.

Thanks
Reply
#2

something like this?

Код:
if(strcmp(cmd, "/clothes", true) == 0)
	{
	  if(IsPlayerConnected(playerid))
	  {
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /clothes [playerid/PartOfName] [skin id]");
				return 1;
			}
			new para1;
			new level;
			para1 = ReturnUser(tmp);
			tmp = strtok(cmdtext, idx);
			level = strval(tmp);
			if(level > 299 || level < 1) { SendClientMessage(playerid, COLOR_GREY, "Wrong skin ID!"); return 1; }
			if (PlayerInfo[playerid][pAdmin] >= 1)
			{
			  if(IsPlayerConnected(para1))
			  {
			    if(para1 != INVALID_PLAYER_ID)
			    {
						GetPlayerName(para1, giveplayer, sizeof(giveplayer));
						GetPlayerName(playerid, sendername, sizeof(sendername));
						PlayerInfo[para1][pChar] = level;
						format(string, sizeof(string), "Your skin has been changed by Admin %s", sendername);
						SendClientMessage(para1, COLOR_WHITE, string);
						format(string, sizeof(string), "You have given %s skin to %d.", giveplayer,level);
						SendClientMessage(playerid, COLOR_WHITE, string);
					  SetPlayerSkin(para1, PlayerInfo[para1][pChar]);
					}
				}//not connected
			}
			else
			{
				SendClientMessage(playerid, COLOR_GRAD1, "  Your not an Admin !");
			}
		}
		return 1;
	}
If your using some RP mode, than you probably got pAdmin. Good Luck.
Reply
#3

Quote:
Originally Posted by kukars22
something like this?

Код:
if(strcmp(cmd, "/clothes", true) == 0)
	{
	  if(IsPlayerConnected(playerid))
	  {
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /clothes [playerid/PartOfName] [skin id]");
				return 1;
			}
			new para1;
			new level;
			para1 = ReturnUser(tmp);
			tmp = strtok(cmdtext, idx);
			level = strval(tmp);
			if(level > 299 || level < 1) { SendClientMessage(playerid, COLOR_GREY, "Wrong skin ID!"); return 1; }
			if (PlayerInfo[playerid][pAdmin] >= 1)
			{
			  if(IsPlayerConnected(para1))
			  {
			    if(para1 != INVALID_PLAYER_ID)
			    {
						GetPlayerName(para1, giveplayer, sizeof(giveplayer));
						GetPlayerName(playerid, sendername, sizeof(sendername));
						PlayerInfo[para1][pChar] = level;
						format(string, sizeof(string), "Your skin has been changed by Admin %s", sendername);
						SendClientMessage(para1, COLOR_WHITE, string);
						format(string, sizeof(string), "You have given %s skin to %d.", giveplayer,level);
						SendClientMessage(playerid, COLOR_WHITE, string);
					  SetPlayerSkin(para1, PlayerInfo[para1][pChar]);
					}
				}//not connected
			}
			else
			{
				SendClientMessage(playerid, COLOR_GRAD1, " Your not an Admin !");
			}
		}
		return 1;
	}
If your using some RP mode, than you probably got pAdmin. Good Luck.
This is a Administrator Command, normal players should be able to get new skins etc.
Reply
#4

Than just take out if player is an admin.
Reply
#5

Upload those skins you want.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)