15.08.2015, 21:50
Bom Fiz Meu Sistema de Inventario Tal Mais quando pego 1 item do Chao aparece em todos os slots que defini '-' !
PHP код:
if(newkeys == KEY_CROUCH) {
if(GetPlayerSpecialAction(playerid) != SPECIAL_ACTION_DUCK) return true;
for(new i = 0; i < MAX_SERVER_ITENS; i++) {
if(mundoItens[i][mItem_ativo] == false) continue;
if(!IsPlayerInRangeOfPoint(playerid, 1.0, mundoItens[i][mItem_x], mundoItens[i][mItem_y], mundoItens[i][mItem_z])) continue;
PlayerTextDrawSetPreviewModel(playerid, ITENS_INV[0][playerid], serverItens[mundoItens[i][mItem_index]][sItem_modelo]);
PlayerTextDrawSetPreviewModel(playerid, ITENS_INV[1][playerid], serverItens[mundoItens[i][mItem_index]][sItem_modelo]);
PlayerTextDrawSetPreviewModel(playerid, ITENS_INV[2][playerid], serverItens[mundoItens[i][mItem_index]][sItem_modelo]);
PlayerTextDrawSetPreviewModel(playerid, ITENS_INV[3][playerid], serverItens[mundoItens[i][mItem_index]][sItem_modelo]);
PlayerTextDrawSetPreviewModel(playerid, ITENS_INV[4][playerid], serverItens[mundoItens[i][mItem_index]][sItem_modelo]);
PlayerTextDrawSetPreviewModel(playerid, ITENS_INV[5][playerid], serverItens[mundoItens[i][mItem_index]][sItem_modelo]);
PlayerTextDrawSetPreviewModel(playerid, ITENS_INV[6][playerid], serverItens[mundoItens[i][mItem_index]][sItem_modelo]);
PlayerTextDrawSetPreviewModel(playerid, ITENS_INV[7][playerid], serverItens[mundoItens[i][mItem_index]][sItem_modelo]);
DestroyObject(mundoItens[GetPVarInt(playerid, "mundoItens_index_ativo")][mItem_createObject]);
Delete3DTextLabel(mundoItens[GetPVarInt(playerid, "mundoItens_index_ativo")][mItem_text3d]);
SetPVarInt(playerid, "mundoItens_index_ativo", i);
ApplyAnimation(playerid, "BOMBER", "BOM_PLANT_IN", 10000.0, 0, 0, 0, 0, 0);
break;
}
return 1;
}