[HELP] Need a cmd that changes clothes
#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


Messages In This Thread
[HELP] Need a cmd that changes clothes - by FreddeN - 25.11.2009, 22:13
Re: [HELP] Need a cmd that changes clothes - by kukars22 - 25.11.2009, 22:17
Re: [HELP] Need a cmd that changes clothes - by FreddeN - 25.11.2009, 22:24
Re: [HELP] Need a cmd that changes clothes - by kukars22 - 27.11.2009, 05:20
Re: [HELP] Need a cmd that changes clothes - by Andy_McKinley - 27.11.2009, 06:22

Forum Jump:


Users browsing this thread: 1 Guest(s)