Skin Selection
#3

Код:
CMD:buyclothes(playerid, params[]) return cmd_clothes(playerid, params);
CMD:clothes(playerid, params[])
{
	if(!IsPlayerBlocked(playerid))
	{
	    if(GetPlayerMoneyEx(playerid) < 100)
	    {
	        SCM(playerid, COLOR_GREY, "   You don't have enough money! ($100)");
	        return 1;
	    }
	    if(IsPlayerInRangeOfPoint(playerid, 1.5, 211.94, -100.89, 1005.25))
	    {
	        if(GetPlayerWantedLevel(playerid) > 3)
	        {
	            SCM(playerid, COLOR_GREY, "   We don't serve criminals!");
	            return 1;
			}
		    new skin;
		    if(!sscanf(params, "i", skin))
		    {
		        if(skin > 0 && skin < 300 && IsValidSkin(skin))
		        {
		            PlayerInfo[playerid][pModel] = skin;
		            SetPlayerSkin(playerid, skin);
		            GivePlayerMoneyEx(playerid, -100);
		            UpdatePlayer(playerid);
		            SCM(playerid, COLOR_LIGHTGREEN, "* New clothes purchased!");
					return 1;
		        }
		        else
		        {
		            SCM(playerid, COLOR_GREY, "   Invalid skin!");
		            return 1;
				}
		    }
		    else
		    {
		        /*SCM(playerid, COLOR_WHITE, "USAGE: /Clothes [Skin ID]");
		        return 1;*/
		        SaveGuns(playerid);
		        GetPlayerHealth(playerid, PlayerInfo[playerid][pSHealth]);
		        GetPlayerArmour(playerid, PlayerInfo[playerid][pSArmour]);
		        PlayerInfo[playerid][pWantedLevel] = GetPlayerWantedLevel(playerid);
				SCM(playerid, COLOR_ORANGE,"Entering changeroom... (( You can also type /clothes [Skin ID] ))");
		     	ForceClassSelection(playerid);
			    SetPlayerCameraPos(playerid, 214.02, -101.67, 1005.25-0.7);
			    SetPlayerCameraLookAt(playerid, 216.85, -97.81, 1005.25);
		        SetPlayerPos(playerid,211.94, -100.89, 900.00);
				BincoChoice[playerid] = 1;
				SetPlayerHealth(playerid, 0);
				return 1;
			}
		}
		else
		{
		    SCM(playerid, COLOR_GREY, "   You are not at a clothes shop!");
		}
	}
	else
	{
	    SCM(playerid, COLOR_GREY, "   You can't do that right now!");
	}
	return 1;
}
Try that, I created that.. It's a little over edited. But you can use it..
Reply


Messages In This Thread
Skin Selection - by Qur - 23.07.2012, 20:23
Re: Skin Selection - by Qur - 24.07.2012, 15:51
Re: Skin Selection - by Goru - 24.07.2012, 16:25
Re: Skin Selection - by Qur - 24.07.2012, 16:39
Re: Skin Selection - by Goru - 24.07.2012, 16:41
Re: Skin Selection - by Qur - 24.07.2012, 16:45

Forum Jump:


Users browsing this thread: 1 Guest(s)