Skin Selection
#1

Hey.. I've created something that when player enters a cloth shop and write /buyclothes he get into the changing room and can choose his skin

the problems i have are:
he have to write next, next, next and done when finished..
so my question is:
there's any way to make it be choose with arrows? i mean move left and right with the keyboard arrows intead of typing next, just like ForceClassSelection

the second thing.. how can i make the camera not to be behind the player?
when he enters the changing room he cant move but the camera behind him..

hope you'll understand

and thanks!
Reply
#2

Bump?

The camera issue is okay...
the only problem right now is that moving .. i want to use the arrows intead of typing next

Thanks..
Reply
#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
#4

I already got clothes command.. the only issue i have now
is when player reach the selection area he need to write next to see the next skin.. and i want it to be with the keyboard arrows
Reply
#5

Код:
/*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;
			}
		}
That's what your talking about.
Reply
#6

But I dont want to use ForceClassSelection..
I already created peds of the skins.. there's skins I dont want people to be able to choose.. and if they force to class selection they're able to choose whatever they like

or..?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)