тут вроде бы все нормально.
Код:
stock ObjInventory(playerid)
{
if(GetPVarInt(playerid,"ChangeSlot") == GetPVarInt(playerid,"SelectSlot")) return SetPVarInt(playerid,"ChangeSlot",0);
if(PlayerInfo[playerid][pInvSlot][GetPVarInt(playerid,"SelectSlot") - 1] != 0 && PlayerInfo[playerid][pInvSlot][GetPVarInt(playerid,"SelectSlot") - 1] != PlayerInfo[playerid][pInvSlot][GetPVarInt(playerid,"ChangeSlot") - 1]) return SetPVarInt(playerid,"ChangeSlot",0);
if(PlayerInfo[playerid][pInvSlot][GetPVarInt(playerid,"SelectSlot") - 1] == PlayerInfo[playerid][pInvSlot][GetPVarInt(playerid,"ChangeSlot") - 1])
{
PlayerInfo[playerid][pInvSlot][GetPVarInt(playerid,"ChangeSlot") - 1] = 0;
PlayerInfo[playerid][pInvKol][GetPVarInt(playerid,"SelectSlot") - 1] += PlayerInfo[playerid][pInvKol][GetPVarInt(playerid,"ChangeSlot") - 1];
PlayerInfo[playerid][pInvKol][GetPVarInt(playerid,"ChangeSlot") - 1] = 0;
}
if(PlayerInfo[playerid][pInvSlot][GetPVarInt(playerid,"SelectSlot") - 1] == 0)
{
PlayerInfo[playerid][pInvSlot][GetPVarInt(playerid,"SelectSlot") - 1] = PlayerInfo[playerid][pInvSlot][GetPVarInt(playerid,"ChangeSlot") - 1];
PlayerInfo[playerid][pInvKol][GetPVarInt(playerid,"SelectSlot") - 1] = PlayerInfo[playerid][pInvKol][GetPVarInt(playerid,"ChangeSlot") - 1];
PlayerInfo[playerid][pInvSlot][GetPVarInt(playerid,"ChangeSlot") - 1] = 0;
PlayerInfo[playerid][pInvKol][GetPVarInt(playerid,"ChangeSlot") - 1] = 0;
}
return 1;
}
Код:
stock UpdateInventory(playerid)
{
if(GetPVarInt(playerid,"ChangeSlot") == GetPVarInt(playerid,"SelectSlot")) return SetPVarInt(playerid,"ChangeSlot",0);
if(PlayerInfo[playerid][pInvSlot][GetPVarInt(playerid,"SelectSlot") - 1] != 0 && PlayerInfo[playerid][pInvSlot][GetPVarInt(playerid,"SelectSlot") - 1] != PlayerInfo[playerid][pInvSlot][GetPVarInt(playerid,"ChangeSlot") - 1]) return SetPVarInt(playerid,"ChangeSlot",0);
if(PlayerInfo[playerid][pInvSlot][GetPVarInt(playerid,"ChangeSlot") - 1] != 0)
{
new item = PlayerInfo[playerid][pInvSlot][GetPVarInt(playerid,"ChangeSlot") - 1];
PlayerTextDrawSetPreviewModel(playerid,Inventory[playerid][GetPVarInt(playerid,"ChangeSlot")], 19461),PlayerTextDrawSetPreviewRot(playerid, Inventory[playerid][GetPVarInt(playerid,"ChangeSlot")], 0.000000, 0.000000, 90.000000, 0.100000);
PlayerTextDrawSetPreviewModel(playerid,Inventory[playerid][GetPVarInt(playerid,"SelectSlot")], Items_All[PlayerInfo[playerid][pInvSlot][GetPVarInt(playerid,"ChangeSlot") - 1]][invObject]),PlayerTextDrawSetPreviewRot(playerid, Inventory[playerid][GetPVarInt(playerid,"SelectSlot")], 0.000000, 0.000000, 0.000000, 1.000000);
if(item == 4 || item == 9 || item == 10 || item == 13 || item == 14) PlayerTextDrawSetPreviewRot(playerid, Inventory[playerid][GetPVarInt(playerid,"SelectSlot")], 270.000000, 0.000000, 180.000000, 1.000000);
PlayerTextDrawShow(playerid,Inventory[playerid][GetPVarInt(playerid,"ChangeSlot")]);
PlayerTextDrawShow(playerid,Inventory[playerid][GetPVarInt(playerid,"SelectSlot")]);
}
return 1;
}