Skin Help
#1

Hello, i have a question for my skins, when someone use /buyclothes to buy a skin in binco,zip,prolaps etc they get the skin they choose. But when they die or relog they get the skin that an admin last /setskin on them or the skin they started on server with (if an admin never /setskin on them then they get the skin that an admin latest set on them) what is the problem?

Код:
if(strcmp(cmd, "/Buyclothes", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
        	if(IsAtClothShop(playerid))
	        {
	            tmp = strtok(cmdtext, idx);
				if(!strlen(tmp))
				{
					SendClientMessage(playerid, COLOR_WHITE,"USAGE: /Buyclothes [Skin ID]");
					return 1;
				}
				new level = strval(tmp);
				GivePlayerMoney(playerid,-200);
				SafeGivePlayerMoney(playerid, - 200);
	            if(!IsValidSkin(level))
				return SendClientMessage(playerid, COLOR_GREY, "Wrong skin ID!");
			    PlayerInfo[playerid][pModel] = level;
				SetPlayerSkin(playerid, PlayerInfo[playerid][pModel]);
	    	}
	    }
	    return 1;
	}
Reply
#2

Show us the /setskin command.
Reply
#3

Код:
	if(strcmp(cmd, "/setskin", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /setskin [playerid/PartOfName] [skin id]");
				return 1;
			}
			new para1;
			new level;
			para1 = ReturnUser(tmp);
			tmp = strtok(cmdtext, idx);
			level = strval(tmp);
			if(!IsValidSkin(level))
				return SendClientMessage(playerid, COLOR_GREY, "Wrong skin ID!");
			if (PlayerInfo[playerid][pAdmin] >= 5)
			{
			    if(IsPlayerConnected(para1))
			    {
			        if(para1 != INVALID_PLAYER_ID)
			        {
						GetPlayerName(para1, giveplayer, sizeof(giveplayer));

						PlayerInfo[para1][pChar] = level;
						format(string, sizeof(string), "** Administrator %s Has Changed Your Skin.", sendername);
						SendClientMessage(para1, TEAM_GROVE_COLOR, string);
						format(string, sizeof(string), "** You Granted %s skin number %d.", giveplayer,level);
						SendClientMessage(playerid, COLOR_ORANGE, string);
   						format(string, sizeof(string), "[ADMIN]: %s Gave The Skin [%d] to %s (%d).",sendername, level, giveplayer, para1);
						ABroadCast(COLOR_LIGHTRED,string, 5);
		    			SetPlayerSkin(para1, PlayerInfo[para1][pChar]);
		    			new y, m, d;
						new h,mi,s;
						getdate(y,m,d);
						gettime(h,mi,s);
						format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s Gave The Skin [%d] to %s",d,m,y,h,mi,s,sendername,level,giveplayer);
						GiveLog(string);
					}
				}//not connected
			}
			else
			{
				SendClientMessage(playerid, COLOR_GRAD1, "   you are not authorized to use that command!");
			}
		}
		return 1;
    }
Reply
#4

Код:
if(strcmp(cmd, "/Buyclothes", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
        	if(IsAtClothShop(playerid))
	        {
	            tmp = strtok(cmdtext, idx);
				if(!strlen(tmp))
				{
					SendClientMessage(playerid, COLOR_WHITE,"USAGE: /Buyclothes [Skin ID]");
					return 1;
				}
				new level = strval(tmp);
				GivePlayerMoney(playerid,-200);
				SafeGivePlayerMoney(playerid, - 200);
	            if(!IsValidSkin(level))
				return SendClientMessage(playerid, COLOR_GREY, "Wrong skin ID!");
			    PlayerInfo[playerid][pChar] = level;
				SetPlayerSkin(playerid, PlayerInfo[playerid][pChar]);
	    	}
	    }
	    return 1;
	}
Try this.
Reply
#5

Thanks worked perfect! now i also found that even if you are masked it shows your name when speaking on the phone can i post the mask lines here and maybe you can help?
Reply
#6

Make another thread.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)