Блин, ну я рад. Только что это нам даёт? Сделай хотя бы так...
PHP код:
public OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid)
{
print("\nOnPlayerClickPlayerTextDraw");
for(new i; i < 43; i++)
{
printf("\nЯчейка %i", i);
if(playertextid == Inventory[playerid][i])
{
print("Выбранная ячейка найдена");
if(Inventory[playerid][i] == Inventory[playerid][42]) return 1;
if(GetPVarInt(playerid,"ChangeSlot") == 0)
{
print("ChangeSlot == 0");
SetPVarInt(playerid,"SelectSlot",i);
if(PlayerInfo[playerid][pInvSlot][GetPVarInt(playerid,"SelectSlot") - 1] == 0) { }
else
{
SetPVarInt(playerid,"ChangeSlot",GetPVarInt(playerid,"SelectSlot"));
PlayerTextDrawBackgroundColor(playerid,Inventory[playerid][GetPVarInt(playerid,"ChangeSlot")], 0xf2ddc6ff);
PlayerTextDrawShow(playerid,Inventory[playerid][GetPVarInt(playerid,"ChangeSlot")]);
}
}
else if(GetPVarInt(playerid,"ChangeSlot") != 0)
{
print("ChangeSlot != 0");
SetPVarInt(playerid,"SelectSlot",i);
PlayerTextDrawBackgroundColor(playerid,Inventory[playerid][GetPVarInt(playerid,"ChangeSlot")], -1061109505);
PlayerTextDrawShow(playerid,Inventory[playerid][GetPVarInt(playerid,"ChangeSlot")]);
UpdateInventory(playerid);
ObjInventory(playerid);
SetPVarInt(playerid,"ChangeSlot",0);
SetPVarInt(playerid,"SelectSlot",0);
return 1;
}
}
}
print("OnPlayerClickPlayerTextDraw End\n");
return 1;
}