if(dialogid == DABOX+10) { if(response) { new id[128]; id = inputtext; format(ufile, sizeof(ufile), "Roleplay/Houses/Users/%s.ini", pName(playerid)); if(!dini_Exists(ufile)) AddUser(playerid); new howner[256]; howner = dini_Get(hfile, "Owner"); new nigname[MAX_PLAYER_NAME]; nigname = pName(playerid); if(strfind(howner, nigname, true) == -1) return ShowPlayerDialog(playerid, DABOX-1, DIALOG_STYLE_MSGBOX, "House - Options", "You are not the owner of this house!", "Ok", ""); if IsValidSkin(id) { SetPlayerSkin(playerid,id); GivePlayerCash(playerid,-100); SendClientMessage(playerid, COLOR_WHITE, "Clothes purchased, $-100."); pInfo[playerid][pSkin] = GetPlayerSkin(playerid); return 1; } else { SendClientMessage(playerid, COLOR_RED, "Invalid Skin ID!"); } } return 1; }
stock IsValidSkin(skinid) { #define MAX_BAD_SKINS 22 new badSkins[MAX_BAD_SKINS] = { 3, 4, 5, 6, 8, 42, 65, 74, 86, 119, 149, 208, 265, 266, 267, 268, 269, 270, 271, 272, 273, 289 }; if (skinid < 0 || skinid > 299) return false; for (new i = 0; i < MAX_BAD_SKINS; i++) { if (skinid == badSkins[i]) return false; } #undef MAX_BAD_SKINS return 1; }
id = inputtext;
if IsValidSkin(id) {
SetPlayerSkin(playerid,id);
case 5: { format(hfile, sizeof(hfile), "Roleplay/Houses/%d.ini", GetEntID(playerid)); new howner[256]; howner = dini_Get(hfile, "Owner"); new nigname[MAX_PLAYER_NAME]; nigname = pName(playerid); if(strfind(howner, nigname, true) == -1) return ShowPlayerDialog(playerid, DABOX-1, DIALOG_STYLE_MSGBOX, "House - Options", "You are not the owner of this house!", "Ok", ""); ShowPlayerDialog(playerid, DABOX+10, DIALOG_STYLE_INPUT, "House - Change Clothes", "Type in the skin ID you want.", "Ok", "Cancel"); }
Originally Posted by vladi866
I cant understand anything because you did The HOuse sys with the clothes sys so how can you want that it will work...
|
Originally Posted by vladi866
oh I understand now but why you will buy it if it in you house so why buy?
|