13.02.2014, 14:51
You had an extra opened bracket.
pawn Код:
public OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid)
{
if(GetPVarInt(playerid, "furnc_active") == 0) return 0;
new curpage = GetPVarInt(playerid, "furnc_page");
// Handle: next button
if(playertextid == gNextButtonTextDrawId[playerid]) {
if(curpage < (GetNumberOfPages() - 1)) {
SetPVarInt(playerid, "furnc_page", curpage + 1);
ShowFurnModelPreviews(playerid);
UpdateFurnTextDraw(playerid);
PlayerPlaySound(playerid, 1083, 0.0, 0.0, 0.0);
} else {
PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
}
return 1;
}
// Handle: previous button
if(playertextid == gPrevButtonTextDrawId[playerid]) {
if(curpage > 0) {
SetPVarInt(playerid, "furnc_page", curpage - 1);
ShowFurnModelPreviews(playerid);
UpdateFurnTextDraw(playerid);
PlayerPlaySound(playerid, 1084, 0.0, 0.0, 0.0);
} else {
PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
}
return 1;
}
// Search in the array of textdraws used for the Furns
new x=0;
while(x != SELECTION_ITEMS) {
if(playertextid == gSelectionFurns[playerid][x]) {
HandlePlayerFurnitureSelection(playerid, x);
PlayerPlaySound(playerid, 1083, 0.0, 0.0, 0.0);
DestroyFurnitureSelectionMenu(playerid);
SetPVarInt(playerid, "furnc_active", 0);
EditObject(playerid, object[playerid]);
return 1;
}
x++;
}
return 0;
}