Перемещение предметов по слотам.
#1

Как сделать перемещение предметов по слотам.

Code:
for(new i; i < 48; i++)
    {
    	if(playertextid == InvSlot[playerid][i])  
        {        
        	if(GetPVarInt(playerid, "SelectSlot") == -1)
            {
            	if(PlayerInfo[playerid][pInvSlot][i] != -1)
                {
                	SetPVarInt(playerid, "SelectSlot", i);                
                    
                    PlayerTextDrawBackgroundColor(playerid, InvSlot[playerid][i], 0xf2ddc6ff);
				    PlayerTextDrawShow(playerid, InvSlot[playerid][i]);
                
                }
            }
            
            else if(GetPVarInt(playerid, "SelectSlot") != -1) 
            {
            	if(PlayerInfo[playerid][pInvSlot][i] == -1) 
                {
                	SetPVarInt(playerid, "NewSelectSlot", i);   
                    
                    PlayerTextDrawBackgroundColor(playerid, InvSlot[playerid][GetPVarInt(playerid,"SelectSlot")], -1061109505);
                	PlayerTextDrawShow(playerid, InvSlot[playerid][GetPVarInt(playerid,"SelectSlot")]);   
                           
                    
                    PlayerTextDrawSetPreviewModel(playerid,InvSlot[playerid][GetPVarInt(playerid,"SelectSlot")], 1649);
                    PlayerTextDrawSetPreviewRot(playerid, InvSlot[playerid][GetPVarInt(playerid,"SelectSlot")], 0.000000, 0.000000, 90.000000, 2.000000);
	    			
                    PlayerTextDrawSetPreviewModel(playerid,InvSlot[playerid][GetPVarInt(playerid,"NewSelectSlot")], Items_All[PlayerInfo[playerid][pInvSlot][GetPVarInt(playerid,"ChangeSlot") - 1]][invObject]);
        			PlayerTextDrawSetPreviewRot(playerid, InvSlot[playerid][GetPVarInt(playerid,"NewSelectSlot")], 0.000000, 0.000000, 0.000000, 1.000000);   
                    
                    SetPVarInt(playerid, "SelectSlot", -1);
                    SetPVarInt(playerid, "NewSelectSlot", -1);
                }
            }
        
        	new string[10];
        	format(string, sizeof(string), "Clot %i", i);
            SendClientMessage(playerid, -1, string);  
        }
    }
В чем ошибка, в моем коде?
Reply


Messages In This Thread
Перемещение предметов по слотам. - by DeViLsS - 05.01.2015, 16:29
Re: Перемещение предметов по слотам. - by valych - 09.01.2015, 12:47
Re: Перемещение предметов по слотам. - by Daea - 09.01.2015, 13:43
Re: Перемещение предметов по слотам. - by Daea - 09.01.2015, 13:45

Forum Jump:


Users browsing this thread: 1 Guest(s)