26.06.2015, 17:04
Hello there, i've a small problem, when am clicking on an option to buy a skin or accessories, nothings shows up, dialogs are working fine, but when i click for example on "Skin" to buy a new skin or accessories, nothing appears after clicking it.
PHP код:
}
if(dialogid == 77) //buy clothes
{
if(response)
{
if(!IsAtClothShop(playerid)) return SendClientMessage(playerid,COLOR_GREY," You are not at a clothes shop.");
new biz = GetPlayerVirtualWorld(playerid);
if(!IsNumeric(inputtext))
{
SendClientMessage(playerid, COLOR_GREY, " You must enter a number for the skin ID.");
return 1;
}
if((strval(inputtext) == 294 && PlayerInfo[playerid][pDonateRank] == 0) ||
(strval(inputtext) == 295 && PlayerInfo[playerid][pDonateRank] == 0) ||
(strval(inputtext) == 167) ||
(strval(inputtext) == 0) ||
(strval(inputtext) >= 265 && strval(inputtext) <= 267) ||
(strval(inputtext) == 165) ||
(strval(inputtext) == 166) ||
(strval(inputtext) >= 280 && strval(inputtext) <= 288) ||
(strval(inputtext) >= 274 && strval(inputtext) <= 279) ||
(strval(inputtext) >= 163 && strval(inputtext) <= 166) ||
(strval(inputtext) >= 268 && strval(inputtext) <= 271) ||
(strval(inputtext) == 296) ||
(strval(inputtext) == 71)) return SendClientMessage(playerid,COLOR_GREY," You are not allowed to use this skin.");
new skin = strval(inputtext);
if(skin < 0 || skin > 299) return SendClientMessage(playerid, COLOR_GREY, " Skin can't be below 0 or above 299.");
PlayerTextDrawDestroy(playerid, pModel_t[playerid]);
pModelState[playerid] = 999;
pModel_t[playerid] = CreatePlayerTextDraw(playerid, 220.0, 250.0, "_");
PlayerTextDrawFont(playerid, pModel_t[playerid], TEXT_DRAW_FONT_MODEL_PREVIEW);
PlayerTextDrawTextSize(playerid, pModel_t[playerid], 200.0, 200.0);
PlayerTextDrawSetPreviewModel(playerid, pModel_t[playerid], skin);
PlayerTextDrawUseBox(playerid, pModel_t[playerid], 0);
PlayerTextDrawBackgroundColor(playerid, pModel_t[playerid], 0x00000000);
PlayerTextDrawShow(playerid, pModel_t[playerid]);
pModelState[playerid] = 2;
pModelRot[playerid][0] = 0;
pModelRot[playerid][1] = 0;
pModelRot[playerid][2] = 0;
pModelTimer[playerid] = SetTimerEx("UpdatePreviewModel", 1000, 1, "i", playerid);
ShowPlayerDialog(playerid, 771, DIALOG_STYLE_MSGBOX, "Are you sure?", "Are you sure you would like to buy this skin for $500?\n\n{F5DA81}NOTE: Below is a preview of the skin.", "Purchase", "Cancel");
SetPVarInt(playerid, "buyskinbincobiz", biz);
SetPVarInt(playerid, "buyskinbinco", skin);
return 1;
}
}
if(dialogid == 771)
{
PlayerTextDrawDestroy(playerid, pModel_t[playerid]);
pModelState[playerid] = 999;
if(!response) { DeletePVar(playerid, "buyskinbinco"); DeletePVar(playerid, "buyskinbincobiz"); return 1; }
else
{
SendClientMessage(playerid,COLOR_LIGHTBLUE,"* You bought a new set of clothes for $500.");
new skin = GetPVarInt(playerid, "buyskinbinco");
new biz = GetPVarInt(playerid, "buyskinbincobiz");
GiveMoney(playerid, -500);
BizInfo[biz][bTill] += 500;
BizInfo[biz][bProducts] -= 1;
SetPlayerSkin(playerid,skin);
PlayerInfo[playerid][pModel] = skin;
DeletePVar(playerid, "buyskinbinco");
DeletePVar(playerid, "buyskinbincobiz");
}