Making certain Skin ID's not able to be used.
#1

Hello,
Im using Vortex Roleplay 2, and I want to know if there is anyway to make skin IDS: 163, 164, 165, 166.
Is this possible, if yes, how?

Regards,
F9.
Reply
#2

i think the skin id's are in the sa folder, so i don't know if you could do that, but i saw some custom vehicles in servers too so i'm not sure about it.
Reply
#3

pawn Код:
switch( GetPlayerSkin( playerid )
{
    case 163, 164, 165, 166:
    {
        // Code for these skins!
    }
}
Reply
#4

Quote:
Originally Posted by Dwane
Посмотреть сообщение
pawn Код:
switch( GetPlayerSkin( playerid )
{
    case 163, 164, 165, 166:
    {
        // Code for these skins!
    }
}
And how do I make people unable to purchase the skin with this?
/buyclothes command
Код:
CMD:buyclothes(playerid, params[]) {
	if(GetPlayerVirtualWorld(playerid)-BUSINESS_VIRTUAL_WORLD >= 1) {

		new
			skinID,
			slotID,
			iPrice,
			houseID = getPlayerHouseID(playerid),
			businessID = GetPlayerVirtualWorld(playerid) - BUSINESS_VIRTUAL_WORLD;
			
		if(businessID > 0) {
			for(new i = 0; i < MAX_BUSINESS_ITEMS; i++) {
				if(businessItems[i][bItemType] == 18 && businessItems[i][bItemBusiness] == businessID)
				    iPrice = businessItems[i][bItemPrice];
			}
		}

		if(businessVariables[businessID][bType] == 2) {
			if(houseID >= 1) {
				if(sscanf(params, "dd", skinID, slotID)) {
					return SendClientMessage(playerid, COLOR_GREY, SYNTAX_MESSAGE"/buyclothes [skinid] [house slot]");
				}
				else if(!IsValidSkin(skinID)) {
					return SendClientMessage(playerid, COLOR_GREY, "Invalid skin ID.");
				}
				else if(!IsPublicSkin(skinID) && playerVariables[playerid][pGroup] != 1) {
					return SendClientMessage(playerid, COLOR_GREY, "You can't purchase this skin.");
				}
				else if(slotID < 1 || slotID > 5) {
					return SendClientMessage(playerid, COLOR_GREY, "Invalid slot specified.");
				}
				else if(playerVariables[playerid][pMoney] >= 500) {
					playerVariables[playerid][pMoney] -= 500;
					businessVariables[businessID][bVault] += 500;
					playerVariables[playerid][pSkin] = skinID;
					houseVariables[houseID][hWardrobe][slotID - 1] = skinID;
					return SetPlayerSkin(playerid, skinID);
				}
				else {
				    format(szMessage, sizeof(szMessage), "You don't have $%d available.", iPrice);
					SendClientMessage(playerid, COLOR_GREY, szMessage);
				}
			}
			else if(!isnull(params)) {
				skinID = strval(params);

				if(!IsValidSkin(skinID)) {
					return SendClientMessage(playerid, COLOR_GREY, "Invalid skin ID.");
				}
				else if(!IsPublicSkin(skinID) && playerVariables[playerid][pGroup] != 1) {
					return SendClientMessage(playerid, COLOR_GREY, "You can't purchase this skin.");
				}
				else {
				    if(playerVariables[playerid][pMoney] >= iPrice) {
						playerVariables[playerid][pMoney] -= iPrice;
						businessVariables[businessID][bVault] += iPrice;
						playerVariables[playerid][pSkin] = skinID;
						return SetPlayerSkin(playerid, skinID);
					} else {
					    format(szMessage, sizeof(szMessage), "You don't have $%d available.", iPrice);
						SendClientMessage(playerid, COLOR_GREY, szMessage);
					}
				}
			}
			else {
   				format(szMessage, sizeof(szMessage), "Skins here cost $%d", iPrice);
				SendClientMessage(playerid, COLOR_GREY, szMessage);
				SendClientMessage(playerid, COLOR_GREY, SYNTAX_MESSAGE"/buyclothes [skinid] (Skins cost $500.)");
			}
		}
	}
	return 1;
}
Reply
#5

Just added in the command
pawn Код:
switch( GetPlayerSkin( playerid )
{
    case 163, 164, 165, 166:
    {
        // These skins can buy clothes
        // Code for buying here
    }
    default: SendClientMessage( playerid, -1, "You cannot buy this!" );
}
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)